ITK  4.4.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric > Class Template Reference

#include <itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h>

+ Inheritance diagram for itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >:
+ Collaboration diagram for itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >:

Detailed Description

template<class TDomainPartitioner, class TImageToImageMetric, class TNeighborhoodCorrelationMetric>
class itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >

Threading implementation for ANTS CC metric ANTSNeighborhoodCorrelationImageToImageMetricv4 . Supports both dense and sparse threading ways. The dense threader iterates over the whole image domain in order and use a neighborhood scanning window to compute the local cross correlation metric and its derivative incrementally inside the window. The sparse threader uses a sampled point set partitioner to computer local cross correlation only at the sampled positions.

This threader class is designed to host the dense and sparse threader under the same name so most computation routine functions and interior member variables can be shared. This eliminates the need to duplicate codes for two threaders. This is made by using function overloading and a helper class to identify different types of domain partitioners.

Definition at line 57 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.

Classes

struct  ScanMemType
 
struct  ScanParametersType
 

Public Types

typedef Superclass::AssociateType AssociateType
 
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::DerivativeType DerivativeType
 
typedef
Superclass::DerivativeValueType 
DerivativeValueType
 
typedef Superclass::DomainType DomainType
 
typedef
Superclass::FixedImageGradientType 
FixedImageGradientType
 
typedef
Superclass::FixedImagePixelType 
FixedImagePixelType
 
typedef
Superclass::FixedImagePointType 
FixedImagePointType
 
typedef
NeighborhoodCorrelationMetricType::FixedImageType 
FixedImageType
 
typedef
NeighborhoodCorrelationMetricType::ImageDimensionType 
ImageDimensionType
 
typedef
NeighborhoodCorrelationMetricType::ImageRegionType 
ImageRegionType
 
typedef
NeighborhoodCorrelationMetricType::InternalComputationValueType 
InternalComputationValueType
 
typedef
NeighborhoodCorrelationMetricType::JacobianType 
JacobianType
 
typedef Superclass::MeasureType MeasureType
 
typedef
Superclass::MovingImageGradientType 
MovingImageGradientType
 
typedef
Superclass::MovingImagePixelType 
MovingImagePixelType
 
typedef
Superclass::MovingImagePointType 
MovingImagePointType
 
typedef
NeighborhoodCorrelationMetricType::MovingImageType 
MovingImageType
 
typedef
TNeighborhoodCorrelationMetric 
NeighborhoodCorrelationMetricType
 
typedef
NeighborhoodCorrelationMetricType::NumberOfParametersType 
NumberOfParametersType
 
typedef SmartPointer< SelfPointer
 
typedef
InternalComputationValueType 
QueueRealType
 
typedef
NeighborhoodCorrelationMetricType::RadiusType 
RadiusType
 
typedef
ConstNeighborhoodIterator
< VirtualImageType
ScanIteratorType
 
typedef struct
itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader::ScanMemType 
ScanMemType
 
typedef struct
itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader::ScanParametersType 
ScanParametersType
 
typedef
ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader 
Self
 
typedef std::deque< QueueRealTypeSumQueueType
 
typedef
ImageToImageMetricv4GetValueAndDerivativeThreader
< TDomainPartitioner,
TImageToImageMetric > 
Superclass
 
typedef
Superclass::VirtualImageType 
VirtualImageType
 
typedef
Superclass::VirtualIndexType 
VirtualIndexType
 
typedef
Superclass::VirtualPointType 
VirtualPointType
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader ()
 
bool ComputeInformationFromQueues (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 &local_cc, const ThreadIdType threadID) const
 
void InitializeScanning (const ImageRegionType &scanRegion, ScanIteratorType &scanIt, ScanMemType &scanMem, ScanParametersType &scanParameters) const
 
virtual bool ProcessPoint (const VirtualIndexType &, const VirtualPointType &, const FixedImagePointType &, const FixedImagePixelType &, const FixedImageGradientType &, const MovingImagePointType &, const MovingImagePixelType &, const MovingImageGradientType &, MeasureType &, DerivativeType &, const ThreadIdType) const
 
virtual bool ProcessVirtualPoint (const VirtualIndexType &virtualIndex, const VirtualPointType &virtualPoint, const ThreadIdType threadId)
 
bool ProcessVirtualPoint_impl (IdentityHelper< ThreadedIndexedContainerPartitioner >, const VirtualIndexType &virtualIndex, const VirtualPointType &virtualPoint, const ThreadIdType threadId)
 
template<class T >
bool ProcessVirtualPoint_impl (IdentityHelper< T >, const VirtualIndexType &virtualIndex, const VirtualPointType &virtualPoint, const ThreadIdType threadId)
 
