ITK  6.0.0
Insight Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric > Class Template Reference

#include <itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h>

Detailed Description

template<typename TDomainPartitioner, typename TImageToImageMetric, typename TCorrelationMetric>
class itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >

Processes points for CorrelationImageToImageMetricv4 GetValueAndDerivative.

Helper class for CorrelationImageToImageMetricv4 To compute the average pixel intensities of the fixed image and the moving image on the sampled points or inside the virtual image region: \( \bar f (CorrelationImageToImageMetricv4::m_AverageFix ) \) \( \bar m (CorrelationImageToImageMetricv4::m_AverageMov ) \).

Definition at line 35 of file itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.

+ Inheritance diagram for itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >:
+ Collaboration diagram for itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >:

Classes

struct  CorrelationMetricValueDerivativePerThreadStruct
 

Public Types

using ConstPointer = SmartPointer< const Self >
 
using FixedOutputPointType = typename FixedTransformType::OutputPointType
 
using FixedTransformType = typename ImageToImageMetricv4Type::FixedTransformType
 
using ImageToImageMetricv4Type = typename Superclass::ImageToImageMetricv4Type
 
using MovingOutputPointType = typename MovingTransformType::OutputPointType
 
using MovingTransformType = typename ImageToImageMetricv4Type::MovingTransformType
 
using Pointer = SmartPointer< Self >
 
using Self = CorrelationImageToImageMetricv4GetValueAndDerivativeThreader
 
using Superclass = ImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric >
 

Public Member Functions

const char * GetNameOfClass () const override
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

void AfterThreadedExecution () override
 
void BeforeThreadedExecution () override
 
 CorrelationImageToImageMetricv4GetValueAndDerivativeThreader ()
 
bool ProcessPoint (const VirtualIndexType &virtualIndex, const VirtualPointType &virtualPoint, const FixedImagePointType &mappedFixedPoint, const FixedImagePixelType &fixedImageValue, const FixedImageGradientType &mappedFixedImageGradient, const MovingImagePointType &mappedMovingPoint, const MovingImagePixelType &movingImageValue, const MovingImageGradientType &movingImageGradient, MeasureType &metricValueReturn, DerivativeType &localDerivativeReturn, const ThreadIdType threadId) const override
 
bool ProcessVirtualPoint (const VirtualIndexType &virtualIndex, const VirtualPointType &virtualPoint, const ThreadIdType threadId) override
 
 ~CorrelationImageToImageMetricv4GetValueAndDerivativeThreader () override=default
 

Private Member Functions

 itkAlignedTypedef (ITK_CACHE_LINE_ALIGNMENT, PaddedCorrelationMetricValueDerivativePerThreadStruct, AlignedCorrelationMetricValueDerivativePerThreadStruct)
 
 itkPadStruct (ITK_CACHE_LINE_ALIGNMENT, CorrelationMetricValueDerivativePerThreadStruct, PaddedCorrelationMetricValueDerivativePerThreadStruct)
 

Private Attributes

TCorrelationMetric * m_CorrelationAssociate {}
 
std::unique_ptr< AlignedCorrelationMetricValueDerivativePerThreadStruct[]> m_CorrelationMetricValueDerivativePerThreadVariables
 

Member Typedef Documentation

◆ ConstPointer

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
using itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::ConstPointer = SmartPointer<const Self>

◆ FixedOutputPointType

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
using itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::FixedOutputPointType = typename FixedTransformType::OutputPointType

◆ FixedTransformType

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
using itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::FixedTransformType = typename ImageToImageMetricv4Type::FixedTransformType

◆ ImageToImageMetricv4Type

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
using itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::ImageToImageMetricv4Type = typename Superclass::ImageToImageMetricv4Type

◆ MovingOutputPointType

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
using itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::MovingOutputPointType = typename MovingTransformType::OutputPointType

◆ MovingTransformType

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
using itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::MovingTransformType = typename ImageToImageMetricv4Type::MovingTransformType

◆ Pointer

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
using itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::Pointer = SmartPointer<Self>

◆ Self

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
using itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::Self = CorrelationImageToImageMetricv4GetValueAndDerivativeThreader

Standard class type aliases.

Definition at line 42 of file itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.

◆ Superclass

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
using itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::Superclass = ImageToImageMetricv4GetValueAndDerivativeThreader<TDomainPartitioner, TImageToImageMetric>

Constructor & Destructor Documentation

◆ CorrelationImageToImageMetricv4GetValueAndDerivativeThreader()

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader ( )
protected

◆ ~CorrelationImageToImageMetricv4GetValueAndDerivativeThreader()

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::~CorrelationImageToImageMetricv4GetValueAndDerivativeThreader ( )
overrideprotecteddefault

Member Function Documentation

◆ AfterThreadedExecution()

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
void itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::AfterThreadedExecution ( )
overrideprotected

Overload: Collects the results from each thread and sums them. Results are stored in the enclosing class m_Value and m_DerivativeResult. Behavior depends on m_AverageValueAndDerivativeByNumberOfValuePoints, m_NumberOfValidPoints, to average the value sum, and to average derivative sums for global transforms only (i.e. transforms without local support).

◆ BeforeThreadedExecution()

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
void itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::BeforeThreadedExecution ( )
overrideprotected

Overload: Resize and initialize per thread objects: number of valid points moving transform jacobian cross-correlation specific variables

◆ GetNameOfClass()

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
const char* itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::GetNameOfClass ( ) const
override

◆ itkAlignedTypedef()

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::itkAlignedTypedef ( ITK_CACHE_LINE_ALIGNMENT  ,
PaddedCorrelationMetricValueDerivativePerThreadStruct  ,
AlignedCorrelationMetricValueDerivativePerThreadStruct   
)
private

◆ itkPadStruct()

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::itkPadStruct ( ITK_CACHE_LINE_ALIGNMENT  ,
CorrelationMetricValueDerivativePerThreadStruct  ,
PaddedCorrelationMetricValueDerivativePerThreadStruct   
)
private

◆ New()

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
static Pointer itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::New ( )
static

◆ ProcessPoint()

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
bool itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::ProcessPoint ( const VirtualIndexType &  virtualIndex,
const VirtualPointType &  virtualPoint,
const FixedImagePointType &  mappedFixedPoint,
const FixedImagePixelType &  fixedImageValue,
const FixedImageGradientType &  mappedFixedImageGradient,
const MovingImagePointType &  mappedMovingPoint,
const MovingImagePixelType &  movingImageValue,
const MovingImageGradientType &  movingImageGradient,
MeasureType &  metricValueReturn,
DerivativeType &  localDerivativeReturn,
const ThreadIdType  threadId 
) const
overrideprotected

This function computes the local voxel-wise contribution of the metric to the global integral of the metric/derivative.

◆ ProcessVirtualPoint()

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
bool itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::ProcessVirtualPoint ( const VirtualIndexType &  virtualIndex,
const VirtualPointType &  virtualPoint,
const ThreadIdType  threadId 
)
overrideprotected

Overload to avoid execution of adding entries to m_MeasurePerThread StorePointDerivativeResult() after this function calls ProcessPoint(). Method called by the threaders to process the given virtual point. This in turn calls TransformAndEvaluateFixedPoint, TransformAndEvaluateMovingPoint, and ProcessPoint.

Member Data Documentation

◆ m_CorrelationAssociate

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
TCorrelationMetric* itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::m_CorrelationAssociate {}
private

Internal pointer to the metric object in use by this threader. This will avoid costly dynamic casting in tight loops.

Definition at line 156 of file itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.

◆ m_CorrelationMetricValueDerivativePerThreadVariables

template<typename TDomainPartitioner , typename TImageToImageMetric , typename TCorrelationMetric >
std::unique_ptr<AlignedCorrelationMetricValueDerivativePerThreadStruct[]> itk::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric >::m_CorrelationMetricValueDerivativePerThreadVariables
private

The documentation for this class was generated from the following file: