18#ifndef itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader_h
19#define itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader_h
57template <
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.");
242 const DomainType & virtualImageSubRegion,
246 template <
typename T>
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"
Threading implementation for ANTS CC metric ANTSNeighborhoodCorrelationImageToImageMetricv4 ....
typename NeighborhoodCorrelationMetricType::FixedImageType FixedImageType
typename NeighborhoodCorrelationMetricType::JacobianType JacobianType
bool ComputeInformationFromQueues(const ScanIteratorType &scanIt, ScanMemType &scanMem, const ScanParametersType &scanParameters, const ThreadIdType threadId) const
TNeighborhoodCorrelationMetric NeighborhoodCorrelationMetricType
typename NeighborhoodCorrelationMetricType::ImageDimensionType ImageDimensionType
void InitializeScanning(const ImageRegionType &scanRegion, ScanIteratorType &scanIt, ScanMemType &scanMem, ScanParametersType &scanParameters) const
ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader()
typename NeighborhoodCorrelationMetricType::ImageRegionType ImageRegionType
typename NeighborhoodCorrelationMetricType::NumberOfParametersType NumberOfParametersType
bool ProcessVirtualPoint_impl(IdentityHelper< T >, const VirtualIndexType &virtualIndex, const VirtualPointType &virtualPoint, const ThreadIdType threadId)
bool ProcessVirtualPoint_impl(IdentityHelper< ThreadedIndexedContainerPartitioner >, const VirtualIndexType &virtualIndex, const VirtualPointType &virtualPoint, const ThreadIdType threadId)
void UpdateQueuesToNextScanWindow(const ScanIteratorType &scanIt, ScanMemType &scanMem, const ScanParametersType &scanParameters, const ThreadIdType threadId) const
void ComputeMovingTransformDerivative(const ScanIteratorType &scanIt, ScanMemType &scanMem, const ScanParametersType &scanParameters, DerivativeType &deriv, MeasureType &localCC, const ThreadIdType threadId) const
std::deque< QueueRealType > SumQueueType
void UpdateQueuesAtBeginningOfLine(const ScanIteratorType &scanIt, ScanMemType &scanMem, const ScanParametersType &scanParameters, const ThreadIdType threadId) const
typename NeighborhoodCorrelationMetricType::RadiusType RadiusType
InternalComputationValueType QueueRealType
void UpdateQueues(const ScanIteratorType &scanIt, ScanMemType &scanMem, const ScanParametersType &scanParameters, const ThreadIdType threadId) const
void ThreadedExecution_impl(IdentityHelper< ThreadedImageRegionPartitioner< TImageToImageMetric::VirtualImageDimension > >, const DomainType &virtualImageSubRegion, const ThreadIdType threadId)
void ThreadedExecution_impl(IdentityHelper< T >, const DomainType &domain, const ThreadIdType threadId)
void ThreadedExecution(const DomainType &domain, const ThreadIdType threadId) override
bool ProcessVirtualPoint(const VirtualIndexType &virtualIndex, const VirtualPointType &virtualPoint, const ThreadIdType threadId) override
typename NeighborhoodCorrelationMetricType::MovingImageType MovingImageType
bool ProcessPoint(const VirtualIndexType &, const VirtualPointType &, const FixedImagePointType &, const FixedImagePixelType &, const FixedImageGradientType &, const MovingImagePointType &, const MovingImagePixelType &, const MovingImageGradientType &, MeasureType &, DerivativeType &, const ThreadIdType) const override
typename Superclass::VirtualImageType VirtualImageType
typename NeighborhoodCorrelationMetricType::InternalComputationValueType InternalComputationValueType
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
Class for partitioning of an ImageRegion.
SmartPointer< const Self > ConstPointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned int ThreadIdType
unsigned long SizeValueType
MovingImagePointType mappedMovingPoint
VirtualPointType virtualPoint
SumQueueType QsumFixedMoving
QueueRealType sFixedMoving
FixedImageGradientType fixedImageGradient
MovingImageGradientType movingImageGradient
QueueRealType sFixedFixed
FixedImagePointType mappedFixedPoint
QueueRealType sMovingMoving
ImageRegionType scanRegion
FixedImageType::ConstPointer fixedImage
SizeValueType numberOfFillZero
SizeValueType windowLength
VirtualImageType::ConstPointer virtualImage
IndexValueType scanRegionBeginIndexDim0
MovingImageType::ConstPointer movingImage