I’m a new user of VMTK, trying to read in a set of processed DICOM images with the command “vmtkimagereader -ifile C:\Users\Admin\Documents\s0.5-10\1 -f dicom”. When I do so, it produces the following error:
Traceback (most recent call last):
File “C:\Users\Admin\miniforge3\envs\vmtk\lib\site-packages\vmtk\pypeserver.py”, line 46, in RunPypeProcess
pipe.Execute()
File “C:\Users\Admin\miniforge3\envs\vmtk\lib\site-packages\vmtk\pype.py”, line 324, in Execute
scriptObject.Execute()
File “C:\Users\Admin\miniforge3\envs\vmtk\lib\site-packages\vmtk\vmtkimagereader.py”, line 266, in Execute
self.ReadITKIO()
File “C:\Users\Admin\miniforge3\envs\vmtk\lib\site-packages\vmtk\vmtkimagereader.py”, line 203, in ReadITKIO
matrix.GetElement(0,0), matrix.GetElement(0,1), matrix.GetElement(0,2), matrix.GetElement(0,3),
AttributeError: ‘NoneType’ object has no attribute ‘GetElement’
I’ve tried importing multiple different sets of DICOM images, both those I am working with and test datasets, on two different PCs (Windows 10/11), with both binary installation versions as well as through conda forge. Any help in resolving this issue would be greatly appreciated.
Just in case you have been tasked by doctors to press the juice from a DICOM series in one click, please consider it is impossible.
You may automate a lot of tasks if you use Slicer itself, that’s the way to go and it won’t ever be one-click-get-all.
Admittedly, your purpose may be something else and my comments are unrelated to your intent. Nevertheless, I still point out that it’s not fun playing with VMTK standalone.
Sorry don’t know anything about standalone VMTK. All I know, as @chir.set is alluded DICOM is a complicated format, and developers of Slicer has put a lot of effort into building a robust DICOM module that handles myriads of exceptions and oddities vendors provide.
Hope someone on the forum can help you with your question.
In noticing this I’ve discovered why I’m getting this error: in all cases either the directory I was working in began with a python escape character, or my images began with a number (causing the same effect). Adding an extra slash has prevented the error (though the image viewer now appears to be showing an entirely black volume).