I’m trying to extract ROIs from Dicom files and convert the coordinates from mm in the patient coordinate system to a pixel indexes on the CT 3D array. The ROIs are saved in their own dicom files, and were drawn on the CT scan.
I haven’t been able to locate a code example on how to this. Can someone help me with an example?
So far I have tried:
reader = sitk.ImageSeriesReader() reader.SetFileNames([PathToDicomFileWithROIs])
roi = reader.Execute()
But it throws the error:
RuntimeError: Exception thrown in SimpleITK ImageSeriesReader_Execute: ../../Code/IO/src/sitkImageReaderBase.cxx:107: sitk::ERROR: Unable to determine ImageIO reader for <PathToDicomFileWithROIs>