Skip to content

Commit a2fa9de

Browse files
jhlegarretadzenanz
authored andcommitted
ENH: Add itkBooleanMacro for boolean ivar
Add `itkBooleanMacro` for the `Verbose` boolean ivar of `itk::CumulativeGaussianOptimizer`. Add the corresponding test.
1 parent 5f737c0 commit a2fa9de

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Modules/Numerics/Optimizers/include/itkCumulativeGaussianOptimizer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ class ITKOptimizers_EXPORT CumulativeGaussianOptimizer : public MultipleValuedNo
7272
itkGetMacro(DifferenceTolerance, double);
7373
itkSetMacro(Verbose, bool);
7474
itkGetMacro(Verbose, bool);
75+
itkBooleanMacro(Verbose);
7576
itkGetMacro(ComputedMean, double);
7677
itkGetMacro(ComputedStandardDeviation, double);
7778
itkGetMacro(UpperAsymptote, double);

Modules/Numerics/Optimizers/test/itkCumulativeGaussianOptimizerTest.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ itkCumulativeGaussianOptimizerTest(int, char *[])
8282
ITK_TEST_SET_GET_VALUE(differenceTolerance, optimizer->GetDifferenceTolerance());
8383

8484
// Print results after each iteration.
85-
optimizer->SetVerbose(true);
85+
bool verbose = true;
86+
ITK_TEST_SET_GET_BOOLEAN(optimizer, Verbose, verbose);
8687

8788
// Set the data array.
8889
optimizer->SetDataArray(cumGaussianArray);

0 commit comments

Comments
 (0)