virtual void ThreadedExecution (const DomainType &domain, const ThreadIdType threadId)
 
void ThreadedExecution_impl (IdentityHelper< ThreadedImageRegionPartitioner< TImageToImageMetric::VirtualImageDimension > >, const DomainType &domain, const ThreadIdType threadId)
 
template<class T >
void ThreadedExecution_impl (IdentityHelper< T >, const DomainType &domain, const ThreadIdType threadId)
 
void UpdateQueues (const ScanIteratorType &scanIt, ScanMemType &scanMem, const ScanParametersType &scanParameters, const ThreadIdType threadID) const
 
void UpdateQueuesAtBeginningOfLine (const ScanIteratorType &scanIt, ScanMemType &scanMem, const ScanParametersType &scanParameters, const ThreadIdType threadID) const
 
void UpdateQueuesToNextScanWindow (const ScanIteratorType &scanIt, ScanMemType &scanMem, const ScanParametersType &scanParameters, const ThreadIdType threadID) const
 

Private Member Functions

 ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader (const Self &)
 
void operator= (const Self &)
 

Private Attributes

TNeighborhoodCorrelationMetric * m_ANTSAssociate
 

Member Typedef Documentation

template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef Superclass::AssociateType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::AssociateType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef SmartPointer< const Self > itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ConstPointer
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef Superclass::DerivativeType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::DerivativeType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef Superclass::DerivativeValueType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::DerivativeValueType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef Superclass::DomainType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::DomainType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef Superclass::FixedImageGradientType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::FixedImageGradientType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef Superclass::FixedImagePixelType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::FixedImagePixelType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef Superclass::FixedImagePointType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::FixedImagePointType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef NeighborhoodCorrelationMetricType::FixedImageType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::FixedImageType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef NeighborhoodCorrelationMetricType::ImageDimensionType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ImageDimensionType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef NeighborhoodCorrelationMetricType::ImageRegionType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ImageRegionType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef NeighborhoodCorrelationMetricType::InternalComputationValueType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::InternalComputationValueType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef NeighborhoodCorrelationMetricType::JacobianType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::JacobianType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef Superclass::MeasureType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::MeasureType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef Superclass::MovingImageGradientType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::MovingImageGradientType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef Superclass::MovingImagePixelType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::MovingImagePixelType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef Superclass::MovingImagePointType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::MovingImagePointType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef NeighborhoodCorrelationMetricType::MovingImageType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::MovingImageType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef TNeighborhoodCorrelationMetric itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::NeighborhoodCorrelationMetricType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef NeighborhoodCorrelationMetricType::NumberOfParametersType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::NumberOfParametersType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef SmartPointer< Self > itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::Pointer
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef InternalComputationValueType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::QueueRealType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef NeighborhoodCorrelationMetricType::RadiusType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::RadiusType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef ConstNeighborhoodIterator<VirtualImageType> itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ScanIteratorType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef struct itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader::ScanMemType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ScanMemType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef struct itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader::ScanParametersType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ScanParametersType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::Self

Standard class typedefs.

Definition at line 62 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.

template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef std::deque<QueueRealType> itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::SumQueueType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef ImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric > itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::Superclass
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef Superclass::VirtualImageType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::VirtualImageType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef Superclass::VirtualIndexType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::VirtualIndexType
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
typedef Superclass::VirtualPointType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::VirtualPointType

Constructor & Destructor Documentation

template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader ( )
inlineprotected
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader ( const Self )
private

Member Function Documentation

template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
bool itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ComputeInformationFromQueues ( const ScanIteratorType scanIt,
ScanMemType scanMem,
const ScanParametersType scanParameters,
const ThreadIdType  threadID 
) const
protected

Test to see if there are any voxels we need to handle in the current window.

template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
void itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ComputeMovingTransformDerivative ( const ScanIteratorType scanIt,
ScanMemType scanMem,
const ScanParametersType scanParameters,
DerivativeType deriv,
MeasureType local_cc,
const ThreadIdType  threadID 
) const
protected
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
virtual::itk::LightObject::Pointer itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::CreateAnother ( void  ) const
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
virtual const char* itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::GetNameOfClass ( ) const
virtual
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
void itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::InitializeScanning ( const ImageRegionType scanRegion,
ScanIteratorType scanIt,
ScanMemType scanMem,
ScanParametersType scanParameters 
) const
protected

Common functions for computing correlation over scanning windows Create an iterator over the virtual sub region

