dcmrtstruct2nii
dcmrtstruct2nii copied to clipboard
IndexError: index out of range
Hi again,
I also got this error for some files now (unrelated to memory consumption):
Traceback (most recent call last):
File "/gris/gris-f/homelv/me/anaconda3/envs/pytorch/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/gris/gris-f/homelv/me/anaconda3/envs/pytorch/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "mintLesion2Nifty.py", line 49, in convert_single
convert_data(single_data_dir, single_save_dir)
File "mintLesion2Nifty.py", line 57, in convert_data
dcmrtstruct2nii(rtss_file, image_slice_dir, save_dir)
File "/gris/gris-f/homelv/me/anaconda3/envs/pytorch/lib/python3.8/site-packages/dcmrtstruct2nii/facade/dcmrtstruct2nii.py", line 66, in dcmrtstruct2nii
rtstructs = rtreader.ingest(rtstruct_file)
File "/gris/gris-f/homelv/me/anaconda3/envs/pytorch/lib/python3.8/site-packages/dcmrtstruct2nii/adapters/input/contours/rtstructinputadapter.py", line 62, in ingest
'z': ([contour.ContourData[index + 2] for index in range(0, len(contour.ContourData), 3)] if hasattr(contour, 'ContourData') else None) # this is just a fancy way to separate x, y, z from the rtstruct point array
File "/gris/gris-f/homelv/me/anaconda3/envs/pytorch/lib/python3.8/site-packages/dcmrtstruct2nii/adapters/input/contours/rtstructinputadapter.py", line 62, in <listcomp>
'z': ([contour.ContourData[index + 2] for index in range(0, len(contour.ContourData), 3)] if hasattr(contour, 'ContourData') else None) # this is just a fancy way to separate x, y, z from the rtstruct point array
IndexError: index out of range
I would guess it has something to do with contours (the mask)?
Best Karol