Generating Surface model from volume model in 3DSlicer

Hi again,

Following up on the volume fix of the Tympanic membrane model. So I want to extract it (Tympanic membrane) as a surface only and not as a volume. I want to model it as a shell structure.

Kind regards,


Segment Editor can only create volumetric segmentation, represented by labelmap or closed surface. In general, this matches reality well (because everything is volumetric in real life).

However, if you want to create abstract models, such as a truly infinitely thin membrane, then you need to use other tools, too.

Probably the simplest solution would be to export the closed surface mesh and edit it (keep only front/back side, fill holes, smooth, etc.) in a mesh modeler, such as Blender or MeshMixer.

In the past, other students who worked on this project inquired about this to you. In response, you shared with them a python script which I have attached to this post, and I had also previously referred to in the posting prior to this concerning medical alignment. However I am running into an error as mentioned in the previous posting.

I should note that we do not want to do this necessarily with segment editor.

Python Script:

volumeNode = getNode('Name of TMlabelmap i.e. SUSAN_SEGMENTATION_R43.nii.nii.nii')
pointFromVolume = vtk.vtkImageDataGeometryFilter()
threshold = vtk.vtkThresholdPoints()
reconstructSurface = vtk.vtkDelaunay2D()
reconstructSurface.SetInputConnection(threshold.GetOutputPort()) reconstructSurface.SetProjectionPlaneMode(vtk.VTK_BEST_FITTING_PLANE)
smoothSurface = vtk.vtkWindowedSincPolyDataFilter()
modelsLogic = slicer.modules.models.logic()
modelNode = modelsLogic.AddModel(smoothSurface.GetOutputPort())

Error message:

1 Like

In Python, string literals must be enclosed in parentheses. Change getNode(SUSAN...nrrd) to getNode("SUSAN...nrrd").

1 Like