MovingImagePyramidBase::SetMovingSchedule() uses zero as default value for "NumberOfResolutions", and then produces an error message when it is indeed zero! Looking at commit ab62f3d (September 6, 2004)
|
unsigned int numberOfResolutions = 0; |
|
m_Configuration->ReadParameter( numberOfResolutions, "NumberOfResolutions", 0, true ); |
|
if ( numberOfResolutions == 0 ) |
|
{ |
|
xl::xout["error"] << "ERROR: NumberOfResolutions not specified!" << std::endl; |
|
} |
On the other hand, commit f84ac0d (ENH: First checkin of a generic pyramid..., Feb 2, 2012) has changed the default for "NumberOfResolutions" in FixedImagePyramidBase to 3, and silently accepts zero as well, assuming it should be one:
|
unsigned int numberOfResolutions = 3; |
|
this->m_Configuration->ReadParameter( numberOfResolutions, |
|
"NumberOfResolutions", 0, true ); |
|
if ( numberOfResolutions == 0 ) numberOfResolutions = 1; |
Other places (MultiMetricMultiResolutionRegistration, MultiResolutionRegistration) also use 3 as default value.
Should MovingImagePyramidBase::SetMovingSchedule() also use 3 as default value?
MovingImagePyramidBase::SetMovingSchedule()uses zero as default value for "NumberOfResolutions", and then produces an error message when it is indeed zero! Looking at commit ab62f3d (September 6, 2004)elastix/src/Core/ComponentBaseClasses/elxMovingImagePyramidBase.hxx
Lines 38 to 43 in ab62f3d
On the other hand, commit f84ac0d (ENH: First checkin of a generic pyramid..., Feb 2, 2012) has changed the default for "NumberOfResolutions" in
FixedImagePyramidBaseto3, and silently accepts zero as well, assuming it should be one:elastix/src/Core/ComponentBaseClasses/elxFixedImagePyramidBase.hxx
Lines 104 to 107 in f84ac0d
Other places (MultiMetricMultiResolutionRegistration, MultiResolutionRegistration) also use
3as default value.Should
MovingImagePyramidBase::SetMovingSchedule()also use3as default value?