"GradientDifference" and "NormalizedGradientCorrelation" metrics both use SobelOperator:
|
SobelOperator<FixedGradientPixelType, Self::FixedImageDimension> m_FixedSobelOperators[FixedImageDimension]{}; |
|
SobelOperator<FixedGradientPixelType, Self::FixedImageDimension> m_FixedSobelOperators[FixedImageDimension]{}; |
In general, ImageDimension may be 4, and elastix does support 4-D. However, when using ITK 5 (including ITK 5.4.4), itk::SobelOperator throws an exception for 4-D images, saying:
itkExceptionMacro("The ND version of the Sobel operator is not yet implemented. Currently only the 2D and 3D "
"versions are available.");
https://github.com/InsightSoftwareConsortium/ITK/blob/f98d5fac5e1d5ef694f3010f12bbbc2c792994c6/Modules/Core/Common/include/itkSobelOperator.hxx#L73-L74
Thanks to Bradley Lowekamp (@blowekamp) for remarking that elastix does use itk::SobelOperator for 4-D! At InsightSoftwareConsortium/ITK#5718 (comment)
"GradientDifference" and "NormalizedGradientCorrelation" metrics both use SobelOperator:
elastix/Components/Metrics/GradientDifference/itkGradientDifferenceImageToImageMetric2.h
Line 209 in 2fb09c3
elastix/Components/Metrics/NormalizedGradientCorrelation/itkNormalizedGradientCorrelationImageToImageMetric.h
Line 192 in 2fb09c3
In general, ImageDimension may be 4, and elastix does support 4-D. However, when using ITK 5 (including ITK 5.4.4),
itk::SobelOperatorthrows an exception for 4-D images, saying:https://github.com/InsightSoftwareConsortium/ITK/blob/f98d5fac5e1d5ef694f3010f12bbbc2c792994c6/Modules/Core/Common/include/itkSobelOperator.hxx#L73-L74
Thanks to Bradley Lowekamp (@blowekamp) for remarking that elastix does use
itk::SobelOperatorfor 4-D! At InsightSoftwareConsortium/ITK#5718 (comment)