DIAGNijmegen / rse-panimg

Conversion of medical images to MHA and TIFF.
Apache License 2.0
13 stars 5 forks source link

Correct how the number of timepoints in a 4D scan is determined #87

Closed nlessmann closed 2 years ago

nlessmann commented 2 years ago

The DICOM reader was not working properly for reading a single timepoint of a 4D scan. It would crash when the TemporalPositionIndex is 3 but the data of timepoints 1 and 2 are not present because we are not trying to read the entire 4D sequence but only one 3D image from the sequence. This PR changes the logic to counting the number of distinct TemporalPositionIndex values instead of using the maximum value.