Segmented, exported surfaces overlap (unexpected)

This is interesting because for me this problem is not just extremely hard but actually seems impossible to solve. When multiple segments meet at a sharp corner then you cannot make the surface of every segment smooth without introducing gaps or overlaps between segments.

Isosurfaces without smoothing:

Smoothing causes overlap and gap, which could be reduced by joint smoothing, but could not be fully eliminated (unless you accept to have larger gap or sharp edges in some segments):

Slicer’s Model Maker has been always using vtkWindowedSincPolyDataFilter for joint smoothing (since the very first commit in 2006). I don’t think cuberille isosurfacing has ever been implemented in VTK or used in Slicer. For labelmaps with multiple labels it is not useful anyway (as the isosurface in a labelmap image is not smooth).

I remember it was working before but I can confirm that no surface, only points are visible in Slicer-5.6.1. @Sunderlandkyl could you have a look?

I’ve updated this issue that tracks the status of this feature:

2 Likes

Yes, places where more than two segments touch would need to be handled as a special case where sharper edges would need to be allowed. It’s not clear to me that forbidding sharp edges but allowing introduction of overlaps and gaps is a better solution than enforcing mating surfaces but allowing sharp edges. Looking at the documentation for vtkWindowedSincPolyDataFilter, it seems like it has some ability to treat certain edges as special (internal FeatureEdges or external BoundaryEdges) and subject to different smoothing rules. Again, I’m quite ignorant of how these things really work, but if I were trying to conceptually design how I think it could work, I would maybe first extract any 1D chains of edges which are shared more than 2 segments, and smooth each of those first. Next, contiguous 2D surfaces which are shared by 2 segments could be identified. The outer edge boundaries of those surfaces (where the interface contacts non-segment voxels) could be smoothed next, and then the interiors of those surfaces, holding the outer boundary edges constant. Lastly, the rest of the segment boundaries can be smoothed as currently, with the only difference that the interface surfaces can not be moved. Maybe there are issues I’m not thinking of which would make such a scheme unworkable, but it seems plausible to me.

Yes, Bill must have been referring to an algorithm that never made it into the main codebase - he talked about having a multi-label Cuberille approach that took all touching segments into account when doing the smoothing, along the lines @mikebind describes. It doesn’t matter too much for visualization, which is probably why they ended up doing the windowed sinc a approach, but his motivation was watertight 3D printing.

3 Likes

Hi everyone!

There was this thread on the VTK Discourse on the smoothing using the newly integrated vtkSurfaceNets3D method : New Isocontouring filter for discrete, labled volumetric data: vtkSurfaceNets3D - #11 by will.schroeder - Development - VTK

From my understanding, both the joint smoothing option and separate smoothing options should be possible using this class.

Best,
Thibault

1 Like