ITK
4.13.0
Insight Segmentation and Registration Toolkit
|
#include <itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h>
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
TDomainPartitioner | type of the Domain, ThreadedImageRegionPartitioner or ThreadedIndexedContainerPartitioner |
TImageToImageMetricv4 | type of the ImageToImageMetricv4 |
This class provides a BeforeThreadedExecution
, and AfterThreadedExecution
.
The ThreadedExecution
in ImageToImageMetricv4GetValueAndDerivativeThreader calls ProcessVirtualPoint
on every point in the virtual image domain. ProcessVirtualPoint
calls ProcessPoint
on each point.
Definition at line 44 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
Classes | |
struct | GetValueAndDerivativePerThreadStruct |
Public Types | |
typedef Superclass::AssociateType | AssociateType |
typedef std::vector < CompensatedDerivativeValueType > | CompensatedDerivativeType |
typedef CompensatedSummation < DerivativeValueType > | CompensatedDerivativeValueType |
typedef SmartPointer< const Self > | ConstPointer |
typedef ImageToImageMetricv4Type::DerivativeType | DerivativeType |
typedef ImageToImageMetricv4Type::DerivativeValueType | DerivativeValueType |
typedef Superclass::DomainType | DomainType |
typedef ImageToImageMetricv4Type::FixedImageGradientType | FixedImageGradientType |
typedef ImageToImageMetricv4Type::FixedImageIndexType | FixedImageIndexType |
typedef ImageToImageMetricv4Type::FixedImagePixelType | FixedImagePixelType |
typedef ImageToImageMetricv4Type::FixedImagePointType | FixedImagePointType |
typedef FixedTransformType::OutputPointType | FixedOutputPointType |
typedef ImageToImageMetricv4Type::FixedTransformType | FixedTransformType |
typedef ImageToImageMetricv4Type::ImageDimensionType | ImageDimensionType |
typedef TImageToImageMetricv4 | ImageToImageMetricv4Type |
typedef ImageToImageMetricv4Type::InternalComputationValueType | InternalComputationValueType |
typedef ImageToImageMetricv4Type::JacobianType | JacobianType |
typedef ImageToImageMetricv4Type::MeasureType | MeasureType |
typedef ImageToImageMetricv4Type::MovingImageGradientType | MovingImageGradientType |
typedef ImageToImageMetricv4Type::MovingImagePixelType | MovingImagePixelType |
typedef ImageToImageMetricv4Type::MovingImagePointType | MovingImagePointType |
typedef MovingTransformType::OutputPointType | MovingOutputPointType |
typedef ImageToImageMetricv4Type::MovingTransformType | MovingTransformType |
typedef ImageToImageMetricv4Type::NumberOfParametersType | NumberOfParametersType |
typedef SmartPointer< Self > | Pointer |
typedef ImageToImageMetricv4GetValueAndDerivativeThreaderBase | Self |
typedef DomainThreader < TDomainPartitioner, TImageToImageMetricv4 > | Superclass |
typedef ImageToImageMetricv4Type::VirtualImageType | VirtualImageType |
typedef ImageToImageMetricv4Type::VirtualIndexType | VirtualIndexType |
typedef ImageToImageMetricv4Type::VirtualPointType | VirtualPointType |
Public Types inherited from itk::DomainThreader< TDomainPartitioner, TImageToImageMetricv4 > | |
typedef TImageToImageMetricv4 | AssociateType |
typedef SmartPointer< const Self > | ConstPointer |
typedef TDomainPartitioner | DomainPartitionerType |
typedef DomainPartitionerType::DomainType | DomainType |
typedef SmartPointer< Self > | Pointer |
typedef DomainThreader | Self |
typedef Object | Superclass |
Public Types inherited from itk::Object | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef Object | Self |
typedef LightObject | Superclass |
Public Types inherited from itk::LightObject | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef LightObject | Self |
Public Member Functions | |
virtual bool | GetComputeDerivative () const |
virtual const char * | GetNameOfClass () const |
Public Member Functions inherited from itk::DomainThreader< TDomainPartitioner, TImageToImageMetricv4 > | |
void | Execute (AssociateType *enclosingClass, const DomainType &domain) |
MultiThreader * | GetMultiThreader () const |
virtual ThreadIdType | GetNumberOfThreadsUsed () const |
virtual void | SetDomainPartitioner (DomainPartitionerType *_arg) |
virtual DomainPartitionerType * | GetModifiableDomainPartitioner () |
virtual const DomainPartitionerType * | GetDomainPartitioner () const |
ThreadIdType | GetMaximumNumberOfThreads () const |
void | SetMaximumNumberOfThreads (const ThreadIdType threads) |
Public Member Functions inherited from itk::Object | |
unsigned long | AddObserver (const EventObject &event, Command *) |
unsigned long | AddObserver (const EventObject &event, Command *) const |
virtual LightObject::Pointer | CreateAnother () const override |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
virtual void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) |
void | SetDebug (bool debugFlag) const |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
virtual void | SetReferenceCount (int) override |
virtual void | UnRegister () const noexceptoverride |
virtual void | SetObjectName (std::string _arg) |
virtual const std::string & | GetObjectName () const |
Public Member Functions inherited from itk::LightObject | |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
itkCloneMacro (Self) | |
void | Print (std::ostream &os, Indent indent=0) const |
Protected Member Functions | |
virtual void | AfterThreadedExecution () override |
virtual void | BeforeThreadedExecution () override |
ImageToImageMetricv4GetValueAndDerivativeThreaderBase () | |
itkAlignedTypedef (ITK_CACHE_LINE_ALIGNMENT, PaddedGetValueAndDerivativePerThreadStruct, AlignedGetValueAndDerivativePerThreadStruct) | |
itkPadStruct (ITK_CACHE_LINE_ALIGNMENT, GetValueAndDerivativePerThreadStruct, PaddedGetValueAndDerivativePerThreadStruct) | |
virtual bool | ProcessPoint (const VirtualIndexType &virtualIndex, const VirtualPointType &virtualPoint, const FixedImagePointType &mappedFixedPoint, const FixedImagePixelType &mappedFixedPixelValue, const FixedImageGradientType &mappedFixedImageGradient, const MovingImagePointType &mappedMovingPoint, const MovingImagePixelType &mappedMovingPixelValue, const MovingImageGradientType &mappedMovingImageGradient, MeasureType &metricValueReturn, DerivativeType &localDerivativeReturn, const ThreadIdType threadId) const =0 |
virtual bool | ProcessVirtualPoint (const VirtualIndexType &virtualIndex, const VirtualPointType &virtualPoint, const ThreadIdType threadId) |
virtual void | StorePointDerivativeResult (const VirtualIndexType &virtualIndex, const ThreadIdType threadId) |
virtual | ~ImageToImageMetricv4GetValueAndDerivativeThreaderBase () override |
Protected Member Functions inherited from itk::DomainThreader< TDomainPartitioner, TImageToImageMetricv4 > | |
virtual void | DetermineNumberOfThreadsUsed () |
DomainThreader () | |
virtual void | SetMultiThreader (MultiThreader *_arg) |
virtual void | ThreadedExecution (const DomainType &subdomain, const ThreadIdType threadId)=0 |
virtual | ~DomainThreader () override |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
virtual void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual void | SetTimeStamp (const TimeStamp &time) |
virtual | ~Object () override |
Protected Member Functions inherited from itk::LightObject | |
virtual LightObject::Pointer | InternalClone () const |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Protected Attributes | |
NumberOfParametersType | m_CachedNumberOfLocalParameters |
NumberOfParametersType | m_CachedNumberOfParameters |
AlignedGetValueAndDerivativePerThreadStruct * | m_GetValueAndDerivativePerThreadVariables |
Protected Attributes inherited from itk::DomainThreader< TDomainPartitioner, TImageToImageMetricv4 > | |
AssociateType * | m_Associate |
Protected Attributes inherited from itk::LightObject | |
AtomicInt< int > | m_ReferenceCount |
Additional Inherited Members | |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool flag) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Static Protected Member Functions inherited from itk::DomainThreader< TDomainPartitioner, TImageToImageMetricv4 > | |
static ITK_THREAD_RETURN_TYPE | ThreaderCallback (void *arg) |
typedef Superclass::AssociateType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::AssociateType |
Definition at line 58 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef std::vector<CompensatedDerivativeValueType> itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::CompensatedDerivativeType |
Definition at line 88 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef CompensatedSummation<DerivativeValueType> itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::CompensatedDerivativeValueType |
Definition at line 87 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef SmartPointer< const Self > itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::ConstPointer |
Definition at line 52 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::DerivativeType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::DerivativeType |
Definition at line 79 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::DerivativeValueType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::DerivativeValueType |
Definition at line 80 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef Superclass::DomainType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::DomainType |
Superclass types.
Definition at line 54 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::FixedImageGradientType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::FixedImageGradientType |
Definition at line 68 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::FixedImageIndexType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::FixedImageIndexType |
Definition at line 67 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::FixedImagePixelType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::FixedImagePixelType |
Definition at line 66 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::FixedImagePointType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::FixedImagePointType |
Definition at line 65 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef FixedTransformType::OutputPointType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::FixedOutputPointType |
Definition at line 74 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::FixedTransformType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::FixedTransformType |
Definition at line 73 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::ImageDimensionType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::ImageDimensionType |
Definition at line 82 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef TImageToImageMetricv4 itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::ImageToImageMetricv4Type |
Types of the target class.
Definition at line 61 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::InternalComputationValueType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::InternalComputationValueType |
Definition at line 84 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::JacobianType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::JacobianType |
Definition at line 81 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::MeasureType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::MeasureType |
Definition at line 78 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::MovingImageGradientType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::MovingImageGradientType |
Definition at line 71 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::MovingImagePixelType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::MovingImagePixelType |
Definition at line 70 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::MovingImagePointType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::MovingImagePointType |
Definition at line 69 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef MovingTransformType::OutputPointType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::MovingOutputPointType |
Definition at line 76 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::MovingTransformType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::MovingTransformType |
Definition at line 75 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::NumberOfParametersType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::NumberOfParametersType |
Definition at line 85 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef SmartPointer< Self > itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::Pointer |
Definition at line 51 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4GetValueAndDerivativeThreaderBase itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::Self |
Standard class typedefs.
Definition at line 49 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef DomainThreader< TDomainPartitioner, TImageToImageMetricv4 > itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::Superclass |
Definition at line 50 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::VirtualImageType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::VirtualImageType |
Definition at line 62 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::VirtualIndexType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::VirtualIndexType |
Definition at line 63 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
typedef ImageToImageMetricv4Type::VirtualPointType itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::VirtualPointType |
Definition at line 64 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
|
protected |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
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).
Reimplemented from itk::DomainThreader< TDomainPartitioner, TImageToImageMetricv4 >.
|
overrideprotectedvirtual |
Resize and initialize per thread objects.
Reimplemented from itk::DomainThreader< TDomainPartitioner, TImageToImageMetricv4 >.
|
virtual |
Access the GetValueAndDerivative() accesor in image metric base.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::DomainThreader< TDomainPartitioner, TImageToImageMetricv4 >.
Reimplemented in itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, and itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >.
|
protected |
|
protected |
|
protectedpure virtual |
Method to calculate the metric value and derivative given a point, value and image derivative for both fixed and moving spaces. The provided values have been calculated from virtualPoint
, which is provided in case it's needed.
virtualIndex | |
virtualPoint | is the point within the virtual domain from which the passed parameters have been calculated. |
mappedFixedPoint | is a valid point within the moving image space that has passed bounds checking, and lies within any mask that may be assigned. |
mappedFixedPixelValue | holds the pixel value at the mapped fixed point. |
mappedFixedImageGradient | holds the image gradient at the fixed point, but only when m_GradientSource is set to calculate fixed image gradients (either when it's set to calculate only fixed gradients, or both fixed and moving). Otherwise, the value is meaningless and should be ignored. |
mappedMovingPoint | |
mappedMovingPixelValue | |
mappedMovingImageGradient | These three parameters hold the point, pixel value and image gradient for the moving image space, as described above for the fixed image space. Results must be returned by derived classes in: |
metricValueReturn | |
localDerivativeReturn | |
threadId | may be used as needed, for example to access any per-thread data cached during pre-processing by the derived class. |
|
protectedvirtual |
Method 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.
|
protectedvirtual |
Store derivative result from a single point calculation.
|
mutableprotected |
Definition at line 197 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
|
mutableprotected |
Cached values to avoid call overhead. These will only be set once threading has been started.
Definition at line 196 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
|
mutableprotected |
Definition at line 191 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.