Skip to content

Commit

Permalink
PERF: Reduce verbosity of itk::GaussianOperator warning
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
tbirdso committed May 12, 2022
1 parent ee989dc commit a0890b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Modules/Core/Common/include/itkGaussianOperator.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ GaussianOperator<TPixel, VDimension, TAllocator>::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;
}
}
Expand Down

0 comments on commit a0890b1

Please sign in to comment.