-
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
ENH: Initial support of the arc beam sequence #215
base: master
Are you sure you want to change the base?
Conversation
Another really great contribution! Can you please squash the commits, at least those that have the same message? Also it would be useful if you gave more information about how the created sequence is to be used, and in general some documentation about this feature. As detailed as it seems reasonable. Since we don't have anything better yet, please edit this page: https://www.slicer.org/wiki/Documentation/Nightly/Modules/ExternalBeamPlanning Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here as well; all I can do now is a quick read-through. I have found some things to change. Thank you!
|
||
vtkMRMLScene* scene = planNode->GetScene(); | ||
|
||
vtkMRMLSubjectHierarchyNode* shNode = vtkMRMLSubjectHierarchyNode::GetSubjectHierarchyNode(scene); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scene->GetSubjectHierarchyNode()
instead please
// SAD for RTPlan, source to beam limiting devices (Jaws, MLC) | ||
if (beamNode) | ||
{ | ||
// beamNode->SetSAD(rtReader->GetBeamSourceAxisDistance(dicomBeamNumber)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these commented out? If you want to keep them there please add a TODO
@@ -60,6 +62,20 @@ class VTK_SLICER_BEAMS_LOGIC_EXPORT vtkSlicerBeamsModuleLogic : | |||
void UpdateTransformForBeam( vtkMRMLScene* beamSequenceScene, vtkMRMLRTBeamNode* beamNode, | |||
vtkMRMLLinearTransformNode* beamTransformNode, double isocenter[3]); | |||
|
|||
/// Create arc delivery beam sequence | |||
/// @param initialAngle - initial angle in degrees |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the docstring convention that is used everywhere in Slicer and do not introduce another one. Not just here but everywhere and in the other PR as well please.
@@ -317,7 +319,7 @@ class vtkSlicerDicomRtReader::vtkInternal | |||
std::string InstitutionalDepartmentName; | |||
std::string ManufacturerModelName; | |||
}; | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary spaces
proxyBeamNode->SetAndObserveTransformNodeID(proxyTransformNode->GetID()); | ||
return proxyBeamNode; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should report an error if creation failed?
The old Slicer MediaWiki site will be retired (made read-only) at some point. We recommend extensions to store documentation in their repository. We don't need to immediately move the existing documentation, but it would make sense to add new documentation to this repository (a common pattern is to add a |
b99b16e
to
0a3415c
Compare
Initial arc-beam commits were squashed. Module file description was added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more things
// SAD for RTPlan, source to beam limiting devices (Jaws, MLC) | ||
if (beamNode) | ||
{ | ||
// TODO: Add beam parameters for each angle step |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be great to add an issue on GitHub for this and explain it in more detail.
// Add beam to beam sequence node | ||
if (beamNode) | ||
{ | ||
beamSequenceNode->SetDataNodeAtValue( beamNode, std::to_string(controlPointIndex)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it some new convention that there is a space after the opening parentheses but none before the closing one? If there is on good reason for this please use the style that is used everywhere else in SlicerRT.
@@ -1383,7 +1390,7 @@ void vtkPlanarContourToClosedSurfaceConversionRule::CreateSmoothEndCapContour(vt | |||
static_cast<int>(std::ceil((bounds[3] - bounds[2]) / spacing[1])), | |||
1 }; | |||
double origin[3] = { bounds[0], bounds[2], bounds[4] }; | |||
int extent[6] = { 0, dimensions[0] - 1, 0, dimensions[1] - 1, 0, 0 }; | |||
int extent[6] = { 0, dimensions[0] - 1, 0, dimensions[1] - 1, 0, dimensions[2] - 1 }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this change fix?
@@ -94,6 +95,15 @@ class VTK_SLICER_DICOMRTIMPORTEXPORT_LOGIC_EXPORT vtkSlicerDicomRtReader : publi | |||
/// Get radiation type (primary particle) for a given beam | |||
const char* GetBeamTreatmentDeliveryType(unsigned int beamNumber); | |||
|
|||
/// Check if beam control point sequence is an arc beam delivery | |||
/// @param beamNumber - beam number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix this please as you did the rest. Thanks
Thanks for creating the markdown page! @lassoan how do you think we should make it available? Just link it from the wiki for now? |
The easiest is to link it from the wiki. It could be also nice (and not too much work) to create a main documentation page in github (just a ti-level RADME.md with about the same content as the wiki main page). Then, page by page, documentation could be moved from the wiki. Whenever a page is moved then the content of the page on the wiki would be replaced by a message that it is moved to Github and the links from the main pages on both wiki ans Github would be updated to the new location. After a while readthedocs could be set up to generate a nice, versioned rendering of the documentation. (Github pages could be kept for rendering the version-independent part of the documentation, as it is already done now.) |
Hi @MichaelColonel I just saw this stale PR. Is this still on your radar? Can we help in anything to get this through? |
I will try to update this PR, so it can be merged. |
I've updated the PR, but the update is still under process... |
Thanks a lot @MichaelColonel! I'll wait until you say it's ready. I think I'll merge it after a very quick review, and then check the code in detail when integrating the change we are doing (working on some IEC related refactoring around the Beams and REV modules). Do you have some (phantom or anonymized) data that I could try this with? I'm not aware of any VMAT data in the SlicerRtData repo, it would be great to upload it there as well. |
This PR is ready for a review and merging. If there is a conflict between commits, let me know. |
Do you have some (phantom or anonymized) data that I could try this with? I'm not aware of any VMAT data in the SlicerRtData repo, it would be great to upload it there as well. |
No, I don't. I couldn't find any. |
Then how do you know the code works? If it has not been tested at all I don't think we can integrate it. Also, can you please do a rebase so that we can do a meaningful review against today's SlicerRT? Thank you! |
@MichaelColonel I'll leave on vacation in two days and we could get this sorted out before that if there was some data to test this with. Were you able to test this on any VMAT data? How do you know that it works? |
I think it's easier to close this RP for a while. I can try to generate RTPlan file with DCMTK and test the result when all the changes in IEC logic will be settled. |
Thanks for the quick answer! I just integrated the IEC changes, I believe it's all done. Please be aware that the DRR module may need fixing: #250 About this PR, I'd love to see the arc beam support in soon. On my side I'll try to ask for a VMAT plan from the local hospital we work with (although it won't be fast unfortunately). Also FYI I'm planning to do some actual work in SlicerRT in the next months, so if you have plans maybe it would be good to coordinate. Do you have any plans to work on SlicerRT in the near future? If so do you want to meet and discuss? (I'll be on vacation from Thursday but all available in August) Thank you! |
Nothing in particular, maybe some bug fixes and minor improvements. At least i'm not going to create a new module. |
A simple arc beam generator is added to Beam section of External Beam Planning module
By clicking on the "Arc beam sequence" toggle button, the arc beam sequence will be added instead of simple static beam.