![]() |
Orfeo Toolbox
3.16
|
This class defines all the necessary functionality for performing isotropic and anisotropic diffusion operations on vector neighborhoods from a sparse image. More...
#include <itkNormalVectorDiffusionFunction.h>
Inheritance diagram for itk::NormalVectorDiffusionFunction< TSparseImageType >:
Collaboration diagram for itk::NormalVectorDiffusionFunction< TSparseImageType >:Public Types | |
| typedef SmartPointer< const Self > | ConstPointer |
| typedef ZeroFluxNeumannBoundaryCondition < ImageType > | DefaultBoundaryConditionType |
| typedef Superclass::FloatOffsetType | FloatOffsetType |
| typedef TSparseImageType | ImageType |
| typedef Superclass::IndexType | IndexType |
| typedef Superclass::NeighborhoodScalesType | NeighborhoodScalesType |
| typedef Superclass::NeighborhoodType | NeighborhoodType |
| typedef NodeType::NodeDataType | NodeDataType |
| typedef Superclass::NodeType | NodeType |
| typedef Superclass::NodeValueType | NodeValueType |
| typedef Superclass::NormalVectorType | NormalVectorType |
| typedef double | PixelRealType |
| typedef Superclass::PixelType | PixelType |
| typedef SmartPointer< Self > | Pointer |
| typedef Superclass::RadiusType | RadiusType |
| typedef NormalVectorDiffusionFunction | Self |
| typedef Superclass::SparseImageType | SparseImageType |
| typedef NormalVectorFunctionBase < TSparseImageType > | Superclass |
| typedef Superclass::TimeStepType | TimeStepType |
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 |
Protected Member Functions | |
| NormalVectorDiffusionFunction () | |
| ~NormalVectorDiffusionFunction () | |
| NodeValueType | FluxStopFunction (const NodeValueType v) 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] |
Private Member Functions | |
| NormalVectorDiffusionFunction (const Self &) | |
| void | operator= (const Self &) |
Private Attributes | |
| NodeValueType | m_ConductanceParameter |
| NodeValueType | m_FluxStopConstant |
| int | m_NormalProcessType |
This class defines all the necessary functionality for performing isotropic and anisotropic diffusion operations on vector neighborhoods from a sparse image.
Definition at line 58 of file itkNormalVectorDiffusionFunction.h.
| typedef SmartPointer<const Self> itk::NormalVectorDiffusionFunction< TSparseImageType >::ConstPointer |
Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.
Definition at line 66 of file itkNormalVectorDiffusionFunction.h.
|
inherited |
The default boundary condition for finite difference functions that is used unless overridden in the Evaluate() method.
Definition at line 91 of file itkFiniteDifferenceFunction.h.
| typedef Superclass::FloatOffsetType itk::NormalVectorDiffusionFunction< TSparseImageType >::FloatOffsetType |
A floating point offset from an image grid location. Used for interpolation among grid values in a neighborhood.
Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.
Definition at line 82 of file itkNormalVectorDiffusionFunction.h.
|
inherited |
Extract some parameters from the image type
Definition at line 75 of file itkFiniteDifferenceFunction.h.
| typedef Superclass::IndexType itk::NormalVectorDiffusionFunction< TSparseImageType >::IndexType |
The index type for the sparse image.
Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.
Definition at line 83 of file itkNormalVectorDiffusionFunction.h.
|
protectedinherited |
Define the type of the reference count according to the target. This allows the use of atomic operations
Definition at line 137 of file itkLightObject.h.
| typedef Superclass::NeighborhoodScalesType itk::NormalVectorDiffusionFunction< TSparseImageType >::NeighborhoodScalesType |
The type of data structure that holds the scales with which the neighborhood is weighted to properly account for spacing and neighborhood radius.
Reimplemented from itk::FiniteDifferenceFunction< TSparseImageType >.
Definition at line 81 of file itkNormalVectorDiffusionFunction.h.
| typedef Superclass::NeighborhoodType itk::NormalVectorDiffusionFunction< 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::NormalVectorFunctionBase< TSparseImageType >.
Definition at line 80 of file itkNormalVectorDiffusionFunction.h.
|
inherited |
The type for the variables of NodeType. Scalar or vector.
Definition at line 76 of file itkFiniteDifferenceSparseImageFunction.h.
| typedef Superclass::NodeType itk::NormalVectorDiffusionFunction< TSparseImageType >::NodeType |
The node type for the sparse image.
Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.
Definition at line 85 of file itkNormalVectorDiffusionFunction.h.
| typedef Superclass::NodeValueType itk::NormalVectorDiffusionFunction< TSparseImageType >::NodeValueType |
The basic floating point type for the variables.
Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.
Definition at line 86 of file itkNormalVectorDiffusionFunction.h.
| typedef Superclass::NormalVectorType itk::NormalVectorDiffusionFunction< TSparseImageType >::NormalVectorType |
The vector type for the normals.
Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.
Definition at line 87 of file itkNormalVectorDiffusionFunction.h.
|
inherited |
Definition at line 80 of file itkFiniteDifferenceFunction.h.
|
inherited |
Typedefs from the superclass.
Reimplemented from itk::FiniteDifferenceFunction< TSparseImageType >.
Definition at line 62 of file itkFiniteDifferenceSparseImageFunction.h.
| typedef SmartPointer<Self> itk::NormalVectorDiffusionFunction< TSparseImageType >::Pointer |
Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.
Definition at line 65 of file itkNormalVectorDiffusionFunction.h.
| typedef Superclass::RadiusType itk::NormalVectorDiffusionFunction< TSparseImageType >::RadiusType |
Neighborhood radius type
Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.
Definition at line 79 of file itkNormalVectorDiffusionFunction.h.
| typedef NormalVectorDiffusionFunction itk::NormalVectorDiffusionFunction< TSparseImageType >::Self |
Standard class typedef.
Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.
Definition at line 63 of file itkNormalVectorDiffusionFunction.h.
| typedef Superclass::SparseImageType itk::NormalVectorDiffusionFunction< TSparseImageType >::SparseImageType |
Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.
Definition at line 84 of file itkNormalVectorDiffusionFunction.h.
| typedef NormalVectorFunctionBase<TSparseImageType> itk::NormalVectorDiffusionFunction< TSparseImageType >::Superclass |
Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.
Definition at line 64 of file itkNormalVectorDiffusionFunction.h.
| typedef Superclass::TimeStepType itk::NormalVectorDiffusionFunction< TSparseImageType >::TimeStepType |
Typedefs from the superclass.
Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.
Definition at line 75 of file itkNormalVectorDiffusionFunction.h.
|
protected |
Definition at line 28 of file itkNormalVectorDiffusionFunction.txx.
|
inlineprotected |
Definition at line 135 of file itkNormalVectorDiffusionFunction.h.
|
private |
|
staticinherited |
This method is called when itkExceptionMacro executes. It allows the debugger to break on error.
Definition at line 149 of file itkLightObject.cxx.
|
inlinevirtualinherited |
For the global time step, we return the time step parameter.
Implements itk::FiniteDifferenceFunction< TSparseImageType >.
Definition at line 88 of file itkNormalVectorFunctionBase.h.
|
inherited |
Compute the scales that weight the neighborhood during difference operations to properly account for spacing and neighborhood radius
|
virtual |
The actual update rule for the normal vectors.
Implements itk::FiniteDifferenceSparseImageFunction< TSparseImageType >.
Definition at line 178 of file itkNormalVectorDiffusionFunction.txx.
References itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetCenterPixel(), and itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetNext().
|
inlinevirtualinherited |
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 82 of file itkFiniteDifferenceSparseImageFunction.h.
|
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::LightObject.
|
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 88 of file itkLightObject.cxx.
|
inlineprotected |
The method called in anisotropic diffusion to inhibit diffusion across areas with large curvature.
Definition at line 140 of file itkNormalVectorDiffusionFunction.h.
|
inline |
This method returns the conductance parameter.
Definition at line 115 of file itkNormalVectorDiffusionFunction.h.
|
inline |
This method returns the internal variable FluxStopConstant.
Definition at line 119 of file itkNormalVectorDiffusionFunction.h.
|
inlinevirtualinherited |
Globaldata methods are not needed in this class.
Implements itk::FiniteDifferenceFunction< TSparseImageType >.
Definition at line 84 of file itkNormalVectorFunctionBase.h.
|
virtual |
Run-time type information (and related methods)
Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.
|
inline |
This method returns the isotropic/anisotropic filtering parameter.
Definition at line 97 of file itkNormalVectorDiffusionFunction.h.
|
inlineinherited |
Returns the radius of the neighborhood this FiniteDifferenceFunction needs to perform its calculations.
Definition at line 145 of file itkFiniteDifferenceFunction.h.
|
inlinevirtualinherited |
Gets the reference count on this object.
Definition at line 105 of file itkLightObject.h.
|
inlineinherited |
Returns the time step.
Definition at line 96 of file itkNormalVectorFunctionBase.h.
|
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 Anisotropic diffusion class of FiniteDifferenceFunctions 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.
Definition at line 117 of file itkFiniteDifferenceFunction.h.
|
static |
Standard New macro.
Reimplemented from itk::LightObject.
|
private |
|
virtual |
This function is called from LevelSetNormalImageFilter for all of the nodes to compute and store the flux vectors (first derivatives of the normal vectors. ComputeUpdateNormal then takes derivatives of the flux vectors. This way we avoid repeating the same flux computations.
Reimplemented from itk::FiniteDifferenceSparseImageFunction< TSparseImageType >.
Definition at line 58 of file itkNormalVectorDiffusionFunction.txx.
References itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetCenterPixel(), itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetNext(), itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetPixel(), itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetPrevious(), itk::Neighborhood< TPixel, VDimension, TAllocator >::GetStride(), and itk::Neighborhood< TPixel, VDimension, TAllocator >::Size().
|
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 135 of file itkLightObject.cxx.
References itk::Indent::GetNextIndent().
Referenced by itk::operator<<().
|
protectedvirtualinherited |
Define a default print header for all objects.
Definition at line 320 of file itkLightObject.cxx.
|
protectedvirtual |
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::NormalVectorFunctionBase< TSparseImageType >.
Definition at line 47 of file itkNormalVectorDiffusionFunction.txx.
|
protectedvirtualinherited |
Define a default print trailer for all objects.
Definition at line 331 of file itkLightObject.cxx.
|
virtualinherited |
Increase the reference count (mark as used by another object).
Reimplemented in itk::ExceptionObject::ReferenceCountedExceptionData, and itk::Object.
Definition at line 160 of file itkLightObject.cxx.
|
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< TSparseImageType >.
Definition at line 85 of file itkNormalVectorFunctionBase.h.
|
inline |
This method sets the conductance parameter used in anisotropic filtering. Useful values for processing 2D and 3D shapes are between 0.1 and 0.25. Lower values preserve more shape features, higher values smooth more. As the conductance parameter large, the processing becomes isotropic. Default is 0.
Definition at line 105 of file itkNormalVectorDiffusionFunction.h.
|
inline |
This method is used to choose between isotropic/anisotropic filtering. A parameter value of 0 indicates isotropic diffusion and is the default. Parameter value 1 is anisotropic diffusion. When using anisotropic diffusion the conductance parameter should also be set.
Definition at line 93 of file itkNormalVectorDiffusionFunction.h.
|
inlineinherited |
Sets the radius of the neighborhood this FiniteDifferenceFunction needs to perform its calculations.
Definition at line 140 of file itkFiniteDifferenceFunction.h.
|
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 244 of file itkLightObject.cxx.
|
inlineinherited |
Set the ScaleCoefficients for the difference operators. The defaults a 1.0. These can be set to take the image spacing into account.
Definition at line 151 of file itkFiniteDifferenceFunction.h.
|
inlineinherited |
Sets the time step.
Definition at line 92 of file itkNormalVectorFunctionBase.h.
|
virtualinherited |
Decrease the reference count (release by another object).
Reimplemented in itk::ExceptionObject::ReferenceCountedExceptionData, and itk::Object.
Definition at line 192 of file itkLightObject.cxx.
Referenced by itk::LightObject::New().
|
static |
Image dimension derived from the superclass.
Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.
Definition at line 72 of file itkNormalVectorDiffusionFunction.h.
|
private |
The conductance parameter used for anisotropic diffusion.
Definition at line 149 of file itkNormalVectorDiffusionFunction.h.
|
private |
The internal variable used in the FluxStopFunction. It is computed from ConductanceParameter.
Definition at line 153 of file itkNormalVectorDiffusionFunction.h.
|
private |
The isotropic/anisotropic filtering choice parameter.
Definition at line 156 of file itkNormalVectorDiffusionFunction.h.
|
protectedinherited |
Definition at line 201 of file itkFiniteDifferenceFunction.h.
|
mutableprotectedinherited |
Number of uses of this object by other objects.
Definition at line 141 of file itkLightObject.h.
|
mutableprotectedinherited |
Mutex lock to protect modification to the reference count
Definition at line 144 of file itkLightObject.h.
|
protectedinherited |
Definition at line 202 of file itkFiniteDifferenceFunction.h.