Hello everyone,
I need to calculate the Dice coefficient for my organs using Python code, independently from 3D Slicer. I have already written the code for calculating this coefficient and posted it at the following link:
“https://discourse.itk.org/t/dice-coefficient-calculation-in-python/7628/2”
under the title “Dice Coefficient Calculation in Python”.
As I mentioned there, the Dice coefficient value calculated by my code is different from the value obtained by 3D Slicer.
Following up on that discussion, I would like to add the following question:
Could you please explain in detail the algorithm that Slicer (or SlicerRT) uses to convert RTSTRUCT contour data into a binary labelmap mask? Specifically, does it perform slice-by-slice 2D polygon filling or true 3D volumetric rasterization? Does it apply any interpolation, hole filling, or other morphological operations? And how does it handle alignment between the contour points and the CT image grid (spacing, orientation, and origin)?
Thanks a lot