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.
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.
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.
|
@jhlegarreta This is nearly 2 years old. Is it relevant? If so, please resolve the conflicts. |
itk::ImageRegistrationMethodv4domain clearing methodsitk::ImageRegistrationMethodv4random seedsitk::itkImageRegistrationMethodv4dependent statementsPR Checklist