Hello!
I would like to restrict the registration to some dimensions, and found that you can use SetOptimizerWeights() in python. How can I define this if I setup my registration using a parameter file? I would like to restrict a BSplines deformation to be in the y direction only. I found this answer, which perfectly answers my question:
https://discourse.itk.org/t/deformable-registration-but-only-allow-deformation-in-one-direction/3789/4
However I need to know how to define this parameter from a parameter file, and also how to know how many control points I have. I use FinalGridSpacingInPhysicalUnits to define the grid, but from that I dont know exactly how many points I have.
Any help is appreciated!
Regards Patrik