Cannot slice image objects; consider using img.slicer[slice] to generate a sliced image (see documentation for caveats) or slicing image array data with img.dataobj[slice] or img.get_fdata()[slice]
Hi. I'm currently using the the muscle_adipose_tissue pipeline and it works perfectly. However, I run into some issues when trying to use the spine_muscle_adipose_tissue and liver_spleen_pancreas pipelines, they all give the same type error:
force_separate_z: None interpolation order: 0
Traceback (most recent call last):
File ".../.Trash/Comp2Comp/comp2comp/spine/spine.py", line 135, in spine_seg
img, seg = nnUNet_predict_image(
File "....../lib/python3.9/site-packages/nibabel/spatialimages.py", line 645, in __getitem__
raise TypeError(
TypeError: Cannot slice image objects; consider using `img.slicer[slice]` to generate a sliced image (see documentation for caveats) or slicing image array data with `img.dataobj[slice]` or `img.get_fdata()[slice]`
Are there any specific modifications needed for the DICOM files to run these pipelines?
@DrKrabs , thanks for trying C2C and your feedback. Are you passing in a single DICOM file? spine_muscle_adipose_tissue and liver_spleen_pancreas are 3D methods so require DICOM series. Let me know if this doesn't fix your issue.
DICOM series likes this?
Or a whole study with multiple series like this?
Still the same error.