Orfeo Toolbox  4.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
itk::MinMaxCurvatureFlowFunction< TImage > Class Template Reference

#include <itkMinMaxCurvatureFlowFunction.h>

+ Inheritance diagram for itk::MinMaxCurvatureFlowFunction< TImage >:
+ Collaboration diagram for itk::MinMaxCurvatureFlowFunction< TImage >:

Classes

struct  Dispatch
 
struct  DispatchBase
 

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef
ZeroFluxNeumannBoundaryCondition
< ImageType
DefaultBoundaryConditionType
 
typedef Superclass::FloatOffsetType FloatOffsetType
 
typedef Superclass::ImageType ImageType
 
typedef
Superclass::NeighborhoodScalesType 
NeighborhoodScalesType
 
typedef
Superclass::NeighborhoodType 
NeighborhoodType
 
typedef Superclass::PixelRealType PixelRealType
 
typedef Superclass::PixelType PixelType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::RadiusType RadiusType
 
typedef RadiusType::SizeValueType RadiusValueType
 
typedef PixelType ScalarValueType
 
typedef MinMaxCurvatureFlowFunction Self
 
typedef CurvatureFlowFunction
< TImage > 
Superclass
 
typedef Superclass::TimeStepType TimeStepType
 

Public Member Functions

virtual TimeStepType ComputeGlobalTimeStep (void *GlobalData) const
 
const NeighborhoodScalesType ComputeNeighborhoodScales () const
 
virtual PixelType ComputeUpdate (const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0))
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual void Delete ()
 
virtual void * GetGlobalDataPointer () const
 
virtual const char * GetNameOfClass () const
 
const RadiusTypeGetRadius () const
 
const RadiusValueTypeGetRadiusValueType () const
 
virtual int GetReferenceCount () const
 
void GetScaleCoefficients (PixelRealType vals[ImageDimension]) const
 
const RadiusValueTypeGetStencilRadius () const
 
const TimeStepTypeGetTimeStep () const
 
virtual void InitializeIteration ()
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 
virtual void Register () const
 
virtual void ReleaseGlobalDataPointer (void *GlobalData) const
 
void SetRadius (const RadiusType &r)
 
virtual void SetReferenceCount (int)
 
void SetScaleCoefficients (PixelRealType vals[ImageDimension])
 
void SetStencilRadius (const RadiusValueType radius)
 
void SetTimeStep (const TimeStepType &t)
 
virtual void UnRegister () const
 

Static Public Member Functions

static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static const unsigned int ImageDimension = Superclass::ImageDimension
 

Protected Types

typedef int InternalReferenceCountType
 
typedef Neighborhood
< PixelType,
itkGetStaticConstMacro(ImageDimension) > 
StencilOperatorType
 

Protected Member Functions

 MinMaxCurvatureFlowFunction ()
 
 ~MinMaxCurvatureFlowFunction ()
 
void InitializeStencilOperator ()
 
