-
Notifications
You must be signed in to change notification settings - Fork 459
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
Cli node references #1120
Cli node references #1120
Conversation
It was possible to define references in CLIs before, but they had special meaning (set parent transform, set subject hierarchy parent), and they were defined "in reverse", i.e. in the referenced object. This change adds support for generic, forward references, which allow specifying any type of reference between two nodes. For example in a registration module, the output transform can specify node references to the moving and fixed images.
Update registration modules to add reference from the output transform to the moving and fixed input nodes.
…form Sometimes it is important to be able to identify the sources of an output, for example in this case the input moving and fixed volumes from the transform, or the original moving volume from the output volume (i.e. resampled moving volume). A new CLI feature makes this possible, see Slicer/SlicerExecutionModel#109 and Slicer/Slicer#1120. This commit adds these references to BRAINSFit.
…form Sometimes it is important to be able to identify the sources of an output, for example in this case the input moving and fixed volumes from the transform, or the original moving volume from the output volume (i.e. resampled moving volume). A new CLI feature makes this possible, see Slicer/SlicerExecutionModel#109 and Slicer/Slicer#1120. This commit adds these references to BRAINSFit.
Sounds good to me 👍 |
Thanks, Steve! Can we go ahead with Slicer/SlicerExecutionModel#109 as well? |
Yes, both patches look good to me (haven't built, but looks good). Thanks for the contributions! 👍 |
Just for the reference (no pun intended!), the original intent of adding "reference" to CLI was not motivated by transformations, but to initialize window/level for the resampled volume consistently with the input to the resampling tools. I managed to find the email below from 2010 when I emailed @hjmjohnson about adding this feature. I hope that feature is still working!
|
As far as I know this piece of code processes references in Slicer CLIs: And all I can see here are the transforms and the subject hierarchy parents. If the window/level feature stll works, then I don't know where it's implemented. |
It would be great to copy window/level indeed (I don't think it was implemented in Slicer4). Generating new output volume name based on input volume name would be useful, too. @cpinter How do you think such features could be added in the future? Using special role names? |
It's a good idea to use references for actions on a node using another node, because it can be done without cluttering the CLI infrastructure, and handling these on the Slicer level would be easy. For example:
|
…form Sometimes it is important to be able to identify the sources of an output, for example in this case the input moving and fixed volumes from the transform, or the original moving volume from the output volume (i.e. resampled moving volume). A new CLI feature makes this possible, see Slicer/SlicerExecutionModel#109 and Slicer/Slicer#1120. This commit adds these references to BRAINSFit.
@jcfr @pieper @lassoan I cherry-picked my BRAINS commit from their master after it was merged, to Slicer's BRAINS fork's master, but then I realized that it did not build, and that Slicer uses the slicer-2019-03-07-v5.0.0-2af1e31 branch not the master. What should I do? Create a new branch based on the slicer-2019-03-07-v5.0.0-2af1e31 branch? If yes, what should it be called? Thanks! |
…form Sometimes it is important to be able to identify the sources of an output, for example in this case the input moving and fixed volumes from the transform, or the original moving volume from the output volume (i.e. resampled moving volume). A new CLI feature makes this possible, see Slicer/SlicerExecutionModel#109 and Slicer/Slicer#1120. This commit adds these references to BRAINSFit.
I talked to @lassoan and did the following:
Now I'll update Slicer's SuperBuild.cmake to use the latest hash from the branch (and do the same for SEM) and push this PR's commits and that one. |
It was possible to define references in CLIs before, but they had special meaning (set parent transform, set subject hierarchy parent), and they were defined "in reverse", i.e. in the referenced object.
This change adds support for generic, forward references, which allow specifying any type of reference between two nodes. For example in a registration module, the output transform can specify node references to the moving and fixed images.
Registration modules have been updated to use this reference feature to reference the input images from the output transformations. This change is needed for proper DICOM spatial registration export (SlicerRt/SlicerRT#42)
The following PR is needed before this can be integrated: Slicer/SlicerExecutionModel#109