I am trying to use OpenDose3D to analyse the results of dose images from monte carlo simulations which are in the format .mhd.
From what I understood by the documentation, OpenDose3D is only able to perform the dose analysis of images in the dicom format. I found an old discussion where the author had the results also in metaimage and was asking advice on how to convert to dicom: Convert .mhd dose volume to RTDose file and export
I followed the video in the solution, however, OpenDose3D isn’t able to perform the analysis when I give the dicom files created. I get this error message:
Traceback (most recent call last):
File "/home/administrator/Slicer-5.8.0/slicer.org/Extensions-33216/OpenDose3D/lib/Slicer-5.8/qt-scripted-modules/OpenDose3D.py", line 1811, in onInitialButton
self.getInitialTimeDataFromDICOM()
File "/home/administrator/Slicer-5.8.0/slicer.org/Extensions-33216/OpenDose3D/lib/Slicer-5.8/qt-scripted-modules/OpenDose3D.py", line 1937, in getInitialTimeDataFromDICOM
node = NodeDICOM(volumeNodeID, default_isotope="", default_activity=-1)
File "/home/administrator/Slicer-5.8.0/slicer.org/Extensions-33216/OpenDose3D/lib/Slicer-5.8/qt-scripted-modules/Logic/NodeDICOM.py", line 27, in __init__
self.setAttributes(default_isotope, default_activity)
File "/home/administrator/Slicer-5.8.0/slicer.org/Extensions-33216/OpenDose3D/lib/Slicer-5.8/qt-scripted-modules/Logic/NodeDICOM.py", line 80, in setAttributes
self.setAcquisition()
File "/home/administrator/Slicer-5.8.0/slicer.org/Extensions-33216/OpenDose3D/lib/Slicer-5.8/qt-scripted-modules/Logic/NodeDICOM.py", line 268, in setAcquisition
raise DICOMError(f"Attribute '{Attributes().acquisition}' is empty")
Logic.errors.DICOMError
[Python] Failed to read DICOM attribute 'DICOM.Acquisition.Date'
[Python] Attribute 'DICOM.Acquisition.Date' is empty
Another aspect I would like to understand about OpenDose3D is this: it says its able to analyse dose images resulted from monte carlo simulation from GATE. It even is able to create the macro to run. However, I am not able to upload my simulation image results to the program and for it to simply do the analysis.
I would really appreciate if anyone could give insights on how I could use openDose3D for my situation.
I’m not very familiar with OpenDose3D, so I hope someone with more experience can comment on your second question.
But from what I understand of the process, having the correct dicom headers is essential for the calculations, so making sure your dicom files exactly conform to the module’s expectations is key. I would think the Acquisition Date is one of those variables that’s needed to perform the dose calculations. You probably need to specify it when you export mha to dicom.
Thank you for the suggestion. However, I did that, but I still get the same error. I don’t now if I am converting the mhd image correctly to dicom. This is its format:
OpenDose can create Gate macro from the mrmlscene that was created with the patient’s Dicom files. Once the simulation has run, one can get the simulated dose rate images into the dosimetry workflow as you would have gotten from the “normal” algorithms local deposition or kernel dose.
So basically, you cannot import doserate map without processing the upfront part of the workflow.
Thank you for the explanation, I understand it better.
So I have the ct and pet image I used for the monte carlo simulations but they aren’t in dicom, they are in .nii. How would I be able to pass them to dicom so that opendose3d can do it’s analysis and i can try using monte carlo gate there?
Hi,
Sorry for my late reply.
I am not sure that it would be so easy. The best I can think of would be to create dicom files from your CT/PET nifti files (some tools already exist but I did not try them myself). Alternatively, you use real CT/PET images that are present in the OpenDose3D ressources directory and try to substitute the image part with your nifty … Obviously, you have to change some dicom attributes to fit with your own files (pixel size, radiopharmaceutical injection date, etc.)… A lot of tries and errors in perspective
Once this is done, you have to process the regular OpenDose3D workflow up to the dose deposition calculation where you select the MC algorithm. Look at the generated gate scripts to look for what is the expected output format (normally nrrd files if I remember correctly) for the dosemap output. If you are able to change the gate’s output file with yours, then you should be able to continue the OpenDose3D process…
As you can imagine, this is a lot of work …with no guarantee of success
Best regards
Ludovic