Hi, I’m using the Baffle Planner module to close out several areas of the pharyngoesophageal junction and the laryngo-tracheal transition area for a canine tracheotomy simulator.
I do have the smoothing function checked on at 0.50.
Saving and reopening the file as well as using the scissors command gives me a “bricked – appearance”.
• I exported one version as an STL which had slightly irregular closeouts after using the Logical Operations to subtract the “Head from the Baffle”.
• I then decided to try using the module again but used the Flatten tab to reduce the waviness of the closeouts. After saving/reopening the labelmap had a bricked- a
• Also, If I try and use Scissors to trim a portion of the model, the model takes on a bricked appearance immediately. If I hit Ctrl Z the surface appears normal and the bricked appearance disappears.
• I’ve started over with the original smooth surface and it looks good but after saving and then reopening the file, it opens into the bricked - appearance.
• I also have several errors in the Error Log which show the CMYK file in error mode.
Blocky appearance should not be an issue. It just reflects that segmentation (especially when it is being edited) is represented using binary labelmap (discrete samples on a regular grid). When you generate a surface representation then smoothing is applied automatically.
If you find that the binary labelmap’s resolution is not sufficient to preserve all important details then you can either increase the resolution or avoid conversion to segmentation (and edit the model using Dynamic modeler module and combine it with other models using Sandbox extension’s Combine models module)
Flattening is not for smoothing but for creating a cutting template for fabric, etc.
Thanks Andras for your response. I was able to get a good model by using the Baffle Planner, then going between Models and Combine Models. The bricked/layer appearance did not change when exporting to an STL. It still appeared bricked in the STL and created an enormous STL file. Something is amiss with my labelmaps.
I would vote to add more parametric modeling functions to the Dynamic modeler to work with meshes. Such as being able to project holes at specific depths to match locator pins. I can bring in an STL of a locator pin but how do you create the hole at a specific depth to match the locator pin?
Th mesh in the Rhino screenshot does not look correct. The staircases are normally removed by the mesh smoothing built into the segmentation’s binary labelmap → closed surface representation conversion. How did you create the mesh? If you load it into Slicer, ParaView, etc. then does the surface appear smooth?
Note that CAD software usually cannot work with free-form meshes (such as those created from medical images): maximum number of points that CAD software can handle is typically about 10k, while free-form meshes can easily have 100k or even millions of points. We have been waiting for CAD software to be improved but after seeing that nothing has changed in this regard in the last decade, we decided to create the Dynamic Modeler module, which allows parametric editing of free-form meshes.
We are still in the phase of adding more tools and adding one that can place a cylindrical hole orthogonal to a surface at selected positions would not be too hard. You can submit a feature request describing the desired functionality in detail, accompanied by a few drawings or annotated screenshots.
Until the specialized tool is added you can achieve this by designating the pin position and orientation by placing a plane on the surface using Markups module, creating a cylinder model (using
Create models module of SlicerIGT extension), then copy-pasting this script into the Python console:
plane = getNode('P')
cylinderModel = getNode("CylinderModel")
transformNode = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLTransformNode")
cylinderToWorld = vtk.vtkMatrix4x4()
Cylinder model positioned with the plane:
Cylinder model subtracted from the object:
Hi Andras, Sorry for the slow response.
1.I was dragging/dropping a STL as a segmentation/ Go to Data/right click on segment/Export visible segments to binary labelmap
2.Go to segment editor/Select Master volume/Get message saying Change master representation to binary Labelmap/ YES
3.Go to Baffle Planner/Start on bottom of model? Do (2) bottom baffles
4.Input Curve: Create new closed curve
5.Baffle model: Create new model
6.Skip: Refining with 3 pts- want surface flat
7.Specify Thickness: 5mm
8.Data: Add model to the segmentation drag & Drop/Hide model
9.Segment editor: Logical Operation/Baffle chosen in Segment list/Modifier segment is Head/Subtract
10.Skip Smoothing: Crashes file every time.
11.Then decide to cut off windpipe from Thyroid to do last baffle:
12.Use Scissors/Erase Inside/Rectangle/Unlimited
Model churns for a few minutes and eventually surface appearance turns brick
Maintains same appearance when converting to an STL.
**If I do steps 1-2 and then go to Scissors/Erase Inside/Rectangle/Unlimited to cut off the unwanted section first and proceed with the other steps the model comes out fine. When I export it as a STL it looks good.
I will submit a request in GitHub for additional parametric features in the Dynamic Modeler. Additional parametric features with the Dynamic Modeler are sorely needed. This trachea segmentation started in 3D Slicer from a CT to be made into a tracheotomy simulator. It was brought into Rhino v6 to cut off the trachea as a separate part that was to made with pins to make it replaceable/3d printed and made into a silicone mold to make duplicates. Since I could not put holes in a mesh to align with other components I went to Rhino to create a parametric file from the mesh. I created contours of the inner mesh and lofted the contour curves to create a surface. I then projected a closed curve where I wanted to make holes/pins to a to align with other components. For 3d printing the trachea I had to convert the surface file to a mesh and join it to the trachea mesh. The initial concept of the dogs head to show our client was to CNC it from soft urethane foam. Getting a parametric file to CNC from a mesh is a major problem. For production we will 3d print molds and cast the heads.
I think your suggestion to create cylinder models (using Create models module of SlicerIGT extension) may be a fix to create pins to align components. I’ll let you know how it goes.
Success creating pins and thru holes for replaceable trachea.
Looks very nice, thanks for the updates!