OpenDose3D to analyse monte carlo simulations results

Hi everyone,

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.

Thank you!

Greetings

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.

Hi,

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:

ObjectType = Image
NDims = 3
BinaryData = True
BinaryDataByteOrderMSB = False
CompressedData = False
TransformMatrix = -1 0 0 0 -1 0 0 0 1
Offset = 91.654799999999994 140.34999999999999 -140.18799999999999
CenterOfRotation = 0 0 0
ElementSpacing = 2.2100000381469727 2.2100000381469727 2.2100000381469727
DimSize = 125 122 93
AnatomicalOrientation = ???
ElementType = MET_FLOAT
ElementDataFile = DOSE_.raw

Do I have to convert the dose image to RTDOSE file first? Because when I do that the image looks very pixelated and weird.

Looks like you’ve filed an issue at the OpenDose3D gitlab, and that’s the right place to hopefully get your question resolved.

1 Like