ITK
5.0.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 | |
using | AssociateType = typename Superclass::AssociateType |
using | CompensatedDerivativeType = std::vector< CompensatedDerivativeValueType > |
using | CompensatedDerivativeValueType = CompensatedSummation< DerivativeValueType > |
using | ConstPointer = SmartPointer< const Self > |
using | DerivativeType = typename ImageToImageMetricv4Type::DerivativeType |
using | DerivativeValueType = typename ImageToImageMetricv4Type::DerivativeValueType |
using | DomainType = typename Superclass::DomainType |
using | FixedImageGradientType = typename ImageToImageMetricv4Type::FixedImageGradientType |
using | FixedImageIndexType = typename ImageToImageMetricv4Type::FixedImageIndexType |
using | FixedImagePixelType = typename ImageToImageMetricv4Type::FixedImagePixelType |
using | FixedImagePointType = typename ImageToImageMetricv4Type::FixedImagePointType |
using | FixedOutputPointType = typename FixedTransformType::OutputPointType |
using | FixedTransformType = typename ImageToImageMetricv4Type::FixedTransformType |
using | ImageDimensionType = typename ImageToImageMetricv4Type::ImageDimensionType |
using | ImageToImageMetricv4Type = TImageToImageMetricv4 |
using | InternalComputationValueType = typename ImageToImageMetricv4Type::InternalComputationValueType |
using | JacobianType = typename ImageToImageMetricv4Type::JacobianType |
using | MeasureType = typename ImageToImageMetricv4Type::MeasureType |
using | MovingImageGradientType = typename ImageToImageMetricv4Type::MovingImageGradientType |
using | MovingImagePixelType = typename ImageToImageMetricv4Type::MovingImagePixelType |
using | MovingImagePointType = typename ImageToImageMetricv4Type::MovingImagePointType |
using | MovingOutputPointType = typename MovingTransformType::OutputPointType |
using | MovingTransformType = typename ImageToImageMetricv4Type::MovingTransformType |
using | NumberOfParametersType = typename ImageToImageMetricv4Type::NumberOfParametersType |
using | Pointer = SmartPointer< Self > |
using | Self = ImageToImageMetricv4GetValueAndDerivativeThreaderBase |
using | Superclass = DomainThreader< TDomainPartitioner, TImageToImageMetricv4 > |
using | VirtualImageType = typename ImageToImageMetricv4Type::VirtualImageType |
using | VirtualIndexType = typename ImageToImageMetricv4Type::VirtualIndexType |
using | VirtualPointType = typename ImageToImageMetricv4Type::VirtualPointType |
Public Types inherited from itk::DomainThreader< TDomainPartitioner, TImageToImageMetricv4 > | |
using | AssociateType = TImageToImageMetricv4 |
using | ConstPointer = SmartPointer< const Self > |
using | DomainPartitionerType = TDomainPartitioner |
using | DomainType = typename DomainPartitionerType::DomainType |
using | Pointer = SmartPointer< Self > |
using | Self = DomainThreader |
using | Superclass = Object |
Public Types inherited from itk::Object | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = Object |
using | Superclass = LightObject |
Public Types inherited from itk::LightObject | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = LightObject |
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) |
MultiThreaderBase * | GetMultiThreader () const |
virtual ThreadIdType | GetNumberOfWorkUnitsUsed () const |
virtual void | SetDomainPartitioner (DomainPartitionerType *_arg) |
virtual DomainPartitionerType * | GetModifiableDomainPartitioner () |
virtual const DomainPartitionerType * | GetDomainPartitioner () const |
virtual void | SetNumberOfWorkUnits (ThreadIdType _arg) |
virtual ThreadIdType | GetNumberOfWorkUnits () 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 |
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 |
void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) |
void | SetDebug (bool debugFlag) const |
void | SetReferenceCount (int) override |
void | UnRegister () const noexceptoverride |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
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 | |
void | AfterThreadedExecution () override |
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) |
~ImageToImageMetricv4GetValueAndDerivativeThreaderBase () override | |
Protected Member Functions inherited from itk::DomainThreader< TDomainPartitioner, TImageToImageMetricv4 > | |
virtual void | DetermineNumberOfWorkUnitsUsed () |
DomainThreader () | |
virtual void | SetMultiThreader (MultiThreaderBase *_arg) |
virtual void | ThreadedExecution (const DomainType &subdomain, const ThreadIdType threadId)=0 |
~DomainThreader () override=default | |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual void | SetTimeStamp (const TimeStamp &time) |
~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 | |
std::atomic< 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_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::AssociateType = typename Superclass::AssociateType |
Definition at line 60 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::CompensatedDerivativeType = std::vector<CompensatedDerivativeValueType> |
Definition at line 90 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::CompensatedDerivativeValueType = CompensatedSummation<DerivativeValueType> |
Definition at line 89 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::ConstPointer = SmartPointer< const Self > |
Definition at line 54 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::DerivativeType = typename ImageToImageMetricv4Type::DerivativeType |
Definition at line 81 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::DerivativeValueType = typename ImageToImageMetricv4Type::DerivativeValueType |
Definition at line 82 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::DomainType = typename Superclass::DomainType |
Superclass types.
Definition at line 59 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::FixedImageGradientType = typename ImageToImageMetricv4Type::FixedImageGradientType |
Definition at line 70 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::FixedImageIndexType = typename ImageToImageMetricv4Type::FixedImageIndexType |
Definition at line 69 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::FixedImagePixelType = typename ImageToImageMetricv4Type::FixedImagePixelType |
Definition at line 68 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::FixedImagePointType = typename ImageToImageMetricv4Type::FixedImagePointType |
Definition at line 67 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::FixedOutputPointType = typename FixedTransformType::OutputPointType |
Definition at line 76 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::FixedTransformType = typename ImageToImageMetricv4Type::FixedTransformType |
Definition at line 75 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::ImageDimensionType = typename ImageToImageMetricv4Type::ImageDimensionType |
Definition at line 84 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::ImageToImageMetricv4Type = TImageToImageMetricv4 |
Types of the target class.
Definition at line 63 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::InternalComputationValueType = typename ImageToImageMetricv4Type::InternalComputationValueType |
Definition at line 86 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::JacobianType = typename ImageToImageMetricv4Type::JacobianType |
Definition at line 83 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::MeasureType = typename ImageToImageMetricv4Type::MeasureType |
Definition at line 80 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::MovingImageGradientType = typename ImageToImageMetricv4Type::MovingImageGradientType |
Definition at line 73 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::MovingImagePixelType = typename ImageToImageMetricv4Type::MovingImagePixelType |
Definition at line 72 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::MovingImagePointType = typename ImageToImageMetricv4Type::MovingImagePointType |
Definition at line 71 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::MovingOutputPointType = typename MovingTransformType::OutputPointType |
Definition at line 78 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::MovingTransformType = typename ImageToImageMetricv4Type::MovingTransformType |
Definition at line 77 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::NumberOfParametersType = typename ImageToImageMetricv4Type::NumberOfParametersType |
Definition at line 87 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::Pointer = SmartPointer< Self > |
Definition at line 53 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::Self = ImageToImageMetricv4GetValueAndDerivativeThreaderBase |
Standard class type aliases.
Definition at line 51 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::Superclass = DomainThreader< TDomainPartitioner, TImageToImageMetricv4 > |
Definition at line 52 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::VirtualImageType = typename ImageToImageMetricv4Type::VirtualImageType |
Definition at line 64 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::VirtualIndexType = typename ImageToImageMetricv4Type::VirtualIndexType |
Definition at line 65 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
using itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >::VirtualPointType = typename ImageToImageMetricv4Type::VirtualPointType |
Definition at line 66 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
|
protected |
|
overrideprotected |
|
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 199 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
|
mutableprotected |
Cached values to avoid call overhead. These will only be set once threading has been started.
Definition at line 198 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.
|
mutableprotected |
Definition at line 193 of file itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h.