virtual LightObject::Pointer InternalClone () const
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
void PrintSelf (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 

Protected Attributes

RadiusType m_Radius
 
InternalReferenceCountType m_ReferenceCount
 
SimpleFastMutexLock m_ReferenceCountLock
 
PixelRealType m_ScaleCoefficients [ImageDimension]
 
StencilOperatorType m_StencilOperator
 

Private Member Functions

 MinMaxCurvatureFlowFunction (const Self &)
 
virtual PixelType ComputeThreshold (const Dispatch< 2 > &, const NeighborhoodType &neighborhood) const
 
virtual PixelType ComputeThreshold (const Dispatch< 3 > &, const NeighborhoodType &neighborhood) const
 
virtual PixelType ComputeThreshold (const DispatchBase &, const NeighborhoodType &neighborhood) const
 
void operator= (const Self &)
 

Private Attributes

RadiusValueType m_StencilRadius
 

Detailed Description

template<typename TImage>
class itk::MinMaxCurvatureFlowFunction< TImage >

This class encapsulate the finite difference equation which drives a min/max curvature flow denoising algorithm.

This class uses a zero flux Neumann boundary condition when computing derivatives near the data boundary.

This class operates as part of the finite difference solver hierarchy.

See Also
MinMaxCurvatureFlowImageFilter
ZeroFluxNeumannBoundaryCondition

Definition at line 42 of file itkMinMaxCurvatureFlowFunction.h.

Member Typedef Documentation

template<typename TImage>
typedef SmartPointer< const Self > itk::MinMaxCurvatureFlowFunction< TImage >::ConstPointer

Definition at line 50 of file itkMinMaxCurvatureFlowFunction.h.

The default boundary condition for finite difference functions that is used unless overridden in the Evaluate() method.

Definition at line 92 of file itkFiniteDifferenceFunction.h.

Definition at line 64 of file itkMinMaxCurvatureFlowFunction.h.

template<typename TImage>
typedef Superclass::ImageType itk::MinMaxCurvatureFlowFunction< TImage >::ImageType

Inherit some parameters from the superclass type.

Definition at line 57 of file itkMinMaxCurvatureFlowFunction.h.

typedef int itk::LightObject::InternalReferenceCountType
protectedinherited

Define the type of the reference count according to the target. This allows the use of atomic operations

Definition at line 152 of file itkLightObject.h.

template<typename TImage>
typedef Superclass::NeighborhoodScalesType itk::CurvatureFlowFunction< TImage >::NeighborhoodScalesType
inherited

Definition at line 67 of file itkCurvatureFlowFunction.h.

Definition at line 63 of file itkMinMaxCurvatureFlowFunction.h.

template<typename TImage>
typedef Superclass::PixelRealType itk::CurvatureFlowFunction< TImage >::PixelRealType
inherited

Definition at line 65 of file itkCurvatureFlowFunction.h.

template<typename TImage>
typedef Superclass::PixelType itk::MinMaxCurvatureFlowFunction< TImage >::PixelType

Definition at line 61 of file itkMinMaxCurvatureFlowFunction.h.

template<typename TImage>
typedef SmartPointer< Self > itk::MinMaxCurvatureFlowFunction< TImage >::Pointer

Definition at line 49 of file itkMinMaxCurvatureFlowFunction.h.

template<typename TImage>
typedef Superclass::RadiusType itk::MinMaxCurvatureFlowFunction< TImage >::RadiusType

Definition at line 62 of file itkMinMaxCurvatureFlowFunction.h.

template<typename TImage>
typedef RadiusType::SizeValueType itk::MinMaxCurvatureFlowFunction< TImage >::RadiusValueType

Typedef support for the stencil radius.

Definition at line 71 of file itkMinMaxCurvatureFlowFunction.h.

template<typename TImage>
typedef PixelType itk::CurvatureFlowFunction< TImage >::ScalarValueType
inherited

Definition at line 64 of file itkCurvatureFlowFunction.h.

template<typename TImage>
typedef MinMaxCurvatureFlowFunction itk::MinMaxCurvatureFlowFunction< TImage >::Self

Standard class typedefs.

Definition at line 47 of file itkMinMaxCurvatureFlowFunction.h.

template<typename TImage>
typedef Neighborhood< PixelType, itkGetStaticConstMacro(ImageDimension) > itk::MinMaxCurvatureFlowFunction< TImage >::StencilOperatorType
protected

Definition at line 94 of file itkMinMaxCurvatureFlowFunction.h.

template<typename TImage>
typedef CurvatureFlowFunction< TImage > itk::MinMaxCurvatureFlowFunction< TImage >::Superclass

Definition at line 48 of file itkMinMaxCurvatureFlowFunction.h.

template<typename TImage>
typedef Superclass::TimeStepType itk::CurvatureFlowFunction< TImage >::TimeStepType
inherited

Definition at line 69 of file itkCurvatureFlowFunction.h.

Constructor & Destructor Documentation

template<typename TImage >
itk::MinMaxCurvatureFlowFunction< TImage >::MinMaxCurvatureFlowFunction ( )
protected

Constructor

Definition at line 32 of file itkMinMaxCurvatureFlowFunction.hxx.

template<typename TImage>
itk::MinMaxCurvatureFlowFunction< TImage >::~MinMaxCurvatureFlowFunction ( )
inlineprotected

Definition at line 92 of file itkMinMaxCurvatureFlowFunction.h.

template<typename TImage>
itk::MinMaxCurvatureFlowFunction< TImage >::MinMaxCurvatureFlowFunction ( const Self )
private

Member Function Documentation

void itk::LightObject::BreakOnError ( )
staticinherited

This method is called when itkExceptionMacro executes. It allows the debugger to break on error.

Definition at line 150 of file itkLightObject.cxx.

template<typename TImage >
CurvatureFlowFunction< TImage >::TimeStepType itk::CurvatureFlowFunction< TImage >::ComputeGlobalTimeStep ( void *  GlobalData) const
virtualinherited

Computes the time step for an update given a global data structure. The data used in the computation may take different forms depending on the nature of the equations. This global data cannot be kept in the instance of the equation object itself since the equation object must remain stateless for thread safety. The global data is therefore managed for each thread by the finite difference solver filters.

Currently, this function returns the user specified constant time step.

Todo:
compute timestep based on CFL condition.

Compute the global time step

Implements itk::FiniteDifferenceFunction< TImage >.

Definition at line 52 of file itkCurvatureFlowFunction.hxx.

const NeighborhoodScalesType itk::FiniteDifferenceFunction< TImage >::ComputeNeighborhoodScales ( ) const
inherited

Compute the scales that weight the neighborhood during difference operations to properly account for spacing and neighborhood radius

template<typename TImage >
MinMaxCurvatureFlowFunction< TImage >::PixelType itk::MinMaxCurvatureFlowFunction< TImage >::ComputeThreshold ( const Dispatch< 2 > &  ,
const NeighborhoodType it 
) const
privatevirtual

This method computes the threshold by averaging the intensity in direction perpendicular to the image gradient.

Compute the threshold by averaging the image intensity in the direction perpendicular to the image gradient.

Definition at line 234 of file itkMinMaxCurvatureFlowFunction.hxx.

References itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetCenterPixel(), itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetPixel(), itk::Neighborhood< TPixel, VDimension, TAllocator >::GetStride(), and itk::Neighborhood< TPixel, VDimension, TAllocator >::Size().

template<typename TImage >
MinMaxCurvatureFlowFunction< TImage >::PixelType itk::MinMaxCurvatureFlowFunction< TImage >::ComputeThreshold ( const Dispatch< 3 > &  ,
const NeighborhoodType neighborhood 
) const
privatevirtual
template<typename TImage >
MinMaxCurvatureFlowFunction< TImage >::PixelType itk::MinMaxCurvatureFlowFunction< TImage >::ComputeThreshold ( const DispatchBase ,
const NeighborhoodType it 
) const
privatevirtual
template<typename TImage >
MinMaxCurvatureFlowFunction< TImage >::PixelType itk::MinMaxCurvatureFlowFunction< TImage >::ComputeUpdate ( const NeighborhoodType neighborhood,
void *  globalData,
const FloatOffsetType offset = FloatOffsetType(0.0) 
)
virtual

This method computes the solution update for each pixel that does not lie on a the data set boundary.

Reimplemented from itk::CurvatureFlowFunction< TImage >.

Reimplemented in itk::BinaryMinMaxCurvatureFlowFunction< TImage >.

Definition at line 419 of file itkMinMaxCurvatureFlowFunction.hxx.

template<typename TImage>
virtual::itk::LightObject::Pointer itk::MinMaxCurvatureFlowFunction< TImage >::CreateAnother ( void  ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::CurvatureFlowFunction< TImage >.

void itk::LightObject::Delete ( )
virtualinherited

Delete an itk object. This method should always be used to delete an object when the new operator was used to create it. Using the C delete method will not work with reference counting.

Delete a itk object. This method should always be used to delete an object when the new operator was used to create it. Using the C++ delete method will not work with reference counting.

Definition at line 91 of file itkLightObject.cxx.

template<typename TImage>
virtual void* itk::CurvatureFlowFunction< TImage >::GetGlobalDataPointer ( ) const
inlinevirtualinherited

Returns a pointer to a global data structure that is passed to this object from the solver at each calculation. The idea is that the solver holds the state of any global values needed to calculate the time step, while the equation object performs the actual calculations. The global data should also be initialized in this method.

Implements itk::FiniteDifferenceFunction< TImage >.

Definition at line 91 of file itkCurvatureFlowFunction.h.

template<typename TImage>
virtual const char* itk::MinMaxCurvatureFlowFunction< TImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods)

Reimplemented from itk::CurvatureFlowFunction< TImage >.

Reimplemented in itk::BinaryMinMaxCurvatureFlowFunction< TImage >.

const RadiusType& itk::FiniteDifferenceFunction< TImage >::GetRadius ( void  ) const
inherited

Returns the radius of the neighborhood this FiniteDifferenceFunction needs to perform its calculations.

template<typename TImage>
const RadiusValueType& itk::MinMaxCurvatureFlowFunction< TImage >::GetRadiusValueType ( ) const
inline
virtual int itk::LightObject::GetReferenceCount ( ) const
inlinevirtualinherited

Gets the reference count on this object.

Definition at line 112 of file itkLightObject.h.

void itk::FiniteDifferenceFunction< TImage >::GetScaleCoefficients ( PixelRealType  vals[ImageDimension]) const
inherited

Returns the current scale coefficients.

template<typename TImage>
const RadiusValueType& itk::MinMaxCurvatureFlowFunction< TImage >::GetStencilRadius ( ) const
inline

Convenience function for symmetry with SetStencilRadius.

Definition at line 80 of file itkMinMaxCurvatureFlowFunction.h.

References itk::MinMaxCurvatureFlowFunction< TImage >::GetRadiusValueType().

template<typename TImage>
const TimeStepType& itk::CurvatureFlowFunction< TImage >::GetTimeStep ( ) const
inlineinherited

Get the time step parameter

Definition at line 111 of file itkCurvatureFlowFunction.h.

References itk::CurvatureFlowFunction< TImage >::m_TimeStep.

virtual void itk::FiniteDifferenceFunction< TImage >::InitializeIteration ( )
inlinevirtualinherited

This method allows the function to set its state before each iteration of the finite difference solver (image filter) that uses it. This is a thread-safe time to manipulate the object's state.

An example of how this can be used: the AnisotropicDiffusionFunction class of FiniteDifferenceFunction use this method to pre-calculate an average gradient magnitude across the entire image region. This value is set in the function object and used by the ComputeUpdate() methods that are called at each pixel as a constant.

Reimplemented in itk::CurvatureNDAnisotropicDiffusionFunction< TImage >, itk::GradientNDAnisotropicDiffusionFunction< TImage >, itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >, itk::VectorGradientNDAnisotropicDiffusionFunction< TImage >, itk::GPUFiniteDifferenceFunction< TImage >, and itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >.

Definition at line 118 of file itkFiniteDifferenceFunction.h.

Referenced by itk::AnisotropicDiffusionImageFilter< TInputImage, TOutputImage >::InitializeIteration().

template<typename TImage >
void itk::MinMaxCurvatureFlowFunction< TImage >::InitializeStencilOperator ( )
protected

Initialize the stencil opearator to be an N-Dimensional sphere of radius m_StencilRadius.

Initialize the stencil operator.

Definition at line 67 of file itkMinMaxCurvatureFlowFunction.hxx.

LightObject::Pointer itk::LightObject::InternalClone ( ) const
protectedvirtualinherited
itk::LightObject::itkCloneMacro ( Self  )
inherited
template<typename TImage>
static Pointer itk::MinMaxCurvatureFlowFunction< TImage >::New ( )
static

Method for creation through the object factory.

template<typename TImage>
void itk::MinMaxCurvatureFlowFunction< TImage >::operator= ( const Self )
private
void itk::LightObject::Print ( std::ostream &  os,
Indent  indent = 0 
) const
inherited

Cause the object to print itself out.

Avoid DLL boundary problems. This function will be common to all itk objects. It just calls the header/self/trailer virtual print methods, which can be overriden by subclasses (any itk object).

Definition at line 137 of file itkLightObject.cxx.

References itk::Indent::GetNextIndent().

Referenced by itk::operator<<(), and itk::VideoStream< TFrameType >::PrintSelf().

void itk::LightObject::PrintHeader ( std::ostream &  os,
Indent  indent 
) const
protectedvirtualinherited

Define a default print header for all objects.

Definition at line 315 of file itkLightObject.cxx.

void itk::FiniteDifferenceFunction< TImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protectedvirtualinherited

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.

Chaining method to print an object's instance variables, as well as its superclasses.

Reimplemented from itk::LightObject.

Reimplemented in itk::GPUFiniteDifferenceFunction< TImage >.

Referenced by itk::AnisotropicDiffusionFunction< TImage >::PrintSelf().

void itk::LightObject::PrintTrailer ( std::ostream &  os,
Indent  indent 
) const
protectedvirtualinherited

Define a default print trailer for all objects.

Definition at line 325 of file itkLightObject.cxx.

void itk::LightObject::Register ( ) const
virtualinherited

Increase the reference count (mark as used by another object).

Reimplemented in itk::Object, and itk::ExceptionObject::ReferenceCountedExceptionData.

Definition at line 158 of file itkLightObject.cxx.

Referenced by itk::ExceptionObject::ReferenceCountedExceptionData::Register().

template<typename TImage>
virtual void itk::CurvatureFlowFunction< TImage >::ReleaseGlobalDataPointer ( void *  GlobalData) const
inlinevirtualinherited

When the finite difference solver filter has finished using a global data pointer, it passes it to this method, which frees the memory. The solver cannot free the memory because it does not know the type to which the pointer points.

Implements itk::FiniteDifferenceFunction< TImage >.

Definition at line 103 of file itkCurvatureFlowFunction.h.

void itk::FiniteDifferenceFunction< TImage >::SetRadius ( const RadiusType r)
inherited

Sets the radius of the neighborhood this FiniteDifferenceFunction needs to perform its calculations.

void itk::LightObject::SetReferenceCount ( int  ref)
virtualinherited

Sets the reference count on this object. This is a dangerous method, use it with care.

Sets the reference count (use with care)

Reimplemented in itk::Object.

Definition at line 240 of file itkLightObject.cxx.

void itk::FiniteDifferenceFunction< TImage >::SetScaleCoefficients ( PixelRealType  vals[ImageDimension])
inherited

Set the ScaleCoefficients for the difference operators. The defaults a 1.0. These can be set to take the image spacing into account.

template<typename TImage >
void itk::MinMaxCurvatureFlowFunction< TImage >::SetStencilRadius ( const RadiusValueType  value)

Set/Get the stencil radius.

Set the stencil radius.

Definition at line 44 of file itkMinMaxCurvatureFlowFunction.hxx.

Referenced by itk::MinMaxCurvatureFlowImageFilter< TInputImage, TOutputImage >::InitializeIteration().

template<typename TImage>
void itk::CurvatureFlowFunction< TImage >::SetTimeStep ( const TimeStepType t)
inlineinherited
void itk::LightObject::UnRegister ( ) const
virtualinherited

Decrease the reference count (release by another object).

Reimplemented in itk::Object, and itk::ExceptionObject::ReferenceCountedExceptionData.

Definition at line 189 of file itkLightObject.cxx.

Referenced by itk::LightObject::New(), and itk::ExceptionObject::ReferenceCountedExceptionData::UnRegister().

Member Data Documentation

template<typename TImage>
const unsigned int itk::MinMaxCurvatureFlowFunction< TImage >::ImageDimension = Superclass::ImageDimension
static

Extract superclass dimension.

Definition at line 68 of file itkMinMaxCurvatureFlowFunction.h.

RadiusType itk::FiniteDifferenceFunction< TImage >::m_Radius
protectedinherited

Definition at line 191 of file itkFiniteDifferenceFunction.h.

InternalReferenceCountType itk::LightObject::m_ReferenceCount
mutableprotectedinherited

Number of uses of this object by other objects.

Definition at line 156 of file itkLightObject.h.

SimpleFastMutexLock itk::LightObject::m_ReferenceCountLock
mutableprotectedinherited

Mutex lock to protect modification to the reference count

Definition at line 159 of file itkLightObject.h.

PixelRealType itk::FiniteDifferenceFunction< TImage >::m_ScaleCoefficients[ImageDimension]
protectedinherited

Definition at line 192 of file itkFiniteDifferenceFunction.h.

template<typename TImage>
StencilOperatorType itk::MinMaxCurvatureFlowFunction< TImage >::m_StencilOperator
protected

Definition at line 95 of file itkMinMaxCurvatureFlowFunction.h.

template<typename TImage>
RadiusValueType itk::MinMaxCurvatureFlowFunction< TImage >::m_StencilRadius
private

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

Generated at Sat Mar 8 2014 17:25:45 for Orfeo Toolbox with doxygen 1.8.3.1