Skip to content
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

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

Closed
N-Dekker opened this issue Mar 24, 2023 · 1 comment · Fixed by #859
Assignees

Comments

@N-Dekker
Copy link
Member

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?

N-Dekker added a commit that referenced this issue Mar 26, 2023
And set zero to one, in `MovingImagePyramidBase::SetMovingSchedule()`, just as in `FixedImagePyramidBase::SetFixedSchedule()`.

Following commit f84ac0d "ENH: First checkin of a generic pyramid...", February 2, 2012.

Addressed issue #858 MovingImagePyramidBase, FixedImagePyramidBase have different defaults for "NumberOfResolutions"
@mstaring
Copy link
Member

let's use 3 everywhere as a default

N-Dekker added a commit that referenced this issue Mar 27, 2023
Following commit f84ac0d "ENH: First checkin of a generic pyramid...", February 2, 2012.

Addressed issue #858 MovingImagePyramidBase, FixedImagePyramidBase have different defaults for "NumberOfResolutions"
N-Dekker added a commit that referenced this issue Mar 28, 2023
Following commit f84ac0d "ENH: First checkin of a generic pyramid...", February 2, 2012.

Addressed issue #858 MovingImagePyramidBase, FixedImagePyramidBase have different defaults for "NumberOfResolutions"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants