ENH: Add Similarity3DTransform in itkLandmarkBasedTransformInitializer
For adding iso-tropic scaling in the transformation matrix along with Rotation and Translation when using landmarks for transform initialization. Moved some common code from VersorRigid3DTransform and Similarity3DTransform and created ComputeCentroid and CreateMatrix. Introduced a PointType3D to handle the compilation issue when wrapping.
PR Checklist
- [ ] No API changes were made (or the changes have been approved)
- [ ] No major design changes were made (or the changes have been approved)
- [X] Added test (or behavior not changed)
- [ ] Updated API documentation (or API not changed)
- [ ] Added license to new files (if any)
- [ ] Added Python wrapping to new files (if any) as described in ITK Software Guide Section 9.5
- [ ] Added ITK examples for all new major features (if any)
Yes, there is some issue with the Python wrapping caused due to code refactoring. I am changing the .wrap file to account for it.
Introduced a PointType3D to handle the compilation issue when wrapping.
Yes I tested it locally with ctest. Doing one more test with a bigger dataset to check if it gives the correct output. With the smaller test sample, it gave the correct scaling output.
As Matt is on vacation this week, let's not wait for his review. If @blowekamp does not review until 3-4PM, I say we merge.
@dzenanz yes. I discovered one bug in mesh writing in binary mode in rc4.post2 that delayed the testing of this PR. I will confirm here once that is done.
I have tested it using Python and there it is calling LandmarkBasedTransformInitializer with the VersorRigid3DTransform when using Similarity3DTransform. This is because Similarity3DTransform inherits from VersorRigid3DTransform. I will have to check how to handle this for Python wrappings.
Changing the ordering of dynamic_cast and made it work in Python.