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

#include <itkDenseFiniteDifferenceImageFilter.h>

+ Inheritance diagram for itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >:
+ Collaboration diagram for itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >:

List of all members.

Classes

struct  DenseFDThreadStruct

Public Types

typedef SmartPointer< const SelfConstPointer
typedef
Superclass::FiniteDifferenceFunctionType 
FiniteDifferenceFunctionType
typedef Superclass::InputImageType InputImageType
typedef Superclass::OutputImageType OutputImageType
typedef Superclass::PixelType PixelType
typedef SmartPointer< SelfPointer
typedef
DenseFiniteDifferenceImageFilter 
Self
typedef
FiniteDifferenceImageFilter
< TInputImage, TOutputImage > 
Superclass
typedef Superclass::TimeStepType TimeStepType
typedef OutputImageType UpdateBufferType

Public Member Functions

virtual const char * GetNameOfClass () const
 typedef (Concept::MultiplyOperator< PixelType, double >) OutputTimesDoubleCheck
 typedef (Concept::AdditiveOperators< PixelType >) OutputAdditiveOperatorsCheck
 typedef (Concept::AdditiveAndAssignOperators< PixelType >) OutputAdditiveAndAssignOperatorsCheck
 typedef (Concept::Convertible< typename TInputImage::PixelType, PixelType >) InputConvertibleToOutputCheck

Static Public Attributes

static const unsigned int ImageDimension = Superclass::ImageDimension

Protected Types

typedef
UpdateBufferType::RegionType 
ThreadRegionType

Protected Member Functions

virtual void AllocateUpdateBuffer ()
virtual void ApplyUpdate (const TimeStepType &dt)
virtual TimeStepType CalculateChange ()
virtual void CopyInputToOutput ()
virtual UpdateBufferTypeGetUpdateBuffer ()
virtual void ThreadedApplyUpdate (const TimeStepType &dt, const ThreadRegionType &regionToProcess, ThreadIdType threadId)
virtual TimeStepType ThreadedCalculateChange (const ThreadRegionType &regionToProcess, ThreadIdType threadId)
 DenseFiniteDifferenceImageFilter ()
 ~DenseFiniteDifferenceImageFilter ()
void PrintSelf (std::ostream &os, Indent indent) const

Private Member Functions

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

Static Private Member Functions

static ITK_THREAD_RETURN_TYPE ApplyUpdateThreaderCallback (void *arg)
static ITK_THREAD_RETURN_TYPE CalculateChangeThreaderCallback (void *arg)

Private Attributes

UpdateBufferType::Pointer m_UpdateBuffer

Detailed Description

template<class TInputImage, class TOutputImage>
class itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >

This filter implements a layer of the finite difference solver hierarchy that performs ``dense'' iteration, ie. iteration over all pixels in the input and output at each change calculation and update step. Dense iteration is in contrast to a ``sparse'' iteration over a subset of the pixels. See documentation for FiniteDifferenceImageFilter for an overview of the iterative finite difference algorithm:

$u_{\mathbf{i}}^{n+1}=u^n_{\mathbf{i}}+\Delta u^n_{\mathbf{i}}\Delta t$
The generic code for performing iterations and updates at each time step is inherited from the parent class. This class defines an update buffer for $ \Delta $ and the methods CalculateChange() and ApplyUpdate(). These methods are designed to automatically thread their execution. $ \Delta $ is defined as an image of identical size and type as the output image.
As we descend through each layer in the hierarchy, we know more and more about the specific application of our filter. At this level, we have committed to iteration over each pixel in an image. We take advantage of that knowledge to multithread the iteration and update methods.
Inputs and Outputs
This is an image to image filter. The specific types of the images are not fixed at this level in the hierarchy.
How to use this class
This filter is only one layer in a branch the finite difference solver hierarchy. It does not define the function used in the CalculateChange() and it does not define the stopping criteria (Halt method). To use this class, subclass it to a specific instance that supplies a function and Halt() method.
See also:
FiniteDifferenceImageFilter

Definition at line 69 of file itkDenseFiniteDifferenceImageFilter.h.


Member Typedef Documentation

template<class TInputImage, class TOutputImage>
typedef SmartPointer< const Self > itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::ConstPointer
template<class TInputImage, class TOutputImage>
typedef Superclass::FiniteDifferenceFunctionType itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::FiniteDifferenceFunctionType
template<class TInputImage, class TOutputImage>
typedef Superclass::InputImageType itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::InputImageType
template<class TInputImage, class TOutputImage>
typedef Superclass::OutputImageType itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::OutputImageType
template<class TInputImage, class TOutputImage>
typedef Superclass::PixelType itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::PixelType

The pixel type of the output image will be used in computations. Inherited from the superclass.

Reimplemented from itk::FiniteDifferenceImageFilter< TInputImage, TOutputImage >.

Reimplemented in itk::CurvatureFlowImageFilter< TInputImage, TOutputImage >, and itk::AnisotropicDiffusionImageFilter< TInputImage, TOutputImage >.

Definition at line 97 of file itkDenseFiniteDifferenceImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef SmartPointer< Self > itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::Pointer
template<class TInputImage, class TOutputImage>
typedef DenseFiniteDifferenceImageFilter itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::Self
template<class TInputImage, class TOutputImage>
typedef FiniteDifferenceImageFilter< TInputImage, TOutputImage > itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::Superclass
template<class TInputImage, class TOutputImage>
typedef UpdateBufferType::RegionType itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::ThreadRegionType [protected]

The type of region used for multithreading

Definition at line 150 of file itkDenseFiniteDifferenceImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef Superclass::TimeStepType itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::TimeStepType
template<class TInputImage, class TOutputImage>
typedef OutputImageType itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::UpdateBufferType

Constructor & Destructor Documentation

template<class TInputImage, class TOutputImage>
itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::DenseFiniteDifferenceImageFilter ( ) [inline, protected]

End concept checking

Definition at line 119 of file itkDenseFiniteDifferenceImageFilter.h.

template<class TInputImage, class TOutputImage>
itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::~DenseFiniteDifferenceImageFilter ( ) [inline, protected]

End concept checking

Definition at line 121 of file itkDenseFiniteDifferenceImageFilter.h.

template<class TInputImage, class TOutputImage>
itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::DenseFiniteDifferenceImageFilter ( const Self ) [private]

Member Function Documentation

template<class TInputImage, class TOutputImage>
virtual void itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::AllocateUpdateBuffer ( ) [protected, virtual]
template<class TInputImage, class TOutputImage>
virtual void itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::ApplyUpdate ( const TimeStepType dt) [protected, virtual]

This method applies changes from the m_UpdateBuffer to the output using the ThreadedApplyUpdate() method and a multithreading mechanism. "dt" is the time step to use for the update of each pixel.

Reimplemented in itk::LevelSetMotionRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >, itk::CurvatureRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField, TImageForceFunction >, and itk::DemonsRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >.

template<class TInputImage, class TOutputImage>
static ITK_THREAD_RETURN_TYPE itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::ApplyUpdateThreaderCallback ( void *  arg) [static, private]

This callback method uses ImageSource::SplitRequestedRegion to acquire an output region that it passes to ThreadedApplyUpdate for processing.

template<class TInputImage, class TOutputImage>
virtual TimeStepType itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::CalculateChange ( ) [protected, virtual]

This method populates an update buffer with changes for each pixel in the output using the ThreadedCalculateChange() method and a multithreading mechanism. Returns value is a time step to be used for the update.

Implements itk::FiniteDifferenceImageFilter< TInputImage, TOutputImage >.

template<class TInputImage, class TOutputImage>
static ITK_THREAD_RETURN_TYPE itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::CalculateChangeThreaderCallback ( void *  arg) [static, private]

This callback method uses SplitUpdateContainer to acquire a region which it then passes to ThreadedCalculateChange for processing.

template<class TInputImage, class TOutputImage>
virtual void itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::CopyInputToOutput ( ) [protected, virtual]

A simple method to copy the data from the input to the output. ( Supports "read-only" image adaptors in the case where the input image type converts to a different output image type. )

Implements itk::FiniteDifferenceImageFilter< TInputImage, TOutputImage >.

Reimplemented in itk::PDEDeformableRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >.

