Influence of spacing on quality

Hello everyone,

I’m trying to reduce the spacing using cropped volume in order to create very thin walls with a uniform thickness, but the spacing of the cropped volume is again at 0.2826 mm. So it makes no difference whether I use cropped volume or not.
With a required wall thickness of 0.2 mm, the spacing of ± 0.2826mm is much too high.

I can adjust the oversampling factor, but I ask myself, why wasn’t the spacing already reduced with Cropped Volume?

My main problem is the high loss of quality and that everything runs very jerkily. The program often crashes completely despite 64 GB of RAM. When I try to smooth it out with Smoothing / Median the process takes infinitely and unacceptably long.

Many thanks for your help

Yours sincerely

spacing still high


Once the segmentation geometry is established, changing the master volume does not make any difference (it was just used to determine the geometry at the beginning).

You have many options, I think I described a n previous posts already, but let’s summarize them again:

A. Not use so thin vessel walls. You cannot print a vessel with 0.2mm wall thickness, as it will crumble. Usually you either need accurate inner or outer diameter, but not both, so you can use a thicker wall. Patient-specific material properties are never known, therefore there it is not a problem that you don’t reproduce the wall thickness accurately. Thin vessel walls and leaflets are commonly reproduced by painting thin silicon layer on solid parts, as current 3D printing materials are still very far from properties of real vessels and soft tissues. FEM analysis if thib structures is often more robust if you use shell elements instead of volumetric elements. So, overall, there is a very high chance ghat you don’t actually need extremely thin walls.

B. Use binary labelmap representation. Use just small enough voxels and crop the volume to minimum size. You can do the vessel segmentation at coarser resolution and oversample only for the final hollowing operation. Buy lots of RAM to keep things fast or just be patient, as all operations are slow on extremely large volumes.

C. Create hollow model in closed surface representation. You can represent arbitrarily thin walls in a surface mesh, without significant memory increase (just need about 2x more cells to have a double walls). The difficulty is of course how to make a mesh hollow. A common technique is to create an offset surface using the mesh normal. This typically generates invalid (self-intersecting) meshes, but if the wall is very thin then these errors may be negligible or relatively easily fixable

Hello Mr. Lasso,

I understood your explanation of point C as shown in the attached video.
However, I do not know whether spacing was used here and whether the wall thickness is the same everywhere.

The video above shows option B.

Option C can be implemented in a few lines of Python code using VTK filters.

Hello Mr. Lasso,

Thank you for putting so much effort into my questions. However, I have to admit that I do not currently have an overview of the individual processes and their specific properties / differences.

  1. In the posted video I had inserted the STL file and created the wall. ---- > Binary label map.

  2. Another method I know is the Crop Volume. This reduces the size of the image.

  3. From the third method, I don’t know the name, but only the symbol image , which looks like a cube. With this method I can increase the oversampling factor and thus adjust the spacing.

I would like to know which of the three methods mentioned above is the best way to solve my problem.


even wall
Quality of surface properties

I’m sure you have a suitable solution for me.

In most cases option A or B works best, as it is robust and allows easy editing of the shell.

If you need extremely thin walls then option C may be the best because option B would require too much memory and while option C is generally unreliable, it works acceptably well for thin shells. You can get a shell model of a segment as shown in this example. You need to then cut off the caps, for example using “Plane cut” tool of Dynamic modeler module:

Based on what you describe, option C seems to be the most suitable solution for your particular use case.

Dear Mr. Lasso,

I really like the Dynamic Modeler module for displaying the cutting planes.

I assume that by option C you mean creating a hollow model in a closed surface representation.

This option C is unfortunately not known to me.

You said it can be done with VTK filters and a few lines of phyton.

Unfortunately, I have no experience with programming languages and have not yet worked with the VTK filter.

My work now hangs only on this problem, which is why I would be very grateful for a detailed explanation.

I gave a complete solution in my post above. You just need to copy those few lines of code into the Python console and you are done.

I also created a GUI for this (as a new “Hollow” tool in Dynamic modeler), which will be available in the Slicer Preview Release tomorrow.

Dear Mr. Lasso,

I have inserted the codes from the above post one by one into the “Phyton Interactive”, however, nothing has changed in my segmented vessel model. I only used Scissors and Smoothing and wanted to do the Hollow with the help of the Phyton codes.

The following codes were added:

Will it be possible to use the new GUI in the stable 3D slicer version? In my work I only want to include functions that can be used in the stable version.

I also tried to reproduce their illustration/screenshot from the Dynamic modeler module with plane cut on a simplified model, unfortunately I was not able to create a cut plane.

To use the code snippet, you need to replace the example node name (Segmentation) and segment ID (Segment_1) with you actual node name and segment ID.

New features are not added to stable releases, so you’ll need to use a preview release. You can pick any preview release and keep using that, thereby it can serve as your own “stable release”.

Hello Mr. Lasso,

In the attachment I send you a photo of the attempt to apply the Phyton code, but nothing changes. The example node name and segment ID would actually have to match the template. ( see photo)

What’s the mistake?



It looks good except you missed the last two lines of the script.

I’ve added the last two lines from the script and it also forms a gold-colored vessel wall, but it still doesn’t work.


That’s it, that yellow model is the result. If you clip it or enable 2D visibility then you will see that it is a thin shell.

In the 2D visibility the shell of 3. 0mm is not shown to me. Hiding out the internal segmentation does not help either.

You need to enable 2D visibility for the model (the yellow object) that you created. You can show it by right-clicking on the model node’s eye icon in Data module (and you have access to many more visibility options in the Models module).

I have right-clicked on Model and clicked on Convert model to segmentation node, but I can’t cut with the scissors

Yo don’t convert this thin-shell model to segmentation node. You cannot represent this thin smooth shell as a binary labelmap. If you could, then you would have chosen option B. Instead, you need to do the conversion to shell as a very last step of the segment editing. After that, you can only edit the model, using Dynamic modeler, Surface toolbox, and other modules that operate on surface meshes. You can also edit meshes in external software, such as MeshMixer (easy to learn) or Blender (it is the 3D Slicer equivalent of 3D modeling - very powerful and very hard to learn).

Hello Mr. Lasso,

after I had inserted the Python codes from your script, the yellow model got. I have hidden the inside of the model and obtained the desired image in the 2-D representation. Now it’s time to cut the ends. Which module is the best way to do this? I would like to know how to save the hollow body as STL file. In the appendix I have added screenshots to my questions.

Dynamic modeler - see above.