ITK  4.2.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Attributes | Private Member Functions
itk::FiniteDifferenceSparseImageFunction< TSparseImageType > Class Template Reference

#include <itkFiniteDifferenceSparseImageFunction.h>

+ Inheritance diagram for itk::FiniteDifferenceSparseImageFunction< TSparseImageType >:
+ Collaboration diagram for itk::FiniteDifferenceSparseImageFunction< TSparseImageType >:

List of all members.

Public Types

typedef SmartPointer< const SelfConstPointer
typedef Superclass::FloatOffsetType FloatOffsetType
typedef SparseImageType::IndexType IndexType
typedef
Superclass::NeighborhoodType 
NeighborhoodType
typedef NodeType::NodeDataType NodeDataType
typedef SparseImageType::NodeType NodeType
typedef Superclass::PixelType PixelType
typedef SmartPointer< SelfPointer
typedef Superclass::RadiusType RadiusType
typedef
FiniteDifferenceSparseImageFunction 
Self
typedef Superclass::ImageType SparseImageType
typedef
FiniteDifferenceFunction
< TSparseImageType > 
Superclass
typedef Superclass::TimeStepType TimeStepType
- Public Types inherited from itk::FiniteDifferenceFunction< TSparseImageType >
typedef
ZeroFluxNeumannBoundaryCondition
< ImageType
DefaultBoundaryConditionType
typedef TSparseImageType ImageType
typedef Vector< PixelRealType,
itkGetStaticConstMacro(ImageDimension) > 
NeighborhoodScalesType
typedef double PixelRealType
- Public Types inherited from itk::LightObject

Public Member Functions

virtual NodeDataType ComputeSparseUpdate (NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) const =0
virtual PixelType ComputeUpdate (const NeighborhoodType &, void *, const FloatOffsetType &)
virtual const char * GetNameOfClass () const
- Public Member Functions inherited from itk::FiniteDifferenceFunction< TSparseImageType >
virtual TimeStepType ComputeGlobalTimeStep (void *GlobalData) const =0
const NeighborhoodScalesType ComputeNeighborhoodScales () const
virtual void * GetGlobalDataPointer () const =0
const RadiusTypeGetRadius () const
virtual void InitializeIteration ()
virtual void ReleaseGlobalDataPointer (void *GlobalData) const =0
void SetRadius (const RadiusType &r)
void SetScaleCoefficients (PixelRealType vals[ImageDimension])
- Public Member Functions inherited from itk::LightObject
virtual Pointer CreateAnother () const
virtual void Delete ()
virtual int GetReferenceCount () const
 itkCloneMacro (Self)
void Print (std::ostream &os, Indent indent=0) const
virtual void Register () const
virtual void SetReferenceCount (int)
virtual void UnRegister () const

Static Public Attributes

static const unsigned int ImageDimension = Superclass::ImageDimension
- Static Public Attributes inherited from itk::FiniteDifferenceFunction< TSparseImageType >
- Protected Member Functions inherited from itk::FiniteDifferenceFunction< TSparseImageType >
 FiniteDifferenceFunction ()
 ~FiniteDifferenceFunction ()
- 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 ()

Private Member Functions

 FiniteDifferenceSparseImageFunction (const Self &)
void operator= (const Self &)
virtual void PrecomputeSparseUpdate (NeighborhoodType &) const
 FiniteDifferenceSparseImageFunction ()
 ~FiniteDifferenceSparseImageFunction ()
void PrintSelf (std::ostream &os, Indent indent) const

Additional Inherited Members

- Protected Attributes inherited from itk::FiniteDifferenceFunction< TSparseImageType >
RadiusType m_Radius
PixelRealType m_ScaleCoefficients [ImageDimension]
- Protected Attributes inherited from itk::LightObject
InternalReferenceCountType m_ReferenceCount
SimpleFastMutexLock m_ReferenceCountLock

Detailed Description

template<class TSparseImageType>
class itk::FiniteDifferenceSparseImageFunction< TSparseImageType >

This is the base class for function classes that can be used with filters derived from FiniteDifferenceSparseImageFilter.

