From a0890b1f1397a1e795d7bc37bcba349a747a408a Mon Sep 17 00:00:00 2001 From: Tom Birdsong Date: Thu, 12 May 2022 13:30:42 -0400 Subject: [PATCH] PERF: Reduce verbosity of `itk::GaussianOperator` warning `itk::GaussianOperator` can be set with a `MaximumKernelWidth` parameter such that a kernel that would otherwise overflow this size is cropped to the maximum width. Cropping to the set maximum width happens frequently in cases such as Gaussian blurring for multiscale pyramid generation and is expected behavior, but the previous warning message makes it seem like a failure case. This commit reduces the verbosity of the message from a warning to a debug printout so that developers can get insights into kernel cropping when needed, but are not alarmed by default warning printouts. --- Modules/Core/Common/include/itkGaussianOperator.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/Core/Common/include/itkGaussianOperator.hxx b/Modules/Core/Common/include/itkGaussianOperator.hxx index 43281a874e2..e1169802ecb 100644 --- a/Modules/Core/Common/include/itkGaussianOperator.hxx +++ b/Modules/Core/Common/include/itkGaussianOperator.hxx @@ -52,9 +52,9 @@ GaussianOperator::GenerateCoefficients() -> Coef } if (coeff.size() > m_MaximumKernelWidth) { - itkWarningMacro("Kernel size has exceeded the specified maximum width of " - << m_MaximumKernelWidth << " and has been truncated to " << coeff.size() - << " elements. You can raise the maximum width using the SetMaximumKernelWidth method."); + itkDebugMacro(<< "Kernel size has exceeded the specified maximum width of " << m_MaximumKernelWidth + << " and has been truncated to " << coeff.size() + << " elements. You can raise the maximum width using the SetMaximumKernelWidth method."); break; } }