3D label map and the 3D view of segmentation mismatch

Hi all,
I am trying to do segmentation using MRI data. After completing the segmentation I saved it as a label map to view it as voxels instead of tetrahedral meshes. The problem is there are small holes at the bottom of the segmentation (missing voxels) when I visualize the segmentation in Paraview. However, in the 3D view of the segmentation in slicer there are no holes and it’s a closed contour. So, I have the following questions:

  1. Why is this happening?
  2. Can I render the 3D view in slicer as voxels instead of tetrahedrons? Or if I can do the segmentation using rectangular meshes instead of tetrahedral mesh?

I am using Slicer 4.10.2

You could try going to the “Show 3d” button which is found toward the top of the segment editor module. There is a drop down arrow next to the button, click this and untick surface smoothing. You should now be able to visualise the voxels in the 3d view.

1 Like

Segmentations and Segment Editor modules do not generate tetrahedral meshes. You can convert segmentations to tetrahedral meshes using SegmentMesher extension.

Do you see small holes in an exported surface mesh? How did you create the mesh and how did you save it? (I would recommend to use Export to files feature)

Slicer Preview Release is stable and contains many fixes and improvements compared to the Stable Release, so if you encounter any problems, try if the preview release works better.

Yes. I have done that. But when I export it out as a binary labelmap I see some missing pixels in the bottom which cannot be seen on the 3D model. I am attaching an image to clarify what I am talking about.


On the left is the segmentation loaded as a .obj file and on the right the binary labelmap saved as .vtk and visualized in paraview. Please note that the 3D model generated inside slicer 3D corroborates to the exported .obj model.

I am sorry if I was unclear before or if I did not word it correctly. My goal is not to create a tetrahedral mesh. Rather I want to import it out as a binary labelmap and visualize it as voxelized 3D model. I am able to do that. But the issue is that the model generated inside 3D slicer and the binary labelmap do not match exactly. I am wondering if that is because slicer 3D uses tetrahedrons as elements for 3D models and when these tetrahedrons are converted to cubes I am losing some data. I am attaching an image for clarification:


The left one is the .obj file of the segmentation. If you notice carefully, I used the cell selection tool of Paraview to mark couple cells on the left image. These cells are all triangular/tetrahedrons. Also in the right image you can see the missing voxels/holes I am talking about.

I will try this and see if this yields better results.

It seems like Paraview struggles with correctly displaying binary image data. You can report the error to Paraview developers. In general, Paraview is great for mesh visualization and processing but extremely limited and not very robust for image data.

Normally you would not want them to match exactly but to reconstruct a surface mesh that matches the real shape of the objects (without staircase artifacts. If you turn of smoothing as @juicy suggested above then you’ll have exact match.