This class is derived from FiniteDifferenceFunction. It is designed to
*work with neighborhoods of pointers instead of actual data. Towards this *purpose ComputeUpdate method is no longer used and is replaced by the *ComputeSparseUpdate method. ComputeSparseUpdate assumes that the pointers are *associated with structures that have the member variable m_Data. The pointers *would normally originate from a SparseImage object.
The PrecomputeSparseUpdate method can be defined to do a first pass of
*computations which then can be used by ComputeSparseUpdate. If *PrecomputeSparseUpdate is used then the m_PrecomputeFlag should be set in the *FiniteDifferenceSparseImageFilter class. The precomputation step can be used *to speed up computation by avoiding repetitions. See the *NormalVectorDiffusionFunction for an example.

Definition at line 47 of file itkFiniteDifferenceSparseImageFunction.h.


Member Typedef Documentation

template<class TSparseImageType >
typedef SmartPointer< const Self > itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::ConstPointer
template<class TSparseImageType >
typedef Superclass::FloatOffsetType itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::FloatOffsetType

A floating point offset from an image grid location. Used for interpolation among grid values in a neighborhood.

Reimplemented from itk::FiniteDifferenceFunction< TSparseImageType >.

Reimplemented in itk::NormalVectorDiffusionFunction< TSparseImageType >, and itk::NormalVectorFunctionBase< TSparseImageType >.

Definition at line 69 of file itkFiniteDifferenceSparseImageFunction.h.

template<class TSparseImageType >
typedef SparseImageType::IndexType itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::IndexType
template<class TSparseImageType >
typedef Superclass::NeighborhoodType itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::NeighborhoodType

The type of data structure that is passed to this function object to evaluate at a pixel that does not lie on a data set boundary.

Reimplemented from itk::FiniteDifferenceFunction< TSparseImageType >.

Reimplemented in itk::NormalVectorDiffusionFunction< TSparseImageType >, and itk::NormalVectorFunctionBase< TSparseImageType >.

Definition at line 68 of file itkFiniteDifferenceSparseImageFunction.h.

template<class TSparseImageType >
typedef NodeType::NodeDataType itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::NodeDataType

The type for the variables of NodeType. Scalar or vector.

Definition at line 79 of file itkFiniteDifferenceSparseImageFunction.h.

template<class TSparseImageType >
typedef SparseImageType::NodeType itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::NodeType

The actual type of nodes stored the sparse image.

Reimplemented in itk::NormalVectorDiffusionFunction< TSparseImageType >, and itk::NormalVectorFunctionBase< TSparseImageType >.

Definition at line 76 of file itkFiniteDifferenceSparseImageFunction.h.

template<class TSparseImageType >
typedef Superclass::PixelType itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::PixelType

Typedefs from the superclass.

Reimplemented from itk::FiniteDifferenceFunction< TSparseImageType >.

Definition at line 65 of file itkFiniteDifferenceSparseImageFunction.h.

template<class TSparseImageType >
typedef SmartPointer< Self > itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::Pointer
template<class TSparseImageType >
typedef Superclass::RadiusType itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::RadiusType
template<class TSparseImageType >
typedef FiniteDifferenceSparseImageFunction itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::Self
template<class TSparseImageType >
typedef Superclass::ImageType itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::SparseImageType
template<class TSparseImageType >
typedef FiniteDifferenceFunction< TSparseImageType > itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::Superclass
template<class TSparseImageType >
typedef Superclass::TimeStepType itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::TimeStepType

Constructor & Destructor Documentation

template<class TSparseImageType >
itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::FiniteDifferenceSparseImageFunction ( )
inlineprotected

This function provides support for a 2 step update computation that avoids repetitive computation. FiniteDifferenceSparseImageFilter first calls this function for all active pixels in the SparseImage class, then calls ComputeSparseUpdate for the same set of pixels. This is used in NormalVectorDiffusionFunction to calculate flux variables which are then used to compute the updates. Intermediate variables such as the flux in the above examples are stored in the nodes of the SparseImage itself. Therefore, this function will have to know about the NodeType it is dealing with. This function does nothing by default.

Definition at line 111 of file itkFiniteDifferenceSparseImageFunction.h.

template<class TSparseImageType >
itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::~FiniteDifferenceSparseImageFunction ( )
inlineprotected

This function provides support for a 2 step update computation that avoids repetitive computation. FiniteDifferenceSparseImageFilter first calls this function for all active pixels in the SparseImage class, then calls ComputeSparseUpdate for the same set of pixels. This is used in NormalVectorDiffusionFunction to calculate flux variables which are then used to compute the updates. Intermediate variables such as the flux in the above examples are stored in the nodes of the SparseImage itself. Therefore, this function will have to know about the NodeType it is dealing with. This function does nothing by default.

Definition at line 112 of file itkFiniteDifferenceSparseImageFunction.h.

template<class TSparseImageType >
itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::FiniteDifferenceSparseImageFunction ( const Self )
private

Member Function Documentation

template<class TSparseImageType >
virtual NodeDataType itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::ComputeSparseUpdate ( NeighborhoodType neighborhood,
void *  globalData,
const FloatOffsetType offset = FloatOffsetType(0.0) 
) const
pure virtual

The update called from the FiniteDifferenceSparseImageFilter. This function replaces the ComputeUpdate function.

Implemented in itk::NormalVectorDiffusionFunction< TSparseImageType >.

template<class TSparseImageType >
virtual PixelType itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::ComputeUpdate ( const NeighborhoodType ,
void *  ,
const FloatOffsetType  
)
inlinevirtual

This function is not called from the FiniteDifferenceSparseImageFilter class because we need to work with neighborhoods of pointers to data variables instead of neighborhoods of data directly. This function is replaced by the ComputeSparseUpdate function.

Implements itk::FiniteDifferenceFunction< TSparseImageType >.

Definition at line 85 of file itkFiniteDifferenceSparseImageFunction.h.

template<class TSparseImageType >
virtual const char* itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::GetNameOfClass ( ) const
virtual
template<class TSparseImageType >
void itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::operator= ( const Self )
private

Mutex lock to protect modification to the reference count

Reimplemented from itk::FiniteDifferenceFunction< TSparseImageType >.

Reimplemented in itk::NormalVectorDiffusionFunction< TSparseImageType >, and itk::NormalVectorFunctionBase< TSparseImageType >.

template<class TSparseImageType >
virtual void itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::PrecomputeSparseUpdate ( NeighborhoodType ) const
inlinevirtual

This function provides support for a 2 step update computation that avoids repetitive computation. FiniteDifferenceSparseImageFilter first calls this function for all active pixels in the SparseImage class, then calls ComputeSparseUpdate for the same set of pixels. This is used in NormalVectorDiffusionFunction to calculate flux variables which are then used to compute the updates. Intermediate variables such as the flux in the above examples are stored in the nodes of the SparseImage itself. Therefore, this function will have to know about the NodeType it is dealing with. This function does nothing by default.

Reimplemented in itk::NormalVectorDiffusionFunction< TSparseImageType >.

Definition at line 109 of file itkFiniteDifferenceSparseImageFunction.h.

template<class TSparseImageType >
void itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protectedvirtual

This function provides support for a 2 step update computation that avoids repetitive computation. FiniteDifferenceSparseImageFilter first calls this function for all active pixels in the SparseImage class, then calls ComputeSparseUpdate for the same set of pixels. This is used in NormalVectorDiffusionFunction to calculate flux variables which are then used to compute the updates. Intermediate variables such as the flux in the above examples are stored in the nodes of the SparseImage itself. Therefore, this function will have to know about the NodeType it is dealing with. This function does nothing by default.

Reimplemented from itk::FiniteDifferenceFunction< TSparseImageType >.

Reimplemented in itk::NormalVectorDiffusionFunction< TSparseImageType >, and itk::NormalVectorFunctionBase< TSparseImageType >.


Member Data Documentation

template<class TSparseImageType >
const unsigned int itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::ImageDimension = Superclass::ImageDimension
static

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