-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add support for multi-leaf collimators #115
Comments
@MichaelColonel This is where the MLC related work should be tracked. So what exists in SlicerRT right now is a way to set the leaf positions There is also some code that generates the beam model from the MLC positions, see |
MLC positions are stored as a sequence of control points. MLC positions may change between control points. Each control point also specifies the gantry angle, collimator angle, jaw positions, and cumulative MUs (and several other things as well). The plan also contains information about the number of MLC leaves and the widths of those leaves. However, it does not contain all needed information, for example leaf position limits. |
Thanks, @gregsharp ! What is the format of the MLC positions? Just a number for each leaf for each control point? |
Correct. A single number for each leaf position at each control point. Regarding using a vtkMRMLTableNode, that would only be for the "Current leaf position"? Or do you envision a sequence of vtkMRMLTableNode for multiple control points? |
You're probably right and we should put all this in a sequence. |
Storing in a sequence node would have the advantage that you would get browsing between time points for free. You could add any other nodes (markup fiducials, transforms, etc) to change in sync. Potential inconvenience is that each table would contain information for only one time point, so if you want to view/edit multiple time points then you would need to switch between them, add multiple browser nodes, or temporarily export to a merged table. |
I worked with MLC in DICOM a couple of times.
MLC has 60 leaves, 61 leaf boundary values as pairs (-200., -190.) (-190., -180.) .... Position in one control point:
There are 120 positions, one for each leaf, first 60 for one side, last 60 for the other side. |
Importing MLCs from DICOM in vtkSlicerDicomRtReader. Some general questions.
Best regards, |
|
The reason for the first question is that one multi leaf collimator definition from BeamLimitingDeviceSequence, "MLCX" for example, can have a number of positions or openings within ControlPointSequence. These members will be added to the BeamEntry What is a better way to store boundaries and positions?
|
It is hard to tell before starting implementation. I think you can start with either, and if you see that there are more disadvantages than advantages, then we can always switch. This is a small enough detail that it does not need to start as final. I think what is very important is to decide what data goes to which class, but it seems we have an agreement in that. |
My 2 cents: The below are not part of a control point (they do not change).
But the below is part of the control point. You probably want a separate class to describe what is contained in a control point, because eventually you will have a vector of control points.
|
@gregsharp True, however, if we include adding the control points feature to this topic, then it will reach too far. If @MichaelColonel does not need more than one control point, then I suggest keeping it simple for now, and building on it later when generalizing for multiple control points. |
I don't want to break compatibility to the code that works, since i'm quite new in SlicerRT. But in the end, each beam must have multiple control points. Something like
|
I've mostly done with loading MLC data in DicomRtReader for both RTPlan and RTIonPlan. Only one control point per beam for start. Where the vtkMRMLTableNode for MLC opening data should be created? |
Thanks for keeping us in the loop, I really appreciate it! Creating the table node should be where you read in the MLC data, in ImportExportLogic. It should be set to the beam right there too. |
I don't have the permission to push commit. |
Let's follow the usual GitHub workflow:
When ready for integration, issue a pull request. |
@cpinter I opened a pull request. |
Please issue a pull request to SlicerRT/SlicerRT not cpinter/SlicerRT (which is also a fork). If the PR is not about ion plans, please rename the branch so that it is expressive to what it contains. Thanks! |
I see now why you issued the PR in my fork, it's because you want to integrate it to ion plans. For future reference, it's important that we don't do many things under an umbrella, because it will be very hard to track why things happened and when. If you can do the MLC related commits separately which by the way should have been committed to this ticket and not the ion one, for the same reason), then we could integrate the MLCs and the ion plans separately. It would be much cleaner. I hope it's doable. Thanks! |
When the RTBeamNode creates beam polydata it doesn't use parameters from a beam limiting device sequence. It had been done just for demonstration? |
It does, just above the code you highlighted: |
Looks amazing, thanks a lot! |
The process of handling MLCs in beam planning, and UI for that purpose. Should it be just editing of selected MLC positions from DICOM RT file, or the user could be able to create additional MLC and edit their positions as well? If only editing of selected positions, which is better for user interface: plugin widget or dialog window? |
I think it's enough in the plugins if we can reference the MLC table node (by node ID), and the user should edit the MLC in the Tables module. |
In that case could it be guaranteed, that the modified positions data would be valid (no intersection between leaves in pair, no meaningless values, etc). |
@cpinter i'm done with initial implementation and pull request is ready for review. The beam vtkPolyData is displayed correctly when any value in MLC position table node is changed, or clicked "Edit properties..." action on a beam node. That's the only bug i have noticed. I hope somebody could test not only MLCX but also MLCY. |
Thanks for working on this! Csaba is in the process of moving, so I can review this pull request for you tomorrow. |
@MichaelColonel I've merged the pull request in this commit 357d9db. What organization are you a member of? We would like to include you in our list of collaborators 🙂. |
Institute for High Energy Physics (IHEP) Short Name: NRC «Kurchatov Institute» – IHEP |
It was relatively easy as @lassoan have said, but only as a static model. |
Looks nice! You can automatically update the model node whenever any parameter is changed. |
I can remove DoubleArrayNode node from MLC support and store all the data within single TableNode, because of #142. New MLC data storage in table node will be: first column - leaf pairs boundary data, second column - leaf pairs position on side 1, third column - leaf pairs position on side 2. |
@MichaelColonel This would be excellent, thank you for offering to help with this! The columns seem fine with me. Please make sure you document this clearly in comments in the code. |
I've made a small module to calculate MLC position for a given RTBeamNode, target volume, and table node with defined leaf pair boundaries. Some of my colleagues want to try it without compilation and other stuff. If such feature is needed in SlicerRT how could i integrate it with minimum problems (separate module, integrate in "Beams" module, GUI for MLC leaf pair boundaries calculation and so on)? |
When you say module what do you mean exactly? I suppose not Slicer module, otherwise you wouldn't ask this question. I think the best would be to add it as a new logic class in the Beams module's logic folder. |
The text was updated successfully, but these errors were encountered: