Skip to content

Commit

Permalink
ENH: Add boolean macro to across-scale normalization ivar
Browse files Browse the repository at this point in the history
Add boolean macro to `itk::RecursiveGaussianImageFilter` across-scale
normalization ivar.

Exercise the macro in the companion test file.
  • Loading branch information
jhlegarreta authored and dzenanz committed Jan 4, 2023
1 parent 4156d3d commit e7aca74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Expand Up @@ -178,6 +178,7 @@ class ITK_TEMPLATE_EXPORT RecursiveGaussianImageFilter : public RecursiveSeparab
*/
itkSetMacro(NormalizeAcrossScale, bool);
itkGetConstMacro(NormalizeAcrossScale, bool);
itkBooleanMacro(NormalizeAcrossScale);

/** Set/Get the Order of the Gaussian to convolve with.
\li ZeroOrder is equivalent to convolving with a Gaussian. This
Expand Down
Expand Up @@ -198,16 +198,17 @@ itkRecursiveGaussianImageFilterTest(int, char *[])
std::cout << "Testing normalization across scales... ";
{ // begin of test for normalization across scales

filter->SetNormalizeAcrossScale(true);
auto normalizeAcrossScale = true;
ITK_TEST_SET_GET_BOOLEAN(filter, NormalizeAcrossScale, normalizeAcrossScale);

constexpr double sigmaA = 2.0;
filter->SetSigma(sigmaA);
filter->Update();

const PixelType valueA = filter->GetOutput()->GetPixel(index);


filter->SetNormalizeAcrossScale(false);
normalizeAcrossScale = false;
filter->SetNormalizeAcrossScale(normalizeAcrossScale);
constexpr double sigmaB = 2.0;
filter->SetSigma(sigmaB);

Expand Down

0 comments on commit e7aca74

Please sign in to comment.