Hi everyone
I exported DICOM RT Dose from the treatment planning system and I want to calculate the volume encompassed by each isodose (for example, isodose 20 Gy). I used the isodose module for this purpose, But I don’t know how to calculate the value of this volume. Can you guide me?
You can see the volume of closed surfaces in the Models module, however, in the latest version of the Isodose module, all the isodose surfaces are stored in the same model node (the isodose levels are identified by scalar values in the point data), so you’ll see the volume of the smallest dose (i.e. the largest region). You’ll need to separate the isodose level surfaces into different model nodes to see the surfaces of each.
It would be very useful if we could do either of these easily in Slicer
Split such a model node by scalar value
Import such a model node into a segmentation node, each scalar value into a different segment
Unfortunately, as far as I know, neither of these exist at the moment. What you can do is separate them with a little Python scripting.
I created a little sample snippet for you to start from.
import vtk
# Get your vtkPolyData
m = slicer.util.getNode('5: RTDOSE_IsodoseLevels')
polyData = m.GetPolyData()
# Create a vtkThreshold filter
threshold = vtk.vtkThreshold()
threshold.SetInputData(polyData)
# Define the scalar range for the first surface
threshold.ThresholdBetween(lower_value, upper_value)
threshold.Update()
# Extract the thresholded data
m0 = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLModelNode')
m0.SetAndObservePolyData(threshold.GetOutput())
m0.SetName('IsodoseLevel_X')
# Repeat for other scalar ranges
# ...