ITK  5.0.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
itk::FiniteDifferenceSparseImageFunction< TSparseImageType > Class Template Referenceabstract

#include <itkFiniteDifferenceSparseImageFunction.h>

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

Detailed Description

template<typename 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.

Public Types

using ConstPointer = SmartPointer< const Self >
 
using FloatOffsetType = typename Superclass::FloatOffsetType
 
using IndexType = typename SparseImageType::IndexType
 
using NeighborhoodType = typename Superclass::NeighborhoodType
 
using NodeDataType = typename NodeType::NodeDataType
 
using NodeType = typename SparseImageType::NodeType
 
using PixelType = typename Superclass::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename Superclass::RadiusType
 
using Self = FiniteDifferenceSparseImageFunction
 
using SparseImageType = typename Superclass::ImageType
 
using Superclass = FiniteDifferenceFunction< TSparseImageType >
 
using TimeStepType = typename Superclass::TimeStepType
 
- Public Types inherited from itk::FiniteDifferenceFunction< TSparseImageType >
using ConstPointer = SmartPointer< const Self >
 
using DefaultBoundaryConditionType = ZeroFluxNeumannBoundaryCondition< ImageType >
 
using FloatOffsetType = Vector< float, Self::ImageDimension >
 
using ImageType = TSparseImageType
 
using NeighborhoodScalesType = Vector< PixelRealType, Self::ImageDimension >
 
using NeighborhoodType = ConstNeighborhoodIterator< TSparseImageType, DefaultBoundaryConditionType >
 
using PixelRealType = double
 
using PixelType = typename ImageType::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename ConstNeighborhoodIterator< TSparseImageType >::RadiusType
 
using Self = FiniteDifferenceFunction
 
using Superclass = LightObject
 
using TimeStepType = double
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual NodeDataType ComputeSparseUpdate (NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) const =0
 
PixelType ComputeUpdate (const NeighborhoodType &, void *, const FloatOffsetType &) override
 
virtual const char * GetNameOfClass () const
 
virtual void PrecomputeSparseUpdate (NeighborhoodType &) const
 
- Public Member Functions inherited from itk::FiniteDifferenceFunction< TSparseImageType >
virtual TimeStepType ComputeGlobalTimeStep (void *GlobalData) const =0
 
const NeighborhoodScalesType ComputeNeighborhoodScales () const
 
virtual PixelType ComputeUpdate (const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0))=0
 
virtual void * GetGlobalDataPointer () const =0
 
const RadiusTypeGetRadius () const
 
void GetScaleCoefficients (PixelRealType vals[ImageDimension]) 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 noexcept
 

Static Public Attributes

static constexpr unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::FiniteDifferenceFunction< TSparseImageType >
static constexpr unsigned int ImageDimension
 

Protected Member Functions

 FiniteDifferenceSparseImageFunction ()=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~FiniteDifferenceSparseImageFunction () override=default
 
- Protected Member Functions inherited from itk::FiniteDifferenceFunction< TSparseImageType >
 FiniteDifferenceFunction ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~FiniteDifferenceFunction () override=default
 
- 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 ()
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Attributes inherited from itk::FiniteDifferenceFunction< TSparseImageType >
RadiusType m_Radius
 
PixelRealType m_ScaleCoefficients [ImageDimension]
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Member Typedef Documentation

template<typename TSparseImageType >
using itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::ConstPointer = SmartPointer< const Self >

Definition at line 57 of file itkFiniteDifferenceSparseImageFunction.h.

template<typename TSparseImageType >
using itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::FloatOffsetType = typename Superclass::FloatOffsetType

Definition at line 70 of file itkFiniteDifferenceSparseImageFunction.h.

template<typename TSparseImageType >
using itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::IndexType = typename SparseImageType::IndexType

The index type for the sparse image.

Definition at line 74 of file itkFiniteDifferenceSparseImageFunction.h.

template<typename TSparseImageType >
using itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::NeighborhoodType = typename Superclass::NeighborhoodType

Definition at line 69 of file itkFiniteDifferenceSparseImageFunction.h.

template<typename TSparseImageType >
using itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::NodeDataType = typename NodeType::NodeDataType

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

Definition at line 80 of file itkFiniteDifferenceSparseImageFunction.h.

template<typename TSparseImageType >
using itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::NodeType = typename SparseImageType::NodeType

The actual type of nodes stored the sparse image.

Definition at line 77 of file itkFiniteDifferenceSparseImageFunction.h.

template<typename TSparseImageType >
using itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::PixelType = typename Superclass::PixelType

Typedefs from the superclass.

Definition at line 66 of file itkFiniteDifferenceSparseImageFunction.h.

template<typename TSparseImageType >
using itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::Pointer = SmartPointer< Self >

Definition at line 56 of file itkFiniteDifferenceSparseImageFunction.h.

template<typename TSparseImageType >
using itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::RadiusType = typename Superclass::RadiusType

Definition at line 68 of file itkFiniteDifferenceSparseImageFunction.h.

template<typename TSparseImageType >
using itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::Self = FiniteDifferenceSparseImageFunction

Standard class type alias.

Definition at line 54 of file itkFiniteDifferenceSparseImageFunction.h.

template<typename TSparseImageType >
using itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::SparseImageType = typename Superclass::ImageType

Definition at line 71 of file itkFiniteDifferenceSparseImageFunction.h.

template<typename TSparseImageType >
using itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::Superclass = FiniteDifferenceFunction< TSparseImageType >

Definition at line 55 of file itkFiniteDifferenceSparseImageFunction.h.

template<typename TSparseImageType >
using itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::TimeStepType = typename Superclass::TimeStepType

Definition at line 67 of file itkFiniteDifferenceSparseImageFunction.h.

Constructor & Destructor Documentation

template<typename TSparseImageType >
itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::FiniteDifferenceSparseImageFunction ( )
protecteddefault
template<typename TSparseImageType >
itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::~FiniteDifferenceSparseImageFunction ( )
overrideprotecteddefault

Member Function Documentation

template<typename 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<typename TSparseImageType >
PixelType itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::ComputeUpdate ( const NeighborhoodType ,
void *  ,
const FloatOffsetType  
)
inlineoverride

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.

Definition at line 86 of file itkFiniteDifferenceSparseImageFunction.h.

template<typename TSparseImageType >
virtual const char* itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::GetNameOfClass ( ) const
virtual
template<typename 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<typename TSparseImageType >
void itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

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::LightObject.

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

Member Data Documentation

template<typename TSparseImageType >
constexpr unsigned int itk::FiniteDifferenceSparseImageFunction< TSparseImageType >::ImageDimension = Superclass::ImageDimension
static

The image dimension.

Definition at line 63 of file itkFiniteDifferenceSparseImageFunction.h.


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