Comments (18)
MandiblePlane2MandiblePlaneStraight will be needed when we implement automatic plane placement from a single point. We will determine MandiblePlaneStraight plane from the centerline and the user-defined point and set MandiblePlane2MandiblePlaneStraight to a slight rotation by default. The user will then just need to do small adjustments (if anything).
from slicerbonereconstructionplanner.
Yes. I have thought a little about this and your explanation comes in hand. I'd like to set up a dynamic GUI so that the cutting plane selectors can be created based on the number of bone segments selected on a ComboBox. After the planes are selected in the selectors a click on an apply button would create all the fibula planes over the fibula line with the corresponding transform so they are in the right position. It may take some time to do this because I have never set up a dynamic GUI and I have to add the planes to a list that I would apply a list of transforms to and I think is kinda hard
from slicerbonereconstructionplanner.
@lassoan and @mauigna06 I am just thinking, don't we already have enough information to generate the cutting planes? Once we define the resection planes at two ends, with the mandibular curve markup we define each segment ends (fiducial points). Then based on the angle can't we calculate the two planes we need to cut the bone? I don't think we need any more information to make the cutting planes. This GUI is good as it is. But the calculation part will have to be programmed.
@mauigna06 if this is not clear I can come to zoom.
from slicerbonereconstructionplanner.
Yes, mandible cutting planes fully define fibula cutting planes, we just need to specify the fibula line, fibula backplane orientation (or use a plane to define both), starting point along the fibula line, and small offsets between segments.
from slicerbonereconstructionplanner.
I'll explore how the qMRMLSubjectHierarchyTreeView works and I'll add it to the GUI so folders with the planes inside them can be shown.
Then I'll try to set up the fibula planes and their corresponding transforms iterating though a list.
Also I'll try to make interaction handles appear by default.
These changes may take me a couple of days because I'm studying also.
from slicerbonereconstructionplanner.
A little problem is that the fibula planes are too small to visualize them properly. I don't know how to resize them
Plane extent along its x and y axes are determined by the second and third control positions (first control position is the origin, second is the endpoint of its x axis, third one determines the plane orientation and extent along the y axis).
from slicerbonereconstructionplanner.
It could be useful if you could add a separate issue here for markups plane improvements that you would like to see, just to make sure that we are aware of what you have in mind.
from slicerbonereconstructionplanner.
I think I have found the right formula to transform the mandible planes to fibula planes as it was desired (contact surface area maximazed) and specified on the picture. I have it on paper.
I'll program it when I have some time because I have to edit the previous version because I have to make some angle checks to make sure the transforms are set up properly.
It is not enough to reproduce the total "Segment angle" rotation between bone segments but we need to reproduce the two rotation angle components (rotation along MandiblePlainStraight x and y axes)
Let me reference to this picture:
Till now we have a MandiblePlane2FibulaPlane transform. @lassoan, are you saying that you also want a MandiblePlane2MandiblePlaneStraight transform?
from slicerbonereconstructionplanner.
I would recommend to organize data in subject hierarchy folders. For example, one folder for mandible cutting planes, another folder for the automatically generated fibula cutting planes, etc.
In the module, you can add a subject hierarchy tree widget that shows all the nodes that are in one folder, thereby avoiding the need to create a dynamic GUI manually. You can use that to select existing planes for editing or remove them.
I would not add a combobox for predefining number of mandible cutting planes, you can just have buttons for adding/removing a plane.
from slicerbonereconstructionplanner.
I investigated inside the classes: qSlicerMarkupsPlaceWidget, qSlicerMarkupsModuleWidget, vtkSlicerMarkupsLogic, vtkMRMLInteractionNode, vtkMRMLMarkupsPlaneNode, vtkMRMLSubjectHierarchyNode
And I haven't found how to create the planes nodes inside a folder by default with starting name myPlane through the qSlicerMarkupsPlaceWidget
I'd like the created planes to be shown in the qMRMLSubjectHierarchyTreeView like this:
myFolder/myPlane_1
myFolder/myPlane_2
myFolder/myPlane_3
myFolder/myPlane_4
(I know how to move a plane inside a folder after it has been created)
shNode = slicer.mrmlScene.GetSubjectHierarchyNode()
mID = shNode.CreateFolderItem(sceneItemID,"MyFolder")
shNode.CreateItem(mID,planeNode) #planeNode is moved to myFolder
I think if I was able to get the vtkMRMLNode reference of each plane created by the qSlicerMarkupsPlaceWidget I would put them inside a list to iterate through and I would be able to rename them and append them inside myFolder
from slicerbonereconstructionplanner.
And I haven't found how to create the planes nodes inside a folder by default with starting name myPlane through the qSlicerMarkupsPlaceWidget
There is no function that does everything like this "by default". You implement it yourself: add an "Add cut plane" button, when the user clicks on it then you create the markups plane node, set its name, subject hierarchy parent, add an observer, etc.
When the user places a point of the plane then the observer will call your callback function. In that function you can set the plane orientation, hide control points & show interaction arrows (if there is at least one placed control point), update the corresponding fibula plane's position and orientation, etc.
from slicerbonereconstructionplanner.
I haven't thought about it that way. Thank you Andras. I was able to make it work. I just have to update the transforms when mandibular planes are modified. I will do that on the following days.
from slicerbonereconstructionplanner.
In the last commit you can create any number of mandibular planes and the fibula planes with its transforms will be created.
A little problem is that the fibula planes are too small to visualize them properly. I don't know how to resize them
from slicerbonereconstructionplanner.
I've updated the Design.pptx slide with the cutting plane angles (now it is editable in the pptx):
A few things to note:
- User has complete freedom in choosing first and last mandible plane angle
- There is very little freedom in choosing all other mandible plane angles, because if mandible plane 2 does not half the angle between bone segment 1 and bone segment 2 then there is a mismatch in cross-section area (as you move away from half angle, one of the cross-section is getting smaller, the other is getting larger)
- It is not enough to reproduce the total "Segment angle" rotation between bone segments but we need to reproduce the two rotation angle components (rotation along MandiblePlainStraight x and y axes)
- A small space must be added between origin of FibulaPlane1B and FibulaPlane2A. It can be determined by getting the two plane/segmentation intersections (using vtkCutter), transform it to the fibula coordinate system (vtkTransform), get the two bounding boxes (polydata->GetBounds()), the overlap of z coordinate range tells how much space must be added to avoid overlap.
from slicerbonereconstructionplanner.
first control position is the origin, second is the endpoint of its x axis, third one determines the plane orientation and extent along the y axis
I have left out all the problems I have associated with plane markup as I believe it is been revamp by Kyle Sunderland
and Rafael Palomar and hoping when they improve it automatically it will improve the functionality here.
from slicerbonereconstructionplanner.
I found this video which will give a fair idea about how this is done. Right now our calculations are spot on but I thought this might help you to gain a better insight!
https://www.youtube.com/watch?v=O2tHpkxZ1F0
https://www.youtube.com/watch?v=GCbzM1tUrDo
from slicerbonereconstructionplanner.
Thank you Manjula. The videos were useful in understanding the surgical process
from slicerbonereconstructionplanner.
I have updated the transforms to match the required positioning of the fibula planes. I'll close the issue.
(If you want to follow the conversation here because we were discussing also other topics please do)
from slicerbonereconstructionplanner.
Related Issues (20)
- make miterBoxes and biggerMiterBoxes have a slightly different color
- Instrument to hold the fibula pieces together
- BRP for mandibular reconstruction with iliac bone HOT 5
- To do list, perspective from the project first issues HOT 2
- mandible model gets visible after each "Update of the planning" HOT 1
- Assisted selection of fibula flap donor side HOT 4
- again test the workflow instructions completely on latest stable release 5.6.1
- Fix surgical guide bases creation step documentation
- Add fancy surgical simulation
- Fix tests not working in Slicer 5.6.2
- Custom titanium plate with Blender, copy workflow?
- Create better screw fixation holes HOT 1
- Can generic mandible and fibula models be used for accurate reconstruction?
- Allow deep circumflex Iliac artery flap (DCIA)
- Ability to reformat the slice view without switching to the reformat module. (So the curve can be drawn properly) HOT 1
- Update the Readme.md
- Test entire workflow manually on Stable and Preview releases HOT 4
- Automatically create fibula line from fibula segmentation
- Automatically create guideBaseCocoon when creating fibula/mandible models HOT 1
- improve 3D objects tree view
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slicerbonereconstructionplanner.