-
-
Notifications
You must be signed in to change notification settings - Fork 664
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
ENH: Refactor itk::ImageRegistrationMethodv4
statements into methods
#3876
base: master
Are you sure you want to change the base?
ENH: Refactor itk::ImageRegistrationMethodv4
statements into methods
#3876
Conversation
Refactor `itk::ImageRegistrationv4` soure and target domain image, mask and point set ivar clearance statements into methods to improve encapsulation.
Group setting `itk::ImageRegistrationMethodv4` random seeds into a method to improve encapsulation.
1b07983
to
ef55328
Compare
Refactor `itk::itkImageRegistrationMethodv4` initialization statements dependent on the number of levels into a method to improve encapsulation.
ef55328
to
0500c27
Compare
/azp run ITK.macOS |
* Initialize the shrink factors, smoothing sigmas, and metric sampling percentage values. If | ||
* decreasingConsecutiveShrinkFactors is true, the shrink factors will be initialized to decreasing integer values | ||
* starting from the number of levels minus one (e.g. if the number of level is $3$, they will be initialized to the | ||
* set ${2,1,0}$; if false, they will be initialized to all $1$'s. An equivalent logic applies to the smoothing sigma |
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.
Needs to match whatever decision is made on the constructor/refactoring.
this->m_SmoothingSigmasPerLevel.SetSize(this->m_NumberOfLevels); | ||
this->m_SmoothingSigmasPerLevel[0] = 2; | ||
this->m_SmoothingSigmasPerLevel[1] = 1; | ||
this->m_SmoothingSigmasPerLevel[2] = 0; |
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.
Hey @ntustison I would be grateful if you could review this PR as time permits, especially he changes in commit 0500c27. The SetNumberOfLevels
call in https://github.com/InsightSoftwareConsortium/ITK/pull/3876/files#diff-63900e690554f3dd0bd22b3205f700be44c592699ca21a4a48b5f184ab8e61cbL103 initializes the above values to some given values https://github.com/InsightSoftwareConsortium/ITK/pull/3876/files#diff-63900e690554f3dd0bd22b3205f700be44c592699ca21a4a48b5f184ab8e61cbR890, but the lines above override such values (I have not removed the existing body yet, but eventually the Initialize*
calls should remain only, once the latter as well get polished following your comments). I have not looked into its details, but I am wondering whether that was intended or not, and why, or which would be your recommendations to initialize the values.
Also, I'm wondering whether a rule could be designed for the case where the number of levels is not 3.
Thanks.
itk::ImageRegistrationMethodv4
domain clearing methodsitk::ImageRegistrationMethodv4
random seedsitk::itkImageRegistrationMethodv4
dependent statementsPR Checklist