[ENH][WIP] Fix registration + use mask apply in tractoflow#369
[ENH][WIP] Fix registration + use mask apply in tractoflow#369arnaudbore wants to merge 2 commits into
Conversation
gagnonanthony
left a comment
There was a problem hiding this comment.
Great job! I left a few comments. Also, I'm trying to figure out what someone would expect as output when supplying images with their associated masks. I would assume they don't really want the masked registered images, but probably the original images warped using the mask, no? This means we should probably add an antsApplyTransforms at the end to warp the moving original (non-masked) image. This is just an opinion and I'm not a power user of this subworkflow, so feel free to chip in!
AlexVCaron
left a comment
There was a problem hiding this comment.
Sorry, I missed your message on the merged PR. I was not advocating for prior masking as a replacement to feeding the masks to the registration. As @gdevenyi said, neither one or the other has proven stable really, and both have their use-cases.
I'd rather have both options (including their combination). versaFlow is an example of this. Its registration chain from T1 to DWI needs to configure antsRegistration under all 3 cases to work correctly (and more, but let's not get into that).
|
Ok I stop coding until we agree on the strategy here is the link to what @gdevenyi said: #367 (comment). I think to add an extra layer of masking within or before becomes complicated but maybe I'm getting lazy. |
I think the current implementation is okay for now, we can extend the conversation at the SIG on Thursday and decide on the matter. I'm not against complexity, registration is an unstable and complex workflow. Aside healthy adult human brains, it's non-trivial and requires deep fine-tuning. I'm happy to put my hand in the fryer on this one and contribute to the implementation, as I've done much of what I ask for in versaFlow. |
|
I think the safer thing to do here is to add a "mask extraction" option in each of the individual registration tools so that we only have to pass around the full unmasked images. My registration tool already has this as an option internally (--mask-extract) so its easy for me to implement. |
Type of improvement
Masking for registration modules is done in registration subworkflow
If submitting a new module or fixing a bug, please use the appropriate template.
Describe your improvement
Write a clear and concise description of what the improvement is.
Describe how to test your improvement
Provide a full step-by-step guide to test your improvement.
Checklist before requesting a review