Closed azylbertal closed 1 year ago
So this isn't something that we're inclined to implement ourselves as this could be invoked by calling ants.registration
multiple times. We would entertain a pull request but it would have to maintain the simplicity of the current ANTsR/ANTsPy registration interface.
Thanks, I'll try to come up with a simple way to implement it. Is there a way to use a moving mask with the current implementation?
Not perfect but, depending on your registration scenario, you can swap the fixed and moving image for the first ants.registration
linear-only registration optimization. Then use that as an initial transform (but using the whichtoinvert
option) for the second call.
In my use case and based on my experience with command line antsregistration, it is particularly useful to mask the moving image in all registration stages (rigid, affine and SyN). This is a result of a large part of the moving image being obscured (in a predictable way), while the fixed image is a 'full' atlas image.
In the current version, when a mask is provided it is only applied to the final stage (usually SyN, or Affine in the particular case of TRSAA), and only in the fixed image space. I think it would be useful to be able to provide a moving mask and also have the option to apply it for all stages.