ITK
5.0.0
Insight Segmentation and Registration Toolkit
|
#include <itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h>
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 | |
using | AssociateType = typename Superclass::AssociateType |
using | ConstPointer = SmartPointer< const Self > |
using | DerivativeType = typename Superclass::DerivativeType |
using | DerivativeValueType = typename Superclass::DerivativeValueType |
using | DomainType = typename Superclass::DomainType |
using | FixedImageGradientType = typename Superclass::FixedImageGradientType |
using | FixedImagePixelType = typename Superclass::FixedImagePixelType |
using | FixedImagePointType = typename Superclass::FixedImagePointType |
using | FixedImageType = typename NeighborhoodCorrelationMetricType::FixedImageType |
using | ImageDimensionType = typename NeighborhoodCorrelationMetricType::ImageDimensionType |
using | ImageRegionType = typename NeighborhoodCorrelationMetricType::ImageRegionType |
using | InternalComputationValueType = typename NeighborhoodCorrelationMetricType::InternalComputationValueType |
using | JacobianType = typename NeighborhoodCorrelationMetricType::JacobianType |
using | MeasureType = typename Superclass::MeasureType |
using | MovingImageGradientType = typename Superclass::MovingImageGradientType |
using | MovingImagePixelType = typename Superclass::MovingImagePixelType |
using | MovingImagePointType = typename Superclass::MovingImagePointType |
using | MovingImageType = typename NeighborhoodCorrelationMetricType::MovingImageType |
using | NeighborhoodCorrelationMetricType = TNeighborhoodCorrelationMetric |
using | NumberOfParametersType = typename NeighborhoodCorrelationMetricType::NumberOfParametersType |
using | Pointer = SmartPointer< Self > |
using | QueueRealType = InternalComputationValueType |
using | RadiusType = typename NeighborhoodCorrelationMetricType::RadiusType |
using | ScanIteratorType = ConstNeighborhoodIterator< VirtualImageType > |
typedef struct itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader::ScanMemType | ScanMemType |
typedef struct itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader::ScanParametersType | ScanParametersType |
using | Self = ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader |
using | SumQueueType = std::deque< QueueRealType > |
using | Superclass = ImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric > |
using | VirtualImageType = typename Superclass::VirtualImageType |
using | VirtualIndexType = typename Superclass::VirtualIndexType |
using | VirtualPointType = typename Superclass::VirtualPointType |
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother () const |
virtual const char * | GetNameOfClass () const |
Static Public Member Functions | |
static Pointer | New () |
Private Attributes | |
TNeighborhoodCorrelationMetric * | m_ANTSAssociate |
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::AssociateType = typename Superclass::AssociateType |
Definition at line 75 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ConstPointer = SmartPointer< const Self > |
Definition at line 68 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::DerivativeType = typename Superclass::DerivativeType |
Definition at line 87 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::DerivativeValueType = typename Superclass::DerivativeValueType |
Definition at line 88 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::DomainType = typename Superclass::DomainType |
Definition at line 74 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::FixedImageGradientType = typename Superclass::FixedImageGradientType |
Definition at line 82 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::FixedImagePixelType = typename Superclass::FixedImagePixelType |
Definition at line 81 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::FixedImagePointType = typename Superclass::FixedImagePointType |
Definition at line 80 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::FixedImageType = typename NeighborhoodCorrelationMetricType::FixedImageType |
Definition at line 97 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ImageDimensionType = typename NeighborhoodCorrelationMetricType::ImageDimensionType |
Definition at line 94 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ImageRegionType = typename NeighborhoodCorrelationMetricType::ImageRegionType |
Definition at line 92 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::InternalComputationValueType = typename NeighborhoodCorrelationMetricType::InternalComputationValueType |
Definition at line 93 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::JacobianType = typename NeighborhoodCorrelationMetricType::JacobianType |
Definition at line 95 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::MeasureType = typename Superclass::MeasureType |
Definition at line 86 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::MovingImageGradientType = typename Superclass::MovingImageGradientType |
Definition at line 85 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::MovingImagePixelType = typename Superclass::MovingImagePixelType |
Definition at line 84 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::MovingImagePointType = typename Superclass::MovingImagePointType |
Definition at line 83 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::MovingImageType = typename NeighborhoodCorrelationMetricType::MovingImageType |
Definition at line 98 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::NeighborhoodCorrelationMetricType = TNeighborhoodCorrelationMetric |
Definition at line 90 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::NumberOfParametersType = typename NeighborhoodCorrelationMetricType::NumberOfParametersType |
Definition at line 96 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::Pointer = SmartPointer< Self > |
Definition at line 67 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::QueueRealType = InternalComputationValueType |
Definition at line 102 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::RadiusType = typename NeighborhoodCorrelationMetricType::RadiusType |
Definition at line 99 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ScanIteratorType = ConstNeighborhoodIterator<VirtualImageType> |
Definition at line 104 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
typedef struct itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader::ScanMemType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ScanMemType |
typedef struct itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader::ScanParametersType itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::ScanParametersType |
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::Self = ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader |
Standard class type aliases.
Definition at line 64 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::SumQueueType = std::deque<QueueRealType> |
Definition at line 103 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::Superclass = ImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric > |
Definition at line 66 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::VirtualImageType = typename Superclass::VirtualImageType |
Definition at line 77 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::VirtualIndexType = typename Superclass::VirtualIndexType |
Definition at line 79 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
using itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::VirtualPointType = typename Superclass::VirtualPointType |
Definition at line 78 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
|
inlineprotected |
Definition at line 148 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
|
protected |
Test to see if there are any voxels we need to handle in the current window.
|
protected |
virtual::itk::LightObject::Pointer itk::ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TNeighborhoodCorrelationMetric >::CreateAnother | ( | ) | const |
|
virtual |
|
protected |
Common functions for computing correlation over scanning windows Create an iterator over the virtual sub region
|
static |
|
inlineoverrideprotected |
ProcessPoint()
must be overloaded since it is a pure virtual function. It is not used for either sparse or dense threader.
Definition at line 212 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
|
inlineoverrideprotected |
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 185 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
|
protected |
|
inlineprotected |
Definition at line 200 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
|
inlineoverrideprotected |
Definition at line 228 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.
|
protected |
|
protected |
|
protected |
Update the queues for the next point. Calls either UpdateQueuesAtBeginningOfLine
or UpdateQueuesToNextScanWindow
.
|
protected |
|
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.
|
private |
Internal pointer to the metric object in use by this threader. This will avoid costly dynamic casting in tight loops.
Definition at line 288 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h.