ANTsX / ANTs

Advanced Normalization Tools (ANTs)
Apache License 2.0
1.15k stars 374 forks source link

multiple applications of warp in shapeupdatetotemplate #811

Closed mattcieslak closed 4 years ago

mattcieslak commented 4 years ago

Describe the bug I'm not sure this is a bug, but wanted to make sure I'm understanding the algorithm correctly. In the shapeupdatetotemplate() function the affine transforms from the current iteration are averaged. The transforms from the Warp.nii.gz images are also averaged and multiplied by the gradient step. The averaged and gradient-step-multiplied warp is then transformed by the inverse of the average affine transform. Finally, the transformed and gradient-step-multiplied warp is applied along with the inverted average affine transform here: https://github.com/ANTsX/ANTs/blob/v2.3.1/Scripts/antsMultivariateTemplateConstruction2.sh#L384

Is it correct that this warp should be added to the transform stack four times? It is applied 4 times in both antsMultivariateTemplateConstruction.sh and antsMultivariateTemplateConstruction2.sh. Is this related to the gradient step size default being 0.25?

Thanks in advance!

ntustison commented 4 years ago

https://github.com/ANTsX/ANTs/issues/806

mattcieslak commented 4 years ago

I'm not sure how this issue didn't come up when I searched. Sorry for the duplication

ntustison commented 4 years ago

No worries. The same issue with a different title might make it easier for the topic to be found in the future.