How to keep continuity when surface smoothing

When i smooth the pulmonary artery, i find that the vessel continuity had beed destoryed sharply. Like this:
Also i find this happend in Mimics when i set the prefer to accuracy, while the default value is continuity, which make no continutity destoryed. How can i do this in Slicer? Any simple way to change the quality for smoothing?

Sorry, I forget add some instructions. Here is the different 3D Reconstruction in Mimics with two option.
Reconstruction options:

Option: accuracy

Option: continutiy

Can you help me with this? @lassoan

I have tried the source code about smoothing label in Slicer Preview, but it doesn’t work while the speed is faster.

I’ve searched on the web about what Mimics means by Continuity vs Accuracy and found the description here. In short, these parameters control “matrix reduction” i.e., image downsampling. I would not recommend to use “continuity” mode ever.

In Slicer, the simplest, most transparent way of adjusting sampling distance is in Crop volume module. You can choose the spacing scale value to upsample (scale<1.0) or downsample (scale>1.0) and force isotropic spacing. In general, I would recommend to force isotropic spacing because many image processing operations work better if voxels are approximately cubic shape. Downsampling should be avoided, as it may remove relevant details and make measurements less accurate. If there are small details that you cannot represent at the native image resolution then you can fix the problem by upsampling the image. Upsampling can increase memory need and computation time by magnitudes, therefore it often makes sense to combine it with cropping the image to minimum size (that’s why all these features are implemented in one module).

With a croppping and resampling the module with a isotropic spacing and well-chosen scaling factor the vasculature will look perfect. You can also adjust smoothing factor to fine-tune appearance. If you prefer to optimize for visual appearance rather than accuracy then you can also apply Smoothing or Margin effects in Segment Editor to make the vessels thicker.

Which module or feature do you mean exactly?

Exactly, i have tried code in Slicer/LabelMapSmoothing.cxx at master · Slicer/Slicer · GitHub and Slicer/vtkClosedSurfaceToBinaryLabelmapConversionRule.cxx at 08789e8f2224f89206b2d6a49d1d452d4e677994 · Slicer/Slicer · GitHub

I have read the Mimics documentions here, i mentioned the “contour interpolation” and the “matrix reduction algorithm”, i want to know if there exist simility algrithm or function in Sliver or VTK to implement this, any demo?

“Contour interpolation” in Mimics → “Fill between slices” segment editor effect in Slicer.
“Matrix reduction algorithm” in Mimics → “Crop volume” and “Resample scalar/vector/dwi volume” module in Slicer.