Closed
Description
Originally brought up in nipy/heudiconv#275 by @bmelo
Version: nibabel-2.3.1
Loading up a Philips diffusion DICOM (with trace volume) results in an incorrect image shape with an extra? dimension (96, 96, 60, 2, 33).
In [1]: from nibabel.nicom.dicomwrappers import wrapper_from_file
In [2]: mw = wrapper_from_file('philips-dwi.dcm', force=True)
In [3]: mw.image_shape
---------------------------------------------------------------------------
WrapperError Traceback (most recent call last)
<ipython-input-3-4963e90423f3> in <module>()
----> 1 mw.image_shape
/home/mathias/miniconda2/envs/dev3/lib/python3.6/site-packages/nibabel/onetime.py in __get__(self, obj, type)
139 # Errors in the following line are errors in setting a
140 # OneTimeProperty
--> 141 val = self.getter(obj)
142
143 setattr(obj, self.name, val)
/home/mathias/miniconda2/envs/dev3/lib/python3.6/site-packages/nibabel/nicom/dicomwrappers.py in image_shape(self)
535 n_vols = np.prod(shape[3:])
536 if n_frames != n_vols * shape[2]:
--> 537 raise WrapperError("Calculated shape does not match number of "
538 "frames.")
539 return tuple(shape)
WrapperError: Calculated shape does not match number of frames.
Metadata
Metadata
Assignees
Labels
No labels