Skip to content

MovingImagePyramidBase, FixedImagePyramidBase have different defaults for "NumberOfResolutions" #858

@N-Dekker

Description

@N-Dekker

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?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions