Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType > Class Template Reference

This class implements a multi-threaded base class for Image to SparseImage finite difference processes. More...

#include <itkFiniteDifferenceSparseImageFilter.h>

Inheritance diagram for itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >:

Inheritance graph
[legend]
Collaboration diagram for itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >:

Collaboration graph
[legend]
List of all members.

[NOHEADER]

virtual void ThreadedApplyUpdate (TimeStepType dt, const ThreadRegionType &regionToProcess, int threadId)
ITK_THREAD_RETURN_TYPE ApplyUpdateThreaderCallback (void *arg)

[NOHEADER]

virtual TimeStepType ThreadedCalculateChange (const ThreadRegionType &regionToProcess, int threadId)
ITK_THREAD_RETURN_TYPE CalculateChangeThreaderCallback (void *arg)

[NOHEADER]

virtual void ThreadedPrecalculateChange (const ThreadRegionType &regionToProcess, int threadId)
ITK_THREAD_RETURN_TYPE PrecalculateChangeThreaderCallback (void *arg)

Public Types

typedef FiniteDifferenceSparseImageFilter Self
typedef FiniteDifferenceImageFilter<
TInputImageType, TSparseOutputImageType > 
Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef Superclass::InputImageType InputImageType
typedef Superclass::OutputImageType SparseOutputImageType
typedef Superclass::PixelType PixelType
typedef Superclass::TimeStepType TimeStepType
typedef Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
typedef SparseOutputImageType::IndexType IndexType
typedef SparseOutputImageType::NodeType OutputNodeType
typedef SparseOutputImageType::NodeListType NodeListType
typedef OutputNodeType::NodeDataType NodeDataType
typedef OutputNodeType::NodeValueType NodeValueType
typedef FiniteDifferenceSparseImageFunction<
SparseOutputImageType
SparseFunctionType

Public Member Functions

virtual const char * GetClassName () const
 itkStaticConstMacro (ImageDimension, unsigned int, Superclass::ImageDimension)
void SetSparseFunction (SparseFunctionType *sf)
virtual void SetPrecomputeFlag (bool _arg)
virtual bool GetPrecomputeFlag ()

Protected Member Functions

 FiniteDifferenceSparseImageFilter ()
 ~FiniteDifferenceSparseImageFilter ()
void PrintSelf (std::ostream &os, Indent indent) const
virtual void Initialize ()
virtual void AllocateUpdateBuffer ()
virtual NodeDataType DataConstraint (const NodeDataType &data) const
int GetSplitRegion (int i, int num, ThreadRegionType &splitRegion)
virtual void ApplyUpdate (TimeStepType dt)
virtual TimeStepType CalculateChange ()
virtual void PrecalculateChange ()

Detailed Description

template<class TInputImageType, class TSparseOutputImageType>
class itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >

This class implements a multi-threaded base class for Image to SparseImage finite difference processes.

This class implements a multi-threading mechanism for implementing finite difference PDE's on sparse image types. The sparse image is a image of pointers to node variables at valid pixel locations and null pointers at others. The node variable type must have the following members: m_Index, m_Data and m_Update.
This class also adds precomputing support to the finite difference image filter scheme. This support can be used by certain filters to speed up the processing. The m_PrecomputeFlag should be set to true to use this and the Function object must provide a PrecomputeSparseUpdate method.
INPUTS
The input to this filter is either a regular or sparse image. Subclasses should provide a way of copying this information to the output sparse image or initializing the output image nodes from the input image.
OUTPUTS
The output is a sparse image. The output will be in the m_Data members of the nodes of the sparse image.
IMPORTANT
The output sparse image type must be templated with a node type that at least has the following member variables: m_Index, m_Data and m_Update.

Definition at line 61 of file itkFiniteDifferenceSparseImageFilter.h.


Member Typedef Documentation

template<class TInputImageType, class TSparseOutputImageType>
typedef SmartPointer<const Self> itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::ConstPointer
 

Reimplemented from itk::FiniteDifferenceImageFilter< TInputImageType, TSparseOutputImageType >.

Reimplemented in itk::ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >.

Definition at line 71 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
typedef Superclass::FiniteDifferenceFunctionType itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::FiniteDifferenceFunctionType
 

The value type of the time step. This is distinct from PixelType because PixelType may often be a vector value, while the TimeStep is a scalar value.

Reimplemented from itk::FiniteDifferenceImageFilter< TInputImageType, TSparseOutputImageType >.

Reimplemented in itk::ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >.

Definition at line 82 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
typedef SparseOutputImageType::IndexType itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::IndexType
 

Typedefs from the sparse output image type.

Reimplemented in itk::ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >.

Definition at line 90 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
typedef Superclass::InputImageType itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::InputImageType
 

Typedefs from the superclass

Reimplemented from itk::FiniteDifferenceImageFilter< TInputImageType, TSparseOutputImageType >.

Reimplemented in itk::ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >.

Definition at line 77 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
typedef OutputNodeType::NodeDataType itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::NodeDataType
 

The type for the data variable of OutputNodeType. Definition at line 95 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
typedef SparseOutputImageType::NodeListType itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::NodeListType
 

Reimplemented in itk::ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >.

Definition at line 92 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
typedef OutputNodeType::NodeValueType itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::NodeValueType
 

The basic scalar variable type used in OutputNodeType. Expected to be float or double. If NodeDataType is a scalar, then this is the same type as that.

Reimplemented in itk::ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >.

Definition at line 100 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
typedef SparseOutputImageType::NodeType itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::OutputNodeType
 

Definition at line 91 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
typedef Superclass::PixelType itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::PixelType
 

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

Reimplemented from itk::FiniteDifferenceImageFilter< TInputImageType, TSparseOutputImageType >.

Definition at line 79 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
typedef SmartPointer<Self> itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::Pointer
 

Reimplemented from itk::FiniteDifferenceImageFilter< TInputImageType, TSparseOutputImageType >.

Reimplemented in itk::ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >.

Definition at line 70 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
typedef FiniteDifferenceSparseImageFilter itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::Self
 

Standard class typedef

Reimplemented from itk::FiniteDifferenceImageFilter< TInputImageType, TSparseOutputImageType >.

Reimplemented in itk::ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >.

Definition at line 67 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
typedef FiniteDifferenceSparseImageFunction<SparseOutputImageType> itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::SparseFunctionType
 

The sparse image finite difference function type used in this class. Definition at line 104 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
typedef Superclass::OutputImageType itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::SparseOutputImageType
 

Reimplemented in itk::ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >.

Definition at line 78 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
typedef FiniteDifferenceImageFilter<TInputImageType, TSparseOutputImageType> itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::Superclass
 

Reimplemented from itk::FiniteDifferenceImageFilter< TInputImageType, TSparseOutputImageType >.

Reimplemented in itk::ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >.

Definition at line 69 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
typedef Superclass::TimeStepType itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::TimeStepType
 

Reimplemented from itk::FiniteDifferenceImageFilter< TInputImageType, TSparseOutputImageType >.

Definition at line 80 of file itkFiniteDifferenceSparseImageFilter.h.


Constructor & Destructor Documentation

template<class TInputImageType, class TSparseOutputImageType>
itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::FiniteDifferenceSparseImageFilter  )  [protected]
 

template<class TInputImageType, class TSparseOutputImageType>
itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::~FiniteDifferenceSparseImageFilter  )  [inline, protected]
 

Definition at line 114 of file itkFiniteDifferenceSparseImageFilter.h.


Member Function Documentation

template<class TInputImageType, class TSparseOutputImageType>
virtual void itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::AllocateUpdateBuffer  )  [inline, protected, virtual]
 

This class does not use AllocateUpdateBuffer to allocate memory for its narrow band. All memory is handled through the SparseImage class.

Implements itk::FiniteDifferenceImageFilter< TInputImageType, TSparseOutputImageType >.

Definition at line 124 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
virtual void itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::ApplyUpdate TimeStepType  dt  )  [protected, virtual]
 

This function updates the m_Data variable in the output image nodes using the update values computed by CalculateChange.

Implements itk::FiniteDifferenceImageFilter< TInputImageType, TSparseOutputImageType >.

template<class TInputImageType, class TSparseOutputImageType>
ITK_THREAD_RETURN_TYPE itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::ApplyUpdateThreaderCallback void *  arg  )  [static, protected]
 

Multi-threaded implementation of ApplyUpdate.

template<class TInputImageType, class TSparseOutputImageType>
virtual TimeStepType itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::CalculateChange  )  [protected, virtual]
 

This method computes changes to the output image using the ComputeSparseUpdate method in the Sparse Function object.

Implements itk::FiniteDifferenceImageFilter< TInputImageType, TSparseOutputImageType >.

template<class TInputImageType, class TSparseOutputImageType>
ITK_THREAD_RETURN_TYPE itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::CalculateChangeThreaderCallback void *  arg  )  [static, protected]
 

Multuthreaded implementation of CalculateChange

template<class TInputImageType, class TSparseOutputImageType>
virtual NodeDataType itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::DataConstraint const NodeDataType data  )  const [inline, protected, virtual]
 

This function can be used to implements constraints on the range of data values. Default is no constraint. Definition at line 128 of file itkFiniteDifferenceSparseImageFilter.h.

template<class TInputImageType, class TSparseOutputImageType>
virtual const char* itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::GetClassName  )  const [virtual]
 

Run-time type information (and related methods)

Reimplemented from itk::FiniteDifferenceImageFilter< TInputImageType, TSparseOutputImageType >.

Reimplemented in itk::ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >.

template<class TInputImageType, class TSparseOutputImageType>
virtual bool itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::GetPrecomputeFlag  )  [virtual]
 

template<class TInputImageType, class TSparseOutputImageType>
int itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::GetSplitRegion int  i,
int  num,
ThreadRegionType &  splitRegion
[protected]
 

This function returns a single region for use in multi-threading.

template<class TInputImageType, class TSparseOutputImageType>
virtual void itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::Initialize  )  [protected, virtual]
 

This method splits the active pixels of the sparse image into equal size lists for multi-threading. These lists remain constant throughout the operation of this filter.

Reimplemented from itk::FiniteDifferenceImageFilter< TInputImageType, TSparseOutputImageType >.

Reimplemented in itk::ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >.

template<class TInputImageType, class TSparseOutputImageType>
itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::itkStaticConstMacro ImageDimension  ,
unsigned  int,
Superclass::ImageDimension 
 

Dimensionality of input and output data is assumed to be the same. It is inherited from the superclass.

Reimplemented in itk::ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >.

template<class TInputImageType, class TSparseOutputImageType>
virtual void itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::PrecalculateChange  )  [protected, virtual]
 

This method provides a means of performing a first pass for computing the change and storing intermediate values that will then be used by CalculateChange. This can be used to speed up certain update rules.

template<class TInputImageType, class TSparseOutputImageType>
ITK_THREAD_RETURN_TYPE itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::PrecalculateChangeThreaderCallback void *  arg  )  [static, protected]
 

Multithreaded implementation of PrecalculateChange

template<class TInputImageType, class TSparseOutputImageType>
void itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::PrintSelf std::ostream &  os,
Indent  indent
const [protected, virtual]
 

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::FiniteDifferenceImageFilter< TInputImageType, TSparseOutputImageType >.

Reimplemented in itk::ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >.

template<class TInputImageType, class TSparseOutputImageType>
virtual void itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::SetPrecomputeFlag bool  _arg  )  [virtual]
 

template<class TInputImageType, class TSparseOutputImageType>
void itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::SetSparseFunction SparseFunctionType sf  ) 
 

Sets the function object that will be called for computing updates.

template<class TInputImageType, class TSparseOutputImageType>
virtual void itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::ThreadedApplyUpdate TimeStepType  dt,
const ThreadRegionType &  regionToProcess,
int  threadId
[protected, virtual]
 

template<class TInputImageType, class TSparseOutputImageType>
virtual TimeStepType itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::ThreadedCalculateChange const ThreadRegionType &  regionToProcess,
int  threadId
[protected, virtual]
 

template<class TInputImageType, class TSparseOutputImageType>
virtual void itk::FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >::ThreadedPrecalculateChange const ThreadRegionType &  regionToProcess,
int  threadId
[protected, virtual]
 


The documentation for this class was generated from the following file:
Generated at Sun Apr 1 03:01:53 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000