ITK  4.1.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
itk::DomainThreader< TDomainPartitioner, TAssociate > Class Template Reference

#include <itkDomainThreader.h>

+ Inheritance diagram for itk::DomainThreader< TDomainPartitioner, TAssociate >:
+ Collaboration diagram for itk::DomainThreader< TDomainPartitioner, TAssociate >:

List of all members.

Classes

struct  ThreadStruct

Public Types

typedef TAssociate AssociateType
typedef SmartPointer< const SelfConstPointer
typedef TDomainPartitioner DomainPartitionerType
typedef
DomainPartitionerType::DomainType 
DomainType
typedef SmartPointer< SelfPointer
typedef DomainThreader Self
typedef Object Superclass

Public Member Functions

void Execute (AssociateType *enclosingClass, const DomainType &domain)
MultiThreader * GetMultiThreader () const
virtual const char * GetNameOfClass () const
virtual ThreadIdType GetNumberOfThreadsUsed () const
virtual void SetDomainPartitioner (DomainPartitionerType *_arg)
virtual const
DomainPartitionerType
GetDomainPartitioner ()
ThreadIdType GetMaximumNumberOfThreads () const
void SetMaximumNumberOfThreads (const ThreadIdType threads)

Protected Member Functions

virtual void AfterThreadedExecution ()
virtual void BeforeThreadedExecution ()
virtual void DetermineNumberOfThreadsUsed ()
 DomainThreader ()
virtual void SetMultiThreader (MultiThreader *_arg)
virtual void ThreadedExecution (const DomainType &subdomain, const ThreadIdType threadId)=0
virtual ~DomainThreader ()

Static Protected Member Functions

static ITK_THREAD_RETURN_TYPE ThreaderCallback (void *arg)

Protected Attributes

AssociateTypem_Associate

Private Member Functions

 DomainThreader (const Self &)
void operator= (const Self &)
void StartThreadingSequence ()

Private Attributes

DomainType m_CompleteDomain
DomainPartitionerType::Pointer m_DomainPartitioner
MultiThreader::Pointer m_MultiThreader
ThreadIdType m_NumberOfThreadsUsed

Detailed Description

template<class TDomainPartitioner, class TAssociate>
class itk::DomainThreader< TDomainPartitioner, TAssociate >

Multi-threaded processing on a domain by processing sub-domains per thread.

This class uses a ThreadedDomainPartitioner as a helper to split the domain into subdomains. Each subdomain is then processed in the ThreadedExecution method.

The data on which to perform the processing is assumed to be members of an associating class. Therefore, to perform a threaded operation in a class, the associating class usually will declare derived versions of this class as a friend class.

To use this class, at a minimum,

If a 'threaded method' is desired to perform some data processing in a class, a derived version of this class can be defined to perform the threaded operation. Since a threaded operation is relatively complex compared to a simple serial operation, a class instead of a simple method is required. Inside this class, the method to partition the data is handled, the logic for determining the number of threads is determined, and operations surrounding the threading are encapsulated into the class with the DetermineNumberOfThreadsToUse, BeforeThreadedExecution, ThreadedExecution, and AfterThreadedExecution virtual methods.

Template Parameters:
TDomainPartitionerA class that inherits from ThreadedDomainPartitioner.
TAssociateThe asssociated class that uses a derived version of this class as a "threaded method". The associated class usually declares derived version of this class as nested classes so there is easy access to its protected and private members in ThreadedExecution.

Definition at line 66 of file itkDomainThreader.h.


Member Typedef Documentation

template<class TDomainPartitioner, class TAssociate>
typedef TAssociate itk::DomainThreader< TDomainPartitioner, TAssociate >::AssociateType

Reimplemented in itk::LevelSetEvolutionComputeIterationThreader< WhitakerSparseLevelSetImage< TOutput, VDimension >, ThreadedIteratorRangePartitioner< typename WhitakerSparseLevelSetImage< TOutput, VDimension >::LayerConstIterator >, TLevelSetEvolution >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedIteratorRangePartitioner< typename TLevelSetEvolution::DomainMapImageFilterType::DomainMapType::const_iterator >, TLevelSetEvolution >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::LevelSetEvolutionUpdateLevelSetsThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader, itk::GradientDescentOptimizerBasev4ModifyGradientByScalesThreader, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< TDomainPartitioner, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, and itk::QuasiNewtonOptimizerv4EstimateNewtonStepThreader.

Definition at line 78 of file itkDomainThreader.h.

template<class TDomainPartitioner, class TAssociate>
typedef SmartPointer< const Self > itk::DomainThreader< TDomainPartitioner, TAssociate >::ConstPointer

Reimplemented from itk::Object.

