-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
heudiconv crashes when converting a derived ADC map from Siemens scanner #633
Comments
Closes nipy#633 Somewhat of a blind fix without looking to deep why we get IndexError instead of KeyError
@yarikoptic I got a new error with #634 . This definitely counts as progress: INFO: Running heudiconv version 0.11.6.post31+g24f4d88 latest 0.11.6
INFO: Need to process 1 study sessions
INFO: PROCESSING STARTS: {'subject': 'mysubj', 'outdir': '/mnt/projects/data/dcm_bids/bids_dwi_min_newheudi/', 'session': '01'}
INFO: Processing 7 dicoms
INFO: Analyzing 7 dicoms
/home/michael/.conda/envs/heudiconv310_dwi/lib/python3.10/site-packages/nibabel/nicom/dicomwrappers.py:525: UserWarning: Derived images found and removed
warnings.warn('Derived images found and removed')
Traceback (most recent call last):
File "/home/michael/.conda/envs/heudiconv310_dwi/bin/heudiconv", line 8, in <module>
sys.exit(main())
File "/home/michael/.conda/envs/heudiconv310_dwi/lib/python3.10/site-packages/heudiconv/cli/run.py", line 24, in main
workflow(**kwargs)
File "/home/michael/.conda/envs/heudiconv310_dwi/lib/python3.10/site-packages/heudiconv/main.py", line 379, in workflow
prep_conversion(sid,
File "/home/michael/.conda/envs/heudiconv310_dwi/lib/python3.10/site-packages/heudiconv/convert.py", line 172, in prep_conversion
seqinfo = group_dicoms_into_seqinfos(
File "/home/michael/.conda/envs/heudiconv310_dwi/lib/python3.10/site-packages/heudiconv/dicoms.py", line 232, in group_dicoms_into_seqinfos
if mw.is_same_series(mwgroup[idx]):
File "/home/michael/.conda/envs/heudiconv310_dwi/lib/python3.10/site-packages/nibabel/nicom/dicomwrappers.py", line 357, in is_same_series
my_sig = self.series_signature
File "/home/michael/.conda/envs/heudiconv310_dwi/lib/python3.10/site-packages/nibabel/onetime.py", line 142, in __get__
val = self.getter(obj)
File "/home/michael/.conda/envs/heudiconv310_dwi/lib/python3.10/site-packages/nibabel/nicom/dicomwrappers.py", line 625, in series_signature
signature['image_shape'] = (self.image_shape, eq)
File "/home/michael/.conda/envs/heudiconv310_dwi/lib/python3.10/site-packages/nibabel/onetime.py", line 142, in __get__
val = self.getter(obj)
File "/home/michael/.conda/envs/heudiconv310_dwi/lib/python3.10/site-packages/nibabel/nicom/dicomwrappers.py", line 505, in image_shape
first_frame = self.frames[0]
File "/home/michael/.conda/envs/heudiconv310_dwi/lib/python3.10/site-packages/pydicom/multival.py", line 104, in __getitem__
return self._list[index]
IndexError: list index out of range |
@yarikoptic looking at the conversion of other metrics with version Serendipitously i noticed that the third dimension of |
given that we get through |
also happens upon the same
|
@neurorepro could you try with current fresh nibabel? current heudiconv image has it: #670 (comment) |
Summary
heudiconv crashes when converting a derived ADC map from Siemens scanner with the following trace:
This is generated by
frame_indices = np.delete(frame_indices, stackid_dim_idx, axis=1)
in the if-block:Looks like this is because
frame_indices
is empty (so no second axis), which should be expected for a derived map though, since earlier there is:with
So for a derived map
self.frames
will become empty, soframe_indices
will be so as well, and so the if-block will bring hell.The thing i don't understand is why we are running the if-block in this case, and why the condition evaluates to true in my case where
stackid_tag=2134102
anddim_seq[0] = (0020, 9056)
. But i have to admit i didn't look into the__int__
function of thedim_seq
items.Just in case this is useful, here is the metadata for this single problematic dcm file:
Platform details:
Choose one:
Running heudiconv version 0.11.6 latest 0.11.6
The text was updated successfully, but these errors were encountered: