Hello,
I need to make some measurements for bone tunnels.
Right now we are exporting a bone model to meshmixer, then we create a cilindre aligned on a defined axis inside the bone. We then manually increase the diameter until it extrudes the surface of the bone model.
I wanted to ask for some tips to make this process a little more automated. We need to measure 60 models and each with the cilindres at different angles.
Thank you.
Ricardo Vega
mau_igna_06
(Mauro I. Dominguez)
April 29, 2022, 5:48pm
2
Im my opinion this can be automated.
First you need to get the anatomical axis of the long bone. Look at this code to get an idea of something you could improve:
combineModelsLogic.process(surgicalGuideModel, cylindersModelsList[i], surgicalGuideModel, 'difference')
for i in range(len(sawBoxesModelsList)):
combineModelsLogic.process(surgicalGuideModel, sawBoxesModelsList[i], surgicalGuideModel, 'difference')
if surgicalGuideModel.GetPolyData().GetNumberOfPoints() == 0:
slicer.mrmlScene.RemoveNode(surgicalGuideModel)
slicer.util.errorDisplay("ERROR: Boolean operations to make mandible surgical failed")
def centerFibulaLine(self):
parameterNode = self.getParameterNode()
fibulaLine = parameterNode.GetNodeReference("fibulaLine")
fibulaModelNode = parameterNode.GetNodeReference("fibulaModelNode")
shNode = slicer.mrmlScene.GetSubjectHierarchyNode()
intersectionsFolder = shNode.CreateFolderItem(self.getParentFolderItemID(),"Intersections")
lineStartPos = np.zeros(3)
lineEndPos = np.zeros(3)
fibulaLine.GetNthControlPointPositionWorld(0, lineStartPos)
You can see my post about finding the anatomical axis also:
https://discourse.slicer.org/t/approximate-anatomical-axis-curve-of-long-bone/
Please let me know if you achieve it
Hope it helps
Mauro