Reimplemented in itk::ProcessObject::ProcessObjectDomainThreader< TDomainPartitioner, TAssociate >, itk::LevelSetEvolutionComputeIterationThreader< WhitakerSparseLevelSetImage< TOutput, VDimension >, ThreadedIteratorRangePartitioner< typename WhitakerSparseLevelSetImage< TOutput, VDimension >::LayerConstIterator >, TLevelSetEvolution >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedIteratorRangePartitioner< typename TLevelSetEvolution::DomainMapImageFilterType::DomainMapType::const_iterator >, TLevelSetEvolution >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::LevelSetEvolutionUpdateLevelSetsThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< TDomainPartitioner, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, itk::GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader, itk::GradientDescentOptimizerBasev4ModifyGradientByScalesThreader, and itk::QuasiNewtonOptimizerv4EstimateNewtonStepThreader.

Definition at line 73 of file itkDomainThreader.h.

template<class TDomainPartitioner, class TAssociate>
typedef TDomainPartitioner itk::DomainThreader< TDomainPartitioner, TAssociate >::DomainPartitionerType
template<class TDomainPartitioner, class TAssociate>
typedef DomainPartitionerType::DomainType itk::DomainThreader< TDomainPartitioner, TAssociate >::DomainType

Reimplemented in itk::ProcessObject::ProcessObjectDomainThreader< TDomainPartitioner, TAssociate >, itk::LevelSetEvolutionComputeIterationThreader< WhitakerSparseLevelSetImage< TOutput, VDimension >, ThreadedIteratorRangePartitioner< typename WhitakerSparseLevelSetImage< TOutput, VDimension >::LayerConstIterator >, TLevelSetEvolution >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedIteratorRangePartitioner< typename TLevelSetEvolution::DomainMapImageFilterType::DomainMapType::const_iterator >, TLevelSetEvolution >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::LevelSetEvolutionUpdateLevelSetsThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader, itk::GradientDescentOptimizerBasev4ModifyGradientByScalesThreader, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< TDomainPartitioner, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, and itk::QuasiNewtonOptimizerv4EstimateNewtonStepThreader.

Definition at line 76 of file itkDomainThreader.h.

template<class TDomainPartitioner, class TAssociate>
typedef SmartPointer< Self > itk::DomainThreader< TDomainPartitioner, TAssociate >::Pointer

Reimplemented from itk::Object.

Reimplemented in itk::ProcessObject::ProcessObjectDomainThreader< TDomainPartitioner, TAssociate >, itk::LevelSetEvolutionComputeIterationThreader< WhitakerSparseLevelSetImage< TOutput, VDimension >, ThreadedIteratorRangePartitioner< typename WhitakerSparseLevelSetImage< TOutput, VDimension >::LayerConstIterator >, TLevelSetEvolution >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedIteratorRangePartitioner< typename TLevelSetEvolution::DomainMapImageFilterType::DomainMapType::const_iterator >, TLevelSetEvolution >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::LevelSetEvolutionUpdateLevelSetsThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< TDomainPartitioner, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, itk::GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader, itk::GradientDescentOptimizerBasev4ModifyGradientByScalesThreader, and itk::QuasiNewtonOptimizerv4EstimateNewtonStepThreader.

Definition at line 72 of file itkDomainThreader.h.

template<class TDomainPartitioner, class TAssociate>
typedef DomainThreader itk::DomainThreader< TDomainPartitioner, TAssociate >::Self

Standard class typedefs.

Reimplemented from itk::Object.

Reimplemented in itk::ProcessObject::ProcessObjectDomainThreader< TDomainPartitioner, TAssociate >, itk::LevelSetEvolutionComputeIterationThreader< WhitakerSparseLevelSetImage< TOutput, VDimension >, ThreadedIteratorRangePartitioner< typename WhitakerSparseLevelSetImage< TOutput, VDimension >::LayerConstIterator >, TLevelSetEvolution >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedIteratorRangePartitioner< typename TLevelSetEvolution::DomainMapImageFilterType::DomainMapType::const_iterator >, TLevelSetEvolution >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::LevelSetEvolutionUpdateLevelSetsThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< TDomainPartitioner, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, itk::GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader, itk::GradientDescentOptimizerBasev4ModifyGradientByScalesThreader, and itk::QuasiNewtonOptimizerv4EstimateNewtonStepThreader.

Definition at line 70 of file itkDomainThreader.h.

template<class TDomainPartitioner, class TAssociate>
typedef Object itk::DomainThreader< TDomainPartitioner, TAssociate >::Superclass

Reimplemented from itk::Object.

Reimplemented in itk::ProcessObject::ProcessObjectDomainThreader< TDomainPartitioner, TAssociate >, itk::LevelSetEvolutionComputeIterationThreader< WhitakerSparseLevelSetImage< TOutput, VDimension >, ThreadedIteratorRangePartitioner< typename WhitakerSparseLevelSetImage< TOutput, VDimension >::LayerConstIterator >, TLevelSetEvolution >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedIteratorRangePartitioner< typename TLevelSetEvolution::DomainMapImageFilterType::DomainMapType::const_iterator >, TLevelSetEvolution >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::LevelSetEvolutionUpdateLevelSetsThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< TDomainPartitioner, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, itk::GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader, itk::GradientDescentOptimizerBasev4ModifyGradientByScalesThreader, and itk::QuasiNewtonOptimizerv4EstimateNewtonStepThreader.

Definition at line 71 of file itkDomainThreader.h.


Constructor & Destructor Documentation

template<class TDomainPartitioner, class TAssociate>
itk::DomainThreader< TDomainPartitioner, TAssociate >::DomainThreader ( ) [protected]
template<class TDomainPartitioner, class TAssociate>
virtual itk::DomainThreader< TDomainPartitioner, TAssociate >::~DomainThreader ( ) [protected, virtual]
template<class TDomainPartitioner, class TAssociate>
itk::DomainThreader< TDomainPartitioner, TAssociate >::DomainThreader ( const Self ) [private]

Member Function Documentation

template<class TDomainPartitioner, class TAssociate>
virtual void itk::DomainThreader< TDomainPartitioner, TAssociate >::AfterThreadedExecution ( ) [inline, protected, virtual]
template<class TDomainPartitioner, class TAssociate>
virtual void itk::DomainThreader< TDomainPartitioner, TAssociate >::BeforeThreadedExecution ( ) [inline, protected, virtual]
template<class TDomainPartitioner, class TAssociate>
virtual void itk::DomainThreader< TDomainPartitioner, TAssociate >::DetermineNumberOfThreadsUsed ( ) [protected, virtual]

This is evauated at the beginning of Execute() so that it can be used in BeforeThreadedExecution().

Reimplemented in itk::ProcessObject::ProcessObjectDomainThreader< TDomainPartitioner, TAssociate >.

template<class TDomainPartitioner, class TAssociate>
void itk::DomainThreader< TDomainPartitioner, TAssociate >::Execute ( AssociateType enclosingClass,
const DomainType domain 
)

Run the multi-threaded operation on the given domain.

The domain is first partitioned by the ThreadedDomainPartitioner, then the virtual methods BeforeThreadedExecution, ThreadedExecution, and AfterThreadedExecution. are run, in order.

template<class TDomainPartitioner, class TAssociate>
virtual const DomainPartitionerType* itk::DomainThreader< TDomainPartitioner, TAssociate >::GetDomainPartitioner ( ) [virtual]

Set/Get the DomainPartitioner.

template<class TDomainPartitioner, class TAssociate>
ThreadIdType itk::DomainThreader< TDomainPartitioner, TAssociate >::GetMaximumNumberOfThreads ( ) const

Convenience methods to set/get the maximum number of threads to use.

Warning:
When setting the maximum number of threads, it will be clamped by itk::MultiThreader::GetGlobalMaximumNumberOfThreads() and ITK_MAX_THREADS.
template<class TDomainPartitioner, class TAssociate>
MultiThreader* itk::DomainThreader< TDomainPartitioner, TAssociate >::GetMultiThreader ( ) const

Return the multithreader used by this class.

template<class TDomainPartitioner, class TAssociate>
virtual const char* itk::DomainThreader< TDomainPartitioner, TAssociate >::GetNameOfClass ( ) const [virtual]

Run-time type information (and related methods).

Reimplemented from itk::Object.

Reimplemented in itk::ProcessObject::ProcessObjectDomainThreader< TDomainPartitioner, TAssociate >, itk::LevelSetEvolutionComputeIterationThreader< WhitakerSparseLevelSetImage< TOutput, VDimension >, ThreadedIteratorRangePartitioner< typename WhitakerSparseLevelSetImage< TOutput, VDimension >::LayerConstIterator >, TLevelSetEvolution >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedIteratorRangePartitioner< typename TLevelSetEvolution::DomainMapImageFilterType::DomainMapType::const_iterator >, TLevelSetEvolution >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::LevelSetEvolutionUpdateLevelSetsThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< TDomainPartitioner, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, itk::GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader, itk::GradientDescentOptimizerBasev4ModifyGradientByScalesThreader, and itk::QuasiNewtonOptimizerv4EstimateNewtonStepThreader.

template<class TDomainPartitioner, class TAssociate>
virtual ThreadIdType itk::DomainThreader< TDomainPartitioner, TAssociate >::GetNumberOfThreadsUsed ( ) const [virtual]

Accessor for number of threads that were actually used in the last ThreadedExecution.

template<class TDomainPartitioner, class TAssociate>
void itk::DomainThreader< TDomainPartitioner, TAssociate >::operator= ( const Self ) [private]

Reimplemented in itk::ProcessObject::ProcessObjectDomainThreader< TDomainPartitioner, TAssociate >, itk::LevelSetEvolutionComputeIterationThreader< WhitakerSparseLevelSetImage< TOutput, VDimension >, ThreadedIteratorRangePartitioner< typename WhitakerSparseLevelSetImage< TOutput, VDimension >::LayerConstIterator >, TLevelSetEvolution >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, TImageToImageMetricv4 >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedIteratorRangePartitioner< typename TLevelSetEvolution::DomainMapImageFilterType::DomainMapType::const_iterator >, TLevelSetEvolution >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, itk::ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< TImageToImageMetricv4::VirtualImageDimension >, TImageToImageMetricv4 >, itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::LevelSetEvolutionUpdateLevelSetsThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, itk::JointHistogramMutualInformationComputeJointPDFThreader< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< TDomainPartitioner, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedImageRegionPartitioner< TJointHistogramMetric::VirtualImageDimension >, TJointHistogramMetric >, itk::JointHistogramMutualInformationComputeJointPDFThreaderBase< ThreadedIndexedContainerPartitioner, TJointHistogramMetric >, itk::GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreader, itk::GradientDescentOptimizerBasev4ModifyGradientByScalesThreader, and itk::QuasiNewtonOptimizerv4EstimateNewtonStepThreader.

template<class TDomainPartitioner, class TAssociate>
virtual void itk::DomainThreader< TDomainPartitioner, TAssociate >::SetDomainPartitioner ( DomainPartitionerType _arg) [virtual]

Set/Get the DomainPartitioner.

template<class TDomainPartitioner, class TAssociate>
void itk::DomainThreader< TDomainPartitioner, TAssociate >::SetMaximumNumberOfThreads ( const ThreadIdType  threads)

Convenience methods to set/get the maximum number of threads to use.

Warning:
When setting the maximum number of threads, it will be clamped by itk::MultiThreader::GetGlobalMaximumNumberOfThreads() and ITK_MAX_THREADS.
template<class TDomainPartitioner, class TAssociate>
virtual void itk::DomainThreader< TDomainPartitioner, TAssociate >::SetMultiThreader ( MultiThreader *  _arg) [protected, virtual]
template<class TDomainPartitioner, class TAssociate>
void itk::DomainThreader< TDomainPartitioner, TAssociate >::StartThreadingSequence ( ) [private]
template<class TDomainPartitioner, class TAssociate>
virtual void itk::DomainThreader< TDomainPartitioner, TAssociate >::ThreadedExecution ( const DomainType subdomain,
const ThreadIdType  threadId 
) [protected, pure virtual]

Do the threaded operation, somewhat like ThreadedGenerateData in an ImageSource.

Parameters:
subdomainThe subdomain to operate on.
threadIdThe identifier for the current thread. Data to perform the operation on can be accessed by dereferencing this->m_Associate, which has direct access to private and protected members the enclosing class.

Implemented in itk::LevelSetEvolutionComputeIterationThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >, and itk::LevelSetEvolutionUpdateLevelSetsThreader< LevelSetDenseImageBase< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >.

template<class TDomainPartitioner, class TAssociate>
static ITK_THREAD_RETURN_TYPE itk::DomainThreader< TDomainPartitioner, TAssociate >::ThreaderCallback ( void *  arg) [static, protected]

Static function used as a "callback" by the MultiThreader. The threading library will call this routine for each thread, which will delegate the control to the ThreadFunctor.


Member Data Documentation

template<class TDomainPartitioner, class TAssociate>
AssociateType* itk::DomainThreader< TDomainPartitioner, TAssociate >::m_Associate [protected]

Definition at line 146 of file itkDomainThreader.h.

template<class TDomainPartitioner, class TAssociate>
DomainType itk::DomainThreader< TDomainPartitioner, TAssociate >::m_CompleteDomain [private]

Definition at line 166 of file itkDomainThreader.h.

template<class TDomainPartitioner, class TAssociate>
DomainPartitionerType::Pointer itk::DomainThreader< TDomainPartitioner, TAssociate >::m_DomainPartitioner [private]

Definition at line 165 of file itkDomainThreader.h.

template<class TDomainPartitioner, class TAssociate>
MultiThreader::Pointer itk::DomainThreader< TDomainPartitioner, TAssociate >::m_MultiThreader [private]

Definition at line 167 of file itkDomainThreader.h.

template<class TDomainPartitioner, class TAssociate>
ThreadIdType itk::DomainThreader< TDomainPartitioner, TAssociate >::m_NumberOfThreadsUsed [private]

Store the actual number of threads used, which may be less than the number allocated by the threader if the object does not split well into that number. This value is determined at the beginning of Execute().

Definition at line 164 of file itkDomainThreader.h.


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