-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First Mandible Surgical Guide Created #36
Conversation
…deBaseSelector to fibulaSurgicalGuideBaseSelector, makeBooleanOperationsToSurgicalGuideBase to makeBooleanOperationsToFibulaSurgicalGuideBase Create sawBoxes parameters spinBoxes Create buttons: createMandibleSurgicalGuidesBridgeModel, createSawBoxesFromFirstAndLastMandiblePlanes, makeBooleanOperationsToMandibleSurgicalGuideBase
…nality, and some helper functions, update the GUI and make clear what buttons are working
…seModel (and change the name of all variables that had the same problem) add makeBooleanOperationsToMandibleSurgicalGuideBaseButton and functionality. add mandibleBridgeModelSelector, mandibleSurgicalGuideBaseSelector, mandibleFiducialListSelector to the GUI edit bottons enabled on enter function rename createFiducialList to createFibulaCylindersFiducialList, define createCylindersFromFiducialListAndMandibleSurgicalGuideBase, createMandibleCylindersFiducialList functions give content to makeBooleanOperationsToMandibleSurgicalGuideBase function
Here is the workflow I developed to create the mandible surgical guides:
@cmfsx Can you check out this branch and try to do a full surgical plan? Thank you |
…ton, delete old corresponding buttons, correct onNodeAboutToBeRemovedEvent functions, SetSliceIntersectionVisibility(True) on created bone models, replace bone model for decimatedModels for visualization
…ePiecesAndTransformThemToMandible, time generateFibulaPlanesFibulaBonePiecesAndTransformThemToMandible function
Now all "Update fibula planes over fibula line; update fibula bone pieces and transform them to mandible" is done with one button. And visualization is done with decimatedMeshes.
What else would you like? |
@mauigna06 sorry for my inactivity in the last couple of weeks. I played around today with the Mandible-surgical-guide feature branch today. VSP component is now fantastic with real-time updates and there is nothing much to be improved in that. Fibula guide component. In this branch, i came across the same problem with mitter boxes been placed too close to the fibula. In the mandible guide component, without me doing any changes the last mitter box was created inside the mandible. Also, the default orientation of the mitter box was not good. How do we control the mitter box orientations? |
No problem Manjula
I suspect this problem is because fibulaSegment was not surfaceWrapSolidified because the algorithm has trouble positioning boxes when the fibula model mesh has holes inside. The mandible model should also be surfaceWrapSolidified. The first segment of each segmentation is used to create the bone models inside the module, so the surfaceWrapSolidifiedSegments should be the first segment in each segmentation.
Now the boxes in the mandible are called sawBoxes (to differenciate them from miterBoxes). The position and the orientation are calculated by the algorithm but the part of titanium plate should be a little far from the first and last mandible planes because the algorithm may get confused. Anyway, for this kind of problems always make an statement of what you wanted the module to do and what it did (like you did) and upload a complete example scene (without the scalar volumes). Please upload an example scene and I'll check it out |
@lassoan when should I ask you to review this branch? It's almost finished I only have to solve the bugs Manjula found |
You can mark as "ready for review" anytime you are done with your changes. |
With the centerFibulaLineButton and the makeAllMandiblePlanesRotateTogetherCheckBox in addition to all the previous GUI very exact Virtual Surgery Planning is possible. And I'm thinking on doing a frame for each fibulaSegment to make the cuts even more exact |
Now there is an option to make the planning as accurate as it's possible (I don't think there is space for more improvement after this). One frame is created for each fibula bone piece. |
…delete intersectionsForCentroidCalculationFolder
@cmfsx I found bugs on "Make all mandible planes rotate together" so don't use it to make the surgical planning. Thank you |
@cmfsx You can use "Make all mandible planes rotate together" I think it works well. Remember that to have perfect planning you need to click on "Automatic mandibular planes positioning for maximum bones contact area" after you finished the surgical plan to get the most out of the module. May be this button will be automatically executed in next versions. |
Hi @mauigna06
|
Hi @cmfsx. Thank you for working on this. I checked the file and there where a two problems with the scene that made the sawBoxes not position well:
All the visualization is made with decimated model because they are faster to process on the dynamicModelerModule which makes the resectedMandible and the fibulaBonePieces
If you find any more problems please check the above suggestions.
I have thought about this. And I'm thinking that rotating the mandible planes one by one is not an useful option. A newly created plane can control rotation of all fibulaPlanes at the same time. Mandible planes X axis could be used as desired direction for the sawBoxes. FibulaPlanes X axis could be used to set up the direction of the miterBoxes allowing different directions (for example: superior and posterior). @cmfsx and @lassoan maybe we can talk more about this on next meeting. @lassoan I'm letting this code for review because bug causes where identified. |
@cmfsx now sawBoxes are moveable, please check the latest commit and give feedback. In a future version of the code only X and Y axis will be shown for translation and only Z axis will be shown for rotation so the surgical plan is protected |
…ity (commented till boolean operations problems are solved)
I tried the latest version. The Saw box interactions are excellent. With common sense, even it not been constrained to the plane is not a big issue. I came across few problems though. in the Mandible guide by default sawBoxesModels are hidden and then when I create the guide base the sawBoxesModels are not subtracted and therefore there is no slot created. |
I suspect slots are being created. I suggest you hide "biggerSawBoxes Models" to see the slots. If not upload a scene and I'll check.
Please check that "Mandible Cylinders Models" is not empty. Also check that the fiducialList selected is correct (verify is not a fibulaCylinderFiducialList). After that click "Create cylinders from fiducial list and mandible surgical guide base" and try making the surgical guide again and tell me how it goes. |
The problem persists, Both the screw holes and the slot is not created. https://drive.google.com/file/d/1VXJ6P0wNO_PMdBdgOFTaWHVLBE8D45Zd/view?usp=sharing |
The bug was solved. Please tell me if you have any more problems |
I find it if we create the cutting planes in the wrong order and then simulate it then again or-order the planes proeplry the simulation is not corrected. If we create planes in wrong order but re-order them properly before doing the simulation ( pressing the update button) then simulation work. |
You have to reorder them using the data module. If not it doesn't work I don't know why. It is not much work to implement a button to reorder mandible planes or to reorder the planes when a new plane is added. I can do that if you want |
Ok I will try it. |
…ng vtkCollisionDetectionFilter
…use the feature is working
…gicalGuides inside the parentFolder
…dibleCurve when a new mandiblePlane is added
…use it could work wrong if rotatedMandiblePlaneAxes are not well defined
Now mandiblePlanes are ordered when a new mandiblePlane is added. @cmfsx Please do a last test to the module (VSP and surgical guides), if everything is okay I'll merge this branch to main |
BUG: sawBoxes models don't need their transforms to be hardened before making boolean operations
This branch is quite tested right now. I'll merge |
Andras can you check if the mandible surgical guides generation GUI has just enough buttons and parameters? I don't want something crowded or overcomplicated