18 #ifndef itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader_h
19 #define itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader_h
57 template <
typename TDomainPartitioner,
typename TImageToImageMetric,
typename TNeighborhoodCorrelationMetric>
75 using typename Superclass::DomainType;
76 using typename Superclass::AssociateType;
79 using typename Superclass::VirtualPointType;
80 using typename Superclass::VirtualIndexType;
81 using typename Superclass::FixedImagePointType;
82 using typename Superclass::FixedImagePixelType;
83 using typename Superclass::FixedImageGradientType;
84 using typename Superclass::MovingImagePointType;
85 using typename Superclass::MovingImagePixelType;
86 using typename Superclass::MovingImageGradientType;
87 using typename Superclass::MeasureType;
88 using typename Superclass::DerivativeType;
89 using typename Superclass::DerivativeValueType;
93 using ImageRegionType =
typename NeighborhoodCorrelationMetricType::ImageRegionType;
96 using JacobianType =
typename NeighborhoodCorrelationMetricType::JacobianType;
98 using FixedImageType =
typename NeighborhoodCorrelationMetricType::FixedImageType;
99 using MovingImageType =
typename NeighborhoodCorrelationMetricType::MovingImageType;
100 using RadiusType =
typename NeighborhoodCorrelationMetricType::RadiusType;
151 : m_ANTSAssociate(nullptr)
189 const VirtualPointType & virtualPoint,
198 const VirtualIndexType & virtualIndex,
199 const VirtualPointType & virtualPoint,
203 template <
typename T>
206 const VirtualIndexType & virtualIndex,
207 const VirtualPointType & virtualPoint,
210 return Superclass::ProcessVirtualPoint(virtualIndex, virtualPoint, threadId);
219 const VirtualPointType & itkNotUsed(virtualPoint),
220 const FixedImagePointType & itkNotUsed(mappedFixedPoint),
221 const FixedImagePixelType & itkNotUsed(mappedFixedPixelValue),
222 const FixedImageGradientType & itkNotUsed(mappedFixedImageGradient),
223 const MovingImagePointType & itkNotUsed(mappedMovingPoint),
224 const MovingImagePixelType & itkNotUsed(mappedMovingPixelValue),
225 const MovingImageGradientType & itkNotUsed(mappedMovingImageGradient),
226 MeasureType & itkNotUsed(metricValueReturn),
227 DerivativeType & itkNotUsed(localDerivativeReturn),
230 itkExceptionMacro(
"ProcessPoint should never be reached in ANTS CC metric threader class.");
241 ThreadedExecution_impl(
243 const DomainType & virtualImageSubRegion,
247 template <
typename T>
255 InitializeScanning(
const ImageRegionType & scanRegion,
256 ScanIteratorType & scanIt,
257 ScanMemType & scanMem,
258 ScanParametersType & scanParameters)
const;
263 UpdateQueues(
const ScanIteratorType & scanIt,
264 ScanMemType & scanMem,
265 const ScanParametersType & scanParameters,
269 UpdateQueuesAtBeginningOfLine(
const ScanIteratorType & scanIt,
270 ScanMemType & scanMem,
271 const ScanParametersType & scanParameters,
278 UpdateQueuesToNextScanWindow(
const ScanIteratorType & scanIt,
279 ScanMemType & scanMem,
280 const ScanParametersType & scanParameters,
286 ComputeInformationFromQueues(
const ScanIteratorType & scanIt,
287 ScanMemType & scanMem,
288 const ScanParametersType & scanParameters,
292 ComputeMovingTransformDerivative(
const ScanIteratorType & scanIt,
293 ScanMemType & scanMem,
294 const ScanParametersType & scanParameters,
295 DerivativeType & deriv,
296 MeasureType & localCC,
302 TNeighborhoodCorrelationMetric * m_ANTSAssociate{};
303 std::once_flag m_ANTSAssociateOnceFlag{};
309 #ifndef ITK_MANUAL_INSTANTIATION
310 # include "itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx"