-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing parameters to transform parameter maps #379
Conversation
@ViktorvdValk Before addressing InsightSoftwareConsortium/ITKElastix#93 and #366 I want to clean up the code of those |
caeec7f
to
b57a9a1
Compare
b78d174
to
8ec4ad7
Compare
@mstaring @stefanklein Can we possibly discuss this pull request at the sprint, this afternoon? |
lgtm |
Added three overload sets of static member functions to `BaseComponent`: size_t GetNumberOfElements(container) string ToString(value) vector<string> ToVectorOfStrings(container) Including four GoogleTest unit tests.
Made `TransformBase::CreateTransformParametersMap` non-virtual. Added transform type specific parameters by overriding the added virtual `CreateDerivedTransformParametersMap` member function, which is called by `CreateTransformParametersMap`. Reduced the amount of code duplication, by using the new `BaseComponent::ToVectorOfStrings` and `BaseComponent::ToVectorOfStrings` convenience functions. Replaced `std::map::insert` calls by `std::map::operator[]` and C++11 list initialization (using curly braces).
Added `CreateDerivedTransformParametersMap` overrides, which add missing parameters to: - AffineDTITransformElastix - AffineLogStackTransform - AffineLogTransformElastix - BSplineTransformWithDiffusion - DeformationFieldTransform - EulerStackTransform - MultiBSplineTransformWithNormal - SimilarityTransformElastix - SplineKernelTransform - TranslationStackTransform - WeightedCombinationTransformElastix Addresses the following issues: ITKElastix issue 93: "2D similarity transform parameter map doesn't keep "CenterOfRotationPoint" parameter", by Heath Patterson, 16 December, 2020. InsightSoftwareConsortium/ITKElastix#93 SuperElastix/elastix issue 366: "AffineDTITransform does not return the CenterOfRotationPoint", by dyliu2016, 27 November, 2020 #366 Declared `TransformBase::CreateDerivedTransformParametersMap()` pure virtual (`= 0`). Added an empty override to `TranslationTransformElastix`, just to keep allowing the transform to be instantiated. Extended `CreateTransformParametersMapForDefaultTransform` GoogleTest unit test. Note: Some of the overrides may still be incomplete, as indicated by comments, saying "TODO If necessary, add possibly missing parameters".
8ec4ad7
to
07bae26
Compare
// TODO If necessary, add possibly missing parameters: | ||
// - "DeformationFieldFileName" (which is written by WriteToFile). | ||
// - "GridDirection" (as returned by RecursiveBSplineTransform). | ||
// - "ThresholdBool", "ThresholdHU", etc. (as retrieved by ReadParameter). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, still a TODO here...
// TODO If necessary, add possibly missing parameters: | ||
// - "MultiBSplineTransformWithNormalLabels" (which is written by WriteToFile). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...and another TODO here!
No description provided.