Hello Dear Developers and Users
Sorry for asking my question again. In the question I asked titled “Is it better to integrate settings from Module B into Module A for improved user workflow (or user convenience)?” in the Development Category, I was trying to run the Isodose module through the Python Interactor in such a way that an Isodose surface for 47.00 Gy would be generated. The commands are as follows:
# Get the dose volume node by class and name
doseVolumeNode = slicer.util.getFirstNodeByClassByName('vtkMRMLScalarVolumeNode', '2: RTDOSE: DOSIsoft:RTDOSE:Phase #1 Dosi Dosi 1: Beam setup 1 (GY) [11]: Beam setup 1')
# Create a new Isodose node instance for displaying isodose surfaces
object_vtkMRMLIsodoseNode = slicer.vtkMRMLIsodoseNode().CreateNodeInstance()
# Set the scene for the isodose node to match the dose volume node's scene
object_vtkMRMLIsodoseNode.SetScene(doseVolumeNode.GetScene())
# Set the dose units to Gray (Gy)
object_vtkMRMLIsodoseNode.SetDoseUnits(slicer.vtkMRMLIsodoseNode.Gy)
# Set the reference dose value (in Gy) for isodose levels
object_vtkMRMLIsodoseNode.SetReferenceDoseValue(47.00)
# Observe the dose volume node to track its changes
object_vtkMRMLIsodoseNode.SetAndObserveDoseVolumeNode(doseVolumeNode)
# Setup the color table for the isodose node based on the dose volume
slicer.modules.isodose.logic().SetupColorTableNodeForDoseVolumeNode(doseVolumeNode)
#slicer.util.getModuleLogic('Isodose').SetupColorTableNodeForDoseVolumeNode(doseVolumeNode)
# Create isodose surfaces based on the configured isodose node
slicer.modules.isodose.logic().CreateIsodoseSurfaces(object_vtkMRMLIsodoseNode)
The result of running these commands can be seen in the image below.
As seen in this image, contrary to my expectation, where only the Isodose surface for the 47.00 Gy dose should have been generated, Isodose surfaces for the 5, 10, 15, 20, 25, and 30 Gy doses have also been generated.
Please guide me on what mistake might be in my commands that caused the Isodose surface for the 47.00 Gy dose not to be generated.
Best regards.
Shahrokh