How do i smooth the shape of a structure?

How do i smooth the shape of a structure? I have imported a sphere from brainlab iplan rt to 3D slicer so i can calculate the surface area. But for a specific radius, in 3D slicer the surface area is bigger than the theoretical calculation of a surface area using the formula 4pir^2. It is because the sphere imported is not a perfect sphere. So how do i smooth the surface?

Have you imported the sphere from DICOM RT structure set?
How have you computed the surface area?
How large is the error relative to the total volume?
Can you attach a screenshot?

The sphere is imported from DICOM RT structure.
The surface area is computed when i did segmentation and exported the structure to models, i went to the models’ module and clicked on the information. The volume had a difference of 0.3 cm^3 from the theoretical and the one computed in iplan RT, which we can say is acceptable.
However, the surface area had a difference of 10 cm^2 because as i said the sphere is not a perfect sphere, i’ll attach a screenshot of the sphere

So i need a method to transform this sphere to a circular form and not small adjacent segments like in the photo, because this is I guess why the surface area is different.

This is a screenshot of the difference of calculations, this sphere is imported from iplan rt

I’ve done a quick test and the surface computation in Slicer seems to be accurate - well below 1%.

  • download a sample head MRI data set
  • create sphere shaped segment of 20mm radius
  • compute surface and volume => Surface area: 5024.96 (error: -0.03%), Volume: 33489.18 (error: -0.06%)
  • rasterize it with on a volume’s voxel grid
  • compute surface and volume => Surface area: 5042.75 (error: 0.32%), Volume: 33631.30 (error: 0.36%)

You can find the script here: This example shows how to compute volume and surface area of a segment in 3D Slicer · GitHub
You can click on “Raw” view and copy-paste the code into Slicer’s Python console.

image

Try using Segment Statistics module to compute surface, volume, and other segment properties. It uses the same algorithms as the models module, but Segment Statistics does everything directly on the segmentation node (less chance to mess things up by performing manual steps) and computes properties for both closed surface and labelmap representations.

You may adjust smoothing factor of the closed surface representation (in Segmentations module: Representations / Close surface / Update / Binary labelmap → Closed surface / Smoothing factor) to make the surface smoother, but the default setting should work well.

If you still have problems, then upload the RTSTRUCT DICOM file somewhere and post the link here so that we can investigate.

The sphere created inside the 3d slicer compute the volume and surface area correctly. But i’m talking about the sphere created in iplan RT and imported to a dicom RT structure and opened in 3d Slicer. Here i found the screenshots uploaded above, and the big difference in surface area.

Regarding the Segment statistics modle, when i try to update from binary labelmap so i can use the smoothing factor on my RT structure sphere, the software crashes and i can’t do anything until i close it and open it again. So i can’t use the effects of Segment editor module on my dicom RT Structure.

These should never happen and most likely there is just caused by some trivial issue that is easy to fix.

Could you share the DICOM RTSTRUCT and image file (upload to Dropbox/OneDrive/Google drive and copy the link here)?

Could you send the application log? After you restart Slicer, select in menu: Help / Report a bug, and select the previous session in the listbox, then copy the text. If the text is long then upload somewhere and copy the link here.

By the way, BrainLab can also export segmentation as DICOM segmentation object, which is a more exact representation of segmentation than the legacy RTSTRUCT object. @fedorov, @pieper do you know how to export DICOM segment object from BrainLab?

@lassoan I personally never used Brainlab, and I don’t have access to a system to try it myself, so I can’t answer that question. But if @Jana.az could let me know the name of the specific product (Brainlab has different products) and the version, I can ask someone at Brainlab who might be able to help.

1 Like