template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
static Pointer itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::New ( )
static
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
void itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::operator= ( const Self )
private
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
virtual bool itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ProcessPoint ( const VirtualIndexType ,
const VirtualPointType ,
const FixedImagePointType ,
const FixedImagePixelType ,
const FixedImageGradientType ,
const MovingImagePointType ,
const MovingImagePixelType ,
const MovingImageGradientType ,
MeasureType ,
DerivativeType ,
const ThreadIdType   
) const
inlineprotectedvirtual

ProcessPoint() must be overloaded since it is a pure virtual function. It is not used for either sparse or dense threader.

Definition at line 208 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.

template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
virtual bool itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ProcessVirtualPoint ( const VirtualIndexType virtualIndex,
const VirtualPointType virtualPoint,
const ThreadIdType  threadId 
)
inlineprotectedvirtual

Dense threader and sparse threader invoke different in multi-threading. This class uses overloaded implementations of ProcessVirtualPoint_impl and ThreadExecution_impl in order to handle the dense and sparse cases differently. The helper class IdentityHelper allows for correct overloading these methods when substituting different type of the threaded partitioner

1) Dense threader: through its own ThreadedExecution. ProcessVirtualPoint and ProcessPoint of the base class are thus not used.

2) Sparse threader: through its own ProcessVirtualPoint. ThreadedExecution still invokes (mostly) from the base class.

In order to invoke different ThreadedExecution by different threader, we use function overloading techniques to resolve which version of ThreadedExecution and ProcessVirtualPoint by the type of the domain partitioner.

Specifically, a helper class IdentityHelper is used as a function parameter, with the sole purpose to differentiate different types of domain partitioners: ThreadedIndexedContainerPartitioner for sparse or ThreadedImageRegionPartitioner for dense. IdentityHelper is simply a class template, ie. a struct wrapper of type template arguments.

This technique takes advantage of SFINAE (Substitution Failure Is Not An Error) in specializing function templates. The helper class IdentityHelper is used to overload w.r.t different partitioner types. More discussion can be found at: http://stackoverflow.com/questions/3052579/explicit-specialization-in-non-namespace-scopeMethod called by the threaders to process the given virtual point. This in turn calls TransformAndEvaluateFixedPoint, TransformAndEvaluateMovingPoint, and ProcessPoint. And adds entries to m_MeasurePerThread and m_LocalDerivativesPerThread, m_NumberOfValidPointsPerThread.

Definition at line 181 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.

References itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ProcessVirtualPoint_impl().

template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
bool itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ProcessVirtualPoint_impl ( IdentityHelper< ThreadedIndexedContainerPartitioner ,
const VirtualIndexType virtualIndex,
const VirtualPointType virtualPoint,
const ThreadIdType  threadId 
)
protected
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
template<class T >
bool itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ProcessVirtualPoint_impl ( IdentityHelper< T >  ,
const VirtualIndexType virtualIndex,
const VirtualPointType virtualPoint,
const ThreadIdType  threadId 
)
inlineprotected
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
virtual void itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ThreadedExecution ( const DomainType domain,
const ThreadIdType  threadId 
)
inlineprotectedvirtual
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
void itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ThreadedExecution_impl ( IdentityHelper< ThreadedImageRegionPartitioner< TImageToImageMetric::VirtualImageDimension > >  ,
const DomainType domain,
const ThreadIdType  threadId 
)
protected
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
template<class T >
void itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ThreadedExecution_impl ( IdentityHelper< T >  ,
const DomainType domain,
const ThreadIdType  threadId 
)
protected
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
void itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::UpdateQueues ( const ScanIteratorType scanIt,
ScanMemType scanMem,
const ScanParametersType scanParameters,
const ThreadIdType  threadID 
) const
protected

Update the queues for the next point. Calls either UpdateQueuesAtBeginningOfLine or UpdateQueuesToNextScanWindow.

template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
void itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::UpdateQueuesAtBeginningOfLine ( const ScanIteratorType scanIt,
ScanMemType scanMem,
const ScanParametersType scanParameters,
const ThreadIdType  threadID 
) const
protected
template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
void itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::UpdateQueuesToNextScanWindow ( const ScanIteratorType scanIt,
ScanMemType scanMem,
const ScanParametersType scanParameters,
const ThreadIdType  threadID 
) const
protected

Increment the iterator and check to see if we're at the end of the line. If so, go to the next line. Otherwise, add the the values for the next hyperplane.

Member Data Documentation

template<class TDomainPartitioner , class TImageToImageMetric , class TNeighborhoodCorrelationMetric >
TNeighborhoodCorrelationMetric* itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::m_ANTSAssociate
private

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

Definition at line 286 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.


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