Hi;
I am trying to develop a python script in order to import spectroscopy and metabolite data. However when I import the dicom file with SlicerRT structures, I have got an error “DICOM Plugin failed: Dataset does not have attribute ‘ImageType’.”
here is the code :
filePath = file[0]
ds = dicom.read_file(filePath,stop_before_pixels=True)
if ds.ImageType[2] == ‘SPECTROSCOPY’:
#Only a single file when we talk about spectrosopy files
result = []
loadable = DICOMLoadable()
loadable.files = [filePath]
loadable.name = ‘Donnes Spectrophotometriques’
loadable.tooltip = ‘Siemens’
loadable.confidence = 0.95
loadable.selected = True
result.append(loadable)
return result
when I import spectroscopy data in slicer with dicom diles (not DICOM RT), the spectroscopy data displayed without any error.
Can you tell me why the script does not work when import it with DicomRt files
thank’s in advance