template<class TInputImage, class TOutputImage>
virtual const char* itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::GetNameOfClass ( ) const [virtual]
template<class TInputImage, class TOutputImage>
virtual UpdateBufferType* itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::GetUpdateBuffer ( ) [inline, protected, virtual]

Method to allow subclasses to get direct access to the update buffer

Definition at line 137 of file itkDenseFiniteDifferenceImageFilter.h.

template<class TInputImage, class TOutputImage>
void itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::operator= ( const Self ) [private]

PushBackInput(), PushFronInput() in the public section force the input to be the type expected by an ImageToImageFilter. However, these methods end of "hiding" the versions from the superclass (ProcessObject) whose arguments are DataObjects. Here, we re-expose the versions from ProcessObject to avoid warnings about hiding methods from the superclass.

Reimplemented from itk::FiniteDifferenceImageFilter< TInputImage, TOutputImage >.

Reimplemented in itk::PDEDeformableRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >, itk::LevelSetMotionRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >, itk::CurvatureFlowImageFilter< TInputImage, TOutputImage >, itk::CurvatureRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField, TImageForceFunction >, itk::FastSymmetricForcesDemonsRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >, itk::DiffeomorphicDemonsRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >, itk::AnisotropicDiffusionImageFilter< TInputImage, TOutputImage >, itk::DemonsRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >, itk::MinMaxCurvatureFlowImageFilter< TInputImage, TOutputImage >, itk::SymmetricForcesDemonsRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >, itk::BinaryMinMaxCurvatureFlowImageFilter< TInputImage, TOutputImage >, itk::VectorCurvatureAnisotropicDiffusionImageFilter< TInputImage, TOutputImage >, itk::CurvatureAnisotropicDiffusionImageFilter< TInputImage, TOutputImage >, itk::VectorGradientAnisotropicDiffusionImageFilter< TInputImage, TOutputImage >, and itk::GradientAnisotropicDiffusionImageFilter< TInputImage, TOutputImage >.

template<class TInputImage, class TOutputImage>
void itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const [protected, virtual]
template<class TInputImage, class TOutputImage>
virtual void itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::ThreadedApplyUpdate ( const TimeStepType dt,
const ThreadRegionType regionToProcess,
ThreadIdType  threadId 
) [protected, virtual]

Does the actual work of updating the output from the UpdateContainer over an output region supplied by the multithreading mechanism.

See also:
ApplyUpdate
ApplyUpdateThreaderCallback
template<class TInputImage, class TOutputImage>
virtual TimeStepType itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::ThreadedCalculateChange ( const ThreadRegionType regionToProcess,
ThreadIdType  threadId 
) [protected, virtual]

Does the actual work of calculating change over a region supplied by the multithreading mechanism.

See also:
CalculateChange
CalculateChangeThreaderCallback
template<class TInputImage, class TOutputImage>
itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::typedef ( Concept::MultiplyOperator< PixelType, double >  )

Begin concept checking This class requires OutputTimesDoubleCheck in the form of ( Concept::MultiplyOperator< PixelType, double > )

template<class TInputImage, class TOutputImage>
itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::typedef ( Concept::AdditiveOperators< PixelType )

This class requires OutputAdditiveOperatorsCheck in the form of ( Concept::AdditiveOperators< PixelType > )

template<class TInputImage, class TOutputImage>
itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::typedef ( Concept::AdditiveAndAssignOperators< PixelType )

This class requires OutputAdditiveAndAssignOperatorsCheck in the form of ( Concept::AdditiveAndAssignOperators< PixelType > )

template<class TInputImage, class TOutputImage>
itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::typedef ( Concept::Convertible< typename TInputImage::PixelType, PixelType )

This class requires InputConvertibleToOutputCheck in the form of ( Concept::Convertible< typename TInputImage::PixelType, PixelType > )


Member Data Documentation

template<class TInputImage, class TOutputImage>
const unsigned int itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::ImageDimension = Superclass::ImageDimension [static]
template<class TInputImage, class TOutputImage>
UpdateBufferType::Pointer itk::DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::m_UpdateBuffer [private]

The buffer that holds the updates for an iteration of the algorithm.

Definition at line 191 of file itkDenseFiniteDifferenceImageFilter.h.


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