Step effect on the exported STL models

Hi,

I have segmented the desired organs in a CT scan, and after applying a different type of smoothing such as median smoothing and joint smoothing I export the models as STL files. However, I see some “step effect” on the exported geometries. You can simply see this effect by disabling the surface smoothing in the show 3D module. Note that, some of the segmented geometries are watertight, so I need an approach that eliminates the undesired effect but keeps the geometries watertight (with no gap/overlapping). I really appreciate it if you could help me with this issue.

Thank you in advance for your help

Your source scan might be low resolution or the voxels aren’t isotropic (not cube shaped).
If this is the case you can try to resample the scan to a higher resolution and isotropic voxels using the Crop Volume module and then go through the segmentation and smoothing.

Hi Theodore,

Thank you for your reply. Would you please let me know which module shows the voxels’ dimension?

Regarding your suggestions, I have done all of them in my geometry reconstruction process. So first, I have cropped the volume with the checked isotropic option. Second, I have segmented the geometries, Third, I have resampled the segmentation in such a way that the spacing is half of the original one. Finally, I have applied the smoothing steps. I apply the resampling process after the segmentation due to the computational time and slow editing process. However, still, the exported geometries contain those patterns. Do you know if the smoothing surface is only used for visualization purposes or does it actually affect the exported models as well?

Best,
Tekya

The spacing is the voxel dimensions.

If I understood you correctly you are doing the following:

  1. crop+resample the volume (convert to isotropic voxels)
  2. create segmentation
  3. resample segmentation (upsample)
  4. smooth segmentation
  5. resample segmentation back (downsample)
  6. create and export models

I would suggest

  1. crop+resample the volume (convert to isotropic voxels and upsample)
  2. create and smooth segmentation
  3. create and export models

Surface smoothing is not just a display option, it actually changes the way your segmentation is represented as a 3D surface. So if you turn smoothing off and export the STL, you’ll have the little cubes that originate from the finite resolution of the master labelmap representation. If you enable smoothing and export to STL, then it will be smooth. There is no change in terms of “watertightness”, your surface will be closed.

In my case, the original scan contains a cube shape voxels.

Yes, I followed all steps in the order you mentioned from 1 to 6 expect the step5. Wouldn’t the downsampling of the segmentation cause a similar issue?

Regarding your suggested approach, I have a few questions:
1 - Should I complete the first step in the Crop Volume module by checking the isotropic option and interpolating option (scaling the spacing)?
2 - what is the difference between the space scaling in the crop volume module and the oversampling option in the below image? Is there any difference between these two approaches? if so, would you please explain them in detail?

image

3 - For exporting the segmentations as 3D models, should the segmentation and the scan have the same spacing? what would happen if I do not complete step 5? is it a must to do a thing? should they always match?

4 - As I mentioned, I have done the segmentation step (steps 1 through 4), and I am not planning to redo the segmentation as it is a time-consuming process. Do you have any other suggestions for my current stage?

Thanks

Hi,

Thanks for your reply. I recall that I had a penetration issue in my segmented geometries using the surface smoothing. However, I will check it once more and will let you know about the results. The amount of the penetrations were relatively small which I was thinking they are coming from marching cubes of flying edges algorithms while exporting the 3D models. Please correct me if I am wrong.

Can you elaborate on what you mean by penetration? Is it excessive smoothing at certain regions?

You can adjust the amount of smoothing using the Smoothing factor slider in the drop-down menu that appears if you click the small arrow next to Show 3D.

See this Segment Editor FAQ for instructions on how to avoid staircase artifacts and overlap (penetration) between segments.