Turn off all smoothing in segmentation

O.S. Win 10 - 64bit
Version: 4.8.1

Hi there,

We are willing to apply this software to segment the thalamus and need to correct segmentation errors on a pixel-by-pixel basis. For this reason, we need to abolish any possible type of smoothing on the source image. Is that by any means possible?

With very best wishes and many thanks in advance,

Leonardo

No smoothing is done on the segmentation (the edited labelmap, which is the master representation) without user intervention. The 3D model is smoothed, but it is only extra visualization. You can turn off model smoothing using the Set surface smoothing option under the arrow next to the Show 3D button in Segment Editor.

Also for the background image you can turn off interpolation to see the original voxel values (interpolation button shown here https://www.slicer.org/wiki/Documentation/4.8/SlicerApplication/MainApplicationGUI#Slice_Viewers)

In general, if it makes significant difference if a single voxel is inside/outside of a segment then it indicates that the data processing workflow is not optimal for segmentation. Most processing and visualization algorithms assume that the image resolution is much finer than size of details in the structures of interest - if you violate this assumption then you’ll get suboptimal results. Increasing image acquisition resolution is often not feasible, but it is not a problem: you can still resample your input volume (preferably to cubic voxel size) before you segment it to avoid problems associated with insufficient image resolution.

You can use Crop volume module to resample with smaller, cubic voxels (Isotropic spacing enabled, Spacing scale set to < 1, Interpolator set to B-spline) and crop to the region of interest (to make sure the output image will not get too big due to the smaller voxel size).

1 Like

Probably you are referring to the interpolation in slice view that is enabled by default.

In the volumes module, in the display tab, there is a check button “Interpolate” which you can deactivate.

Thank you for advice!

About this 3D surface smoothing; I know that when you export your 3D surface smoothed segment as a STL, the viewport smoothing is also applied on the final exported STL.
But what method is used for this smoothing? Which algorithm and settings do I have to use to perform the same smoothing on for instance a labelmap?
In other words; can exactly the same procedure be done afterwards and how?

Or is that a well kept secret? :wink:

I’m asking this because I’m trying to mimic a smoothing method that’s used by the applications ‘Mimics’ and ‘3D-Matic’ (both products of Materialise). It’s proprietary software, so they won’t let you how they do their thing. :zipper_mouth_face:

Smoothing is not actually applied when exporting. Whatever you have as closed surface representation, that is what is exported. If you disable smoothing when editing, then it won’t be smoothed.

Nothing is a secret in Slicer :slight_smile: Flying edges is used for smoothing. See usage here


and the method here
https://vtk.org/doc/nightly/html/classvtkDiscreteFlyingEdges3D.html (scroll down for the description)

Most of the smoothing is provided vtkWindowedSincPolyDataFilter applied on the flying edges output: