I’m trying to generate a SPHARM-PDM mesh from a .stl file. I imported the .stl and used “Mesh to Label Map” to obtain the .nrrd. However, the .nrrd is inverted (the white space are supposed to be black and vice versa). This inversion caused the final SPHARM-PDM mesh to be a rectangular box with a hole inside with the shape of my original mesh. How do I get my current procedure to work correctly?
Original mesh + generated label mesh:
Final SPHARM-PDM mesh:
Probably “Mesh to label map” module does not know what is inside/outside because the model is not fully enclosed by the output image. You may also try the very similar “Model to Labelmap” module in Slicer core.
If you want a method that is simple and works more robustly then convert the model to segmentation (by right-clicking on the model in Data module), and then export the segmentation to binary labelmap (by right-clicking on the segmentation in Data module).
You can fine-tune conversion parameters in segmentation module (resolution, smoothing, decimation) if the default quality is not sufficient.
The “convert the model to segmentation” then “export the segmentation to binary labelmap” method works very well. Thank you for the help.