18 #ifndef itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader_h
19 #define itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader_h
57 template <
typename TDomainPartitioner,
typename TImageToImageMetric,
typename TNeighborhoodCorrelationMetric>
74 using typename Superclass::DomainType;
75 using typename Superclass::AssociateType;
78 using typename Superclass::VirtualPointType;
79 using typename Superclass::VirtualIndexType;
80 using typename Superclass::FixedImagePointType;
81 using typename Superclass::FixedImagePixelType;
82 using typename Superclass::FixedImageGradientType;
83 using typename Superclass::MovingImagePointType;
84 using typename Superclass::MovingImagePixelType;
85 using typename Superclass::MovingImageGradientType;
86 using typename Superclass::MeasureType;
87 using typename Superclass::DerivativeType;
88 using typename Superclass::DerivativeValueType;
92 using ImageRegionType =
typename NeighborhoodCorrelationMetricType::ImageRegionType;
95 using JacobianType =
typename NeighborhoodCorrelationMetricType::JacobianType;
97 using FixedImageType =
typename NeighborhoodCorrelationMetricType::FixedImageType;
98 using MovingImageType =
typename NeighborhoodCorrelationMetricType::MovingImageType;
99 using RadiusType =
typename NeighborhoodCorrelationMetricType::RadiusType;
150 : m_ANTSAssociate(nullptr)
188 const VirtualPointType & virtualPoint,
197 const VirtualIndexType & virtualIndex,
198 const VirtualPointType & virtualPoint,
202 template <
typename T>
205 const VirtualIndexType & virtualIndex,
206 const VirtualPointType & virtualPoint,
209 return Superclass::ProcessVirtualPoint(virtualIndex, virtualPoint, threadId);
218 const VirtualPointType & itkNotUsed(virtualPoint),
219 const FixedImagePointType & itkNotUsed(mappedFixedPoint),
220 const FixedImagePixelType & itkNotUsed(mappedFixedPixelValue),
221 const FixedImageGradientType & itkNotUsed(mappedFixedImageGradient),
222 const MovingImagePointType & itkNotUsed(mappedMovingPoint),
223 const MovingImagePixelType & itkNotUsed(mappedMovingPixelValue),
224 const MovingImageGradientType & itkNotUsed(mappedMovingImageGradient),
225 MeasureType & itkNotUsed(metricValueReturn),
226 DerivativeType & itkNotUsed(localDerivativeReturn),
229 itkExceptionMacro(
"ProcessPoint should never be reached in ANTS CC metric threader class.");
240 ThreadedExecution_impl(
242 const DomainType & virtualImageSubRegion,
246 template <
typename T>
254 InitializeScanning(
const ImageRegionType & scanRegion,
255 ScanIteratorType & scanIt,
256 ScanMemType & scanMem,
257 ScanParametersType & scanParameters)
const;
262 UpdateQueues(
const ScanIteratorType & scanIt,
263 ScanMemType & scanMem,
264 const ScanParametersType & scanParameters,
268 UpdateQueuesAtBeginningOfLine(
const ScanIteratorType & scanIt,
269 ScanMemType & scanMem,
270 const ScanParametersType & scanParameters,
277 UpdateQueuesToNextScanWindow(
const ScanIteratorType & scanIt,
278 ScanMemType & scanMem,
279 const ScanParametersType & scanParameters,
285 ComputeInformationFromQueues(
const ScanIteratorType & scanIt,
286 ScanMemType & scanMem,
287 const ScanParametersType & scanParameters,
291 ComputeMovingTransformDerivative(
const ScanIteratorType & scanIt,
292 ScanMemType & scanMem,
293 const ScanParametersType & scanParameters,
294 DerivativeType & deriv,
295 MeasureType & localCC,
301 TNeighborhoodCorrelationMetric * m_ANTSAssociate{};
302 std::once_flag m_ANTSAssociateOnceFlag{};
308 #ifndef ITK_MANUAL_INSTANTIATION
309 # include "itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx"