ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itk::GPUAnisotropicDiffusionFunction< TImage > Class Template Referenceabstract

#include <itkGPUAnisotropicDiffusionFunction.h>

Detailed Description

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

This is the GPU version of AnisotropicDiffusionFunction class.

How to use this class
This class must be subclassed to provide the GPUCalculateUpdate() methods of GPUFiniteDifferenceFunction and the function CalculateAverageGradientMagnitudeSquared(), which is called before each iteration to recalibrate the conductance term.

Definition at line 38 of file itkGPUAnisotropicDiffusionFunction.h.

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

Public Types

using ConstPointer = SmartPointer<const Self>
 
typedef Vector< float, Self::ImageDimensionFloatOffsetType
 
typedef TImage ImageType
 
typedef ConstNeighborhoodIterator< TImage, DefaultBoundaryConditionTypeNeighborhoodType
 
using PixelrealType = typename Superclass::PixelRealType
 
typedef typename ImageType::PixelType PixelType
 
using Pointer = SmartPointer<Self>
 
typedef typename ConstNeighborhoodIterator< TImage >::RadiusType RadiusType
 
using Self = GPUAnisotropicDiffusionFunction
 
using Superclass = GPUFiniteDifferenceFunction<TImage>
 
typedef double TimeStepType
 
- Public Types inherited from itk::GPUFiniteDifferenceFunction< TImage >
using ConstPointer
 
typedef ZeroFluxNeumannBoundaryCondition< ImageTypeDefaultBoundaryConditionType
 
using DefaultBoundaryConditionType
 
using DifferenceFunctionType
 
typedef Vector< float, Self::ImageDimensionFloatOffsetType
 
using FloatOffsetType
 
typedef TImage ImageType
 
using ImageType
 
typedef ConstNeighborhoodIterator< TImage, DefaultBoundaryConditionTypeNeighborhoodType
 
using NeighborhoodType
 
typedef double PixelRealType
 
using PixelRealType
 
typedef typename ImageType::PixelType PixelType
 
using PixelType
 
using Pointer
 
typedef typename ConstNeighborhoodIterator< TImage >::RadiusType RadiusType
 
using RadiusType
 
using Self
 
using Superclass
 
typedef double TimeStepType
 
using TimeStepType
 
- Public Types inherited from itk::FiniteDifferenceFunction< TImage >
using ConstPointer
 
using DefaultBoundaryConditionType
 
using FloatOffsetType
 
using ImageType
 
using NeighborhoodScalesType
 
using NeighborhoodType
 
using PixelRealType
 
using PixelType
 
using Pointer
 
using RadiusType
 
using Self
 
using Superclass
 
using TimeStepType
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = LightObject
 

Public Member Functions

TimeStepType ComputeGlobalTimeStep (void *GlobalData) const override
 
const double & GetAverageGradientMagnitudeSquared () const
 
const double & GetConductanceParameter () const
 
void * GetGlobalDataPointer () const override
 
const char * GetNameOfClass () const override
 
const TimeStepTypeGetTimeStep () const
 
virtual void GPUCalculateAverageGradientMagnitudeSquared (ImageType *)=0
 
void ReleaseGlobalDataPointer (void *GlobalData) const override
 
void SetAverageGradientMagnitudeSquared (const double c)
 
void SetConductanceParameter (const double c)
 
void SetTimeStep (const TimeStepType &t)
 
- Public Member Functions inherited from itk::GPUFiniteDifferenceFunction< TImage >
const char * GetNameOfClass () const override
 
const char * GetNameOfClass () const override
 
virtual void GPUAllocateMetricData (unsigned int numPixels)
 
virtual void GPUAllocateMetricData (unsigned int numPixels)
 
virtual void GPUComputeUpdate (const typename TImage::Pointer output, typename TImage::Pointer update, void *gd)=0
 
virtual void GPUComputeUpdate (const typename TImage::Pointer output, typename TImage::Pointer update, void *gd)=0
 
virtual void GPUReleaseMetricData ()
 
virtual void GPUReleaseMetricData ()
 
PixelType ComputeUpdate (const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
 
PixelType ComputeUpdate (const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
 
- Public Member Functions inherited from itk::FiniteDifferenceFunction< TImage >
const NeighborhoodScalesType ComputeNeighborhoodScales () const
 
const NeighborhoodScalesType ComputeNeighborhoodScales () const
 
const RadiusTypeGetRadius () const
 
const RadiusTypeGetRadius () const
 
void GetScaleCoefficients (PixelRealType vals[ImageDimension]) const
 
void GetScaleCoefficients (PixelRealType vals[ImageDimension]) const
 
virtual void InitializeIteration ()
 
virtual void InitializeIteration ()
 
void SetRadius (const RadiusType &r)
 
void SetRadius (const RadiusType &r)
 
void SetScaleCoefficients (const PixelRealType vals[ImageDimension])
 
void SetScaleCoefficients (const PixelRealType vals[ImageDimension])
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual Pointer CreateAnother () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
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::GPUFiniteDifferenceFunction< TImage >
static constexpr unsigned int ImageDimension
 
static constexpr unsigned int ImageDimension
 
- Static Public Attributes inherited from itk::FiniteDifferenceFunction< TImage >
static constexpr unsigned int ImageDimension
 
static constexpr unsigned int ImageDimension
 

Protected Member Functions

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

Protected Attributes

GPUDataManager::Pointer m_AnisotropicDiffusionFunctionGPUBuffer {}
 
GPUKernelManager::Pointer m_AnisotropicDiffusionFunctionGPUKernelManager {}
 
int m_AverageGradientMagnitudeSquaredGPUKernelHandle {}
 
- Protected Attributes inherited from itk::GPUFiniteDifferenceFunction< TImage >
int m_ComputeUpdateGPUKernelHandle
 
int m_ComputeUpdateGPUKernelHandle
 
GPUKernelManager::Pointer m_GPUKernelManager
 
GPUKernelManager::Pointer m_GPUKernelManager
 
- Protected Attributes inherited from itk::FiniteDifferenceFunction< TImage >
RadiusType m_Radius
 
RadiusType m_Radius
 
PixelRealType m_ScaleCoefficients [ImageDimension]
 
PixelRealType m_ScaleCoefficients [ImageDimension]
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Private Attributes

double m_AverageGradientMagnitudeSquared {}
 
double m_ConductanceParameter {}
 
TimeStepType m_TimeStep {}
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Member Typedef Documentation

◆ ConstPointer

template<typename TImage>
using itk::GPUAnisotropicDiffusionFunction< TImage >::ConstPointer = SmartPointer<const Self>

Definition at line 47 of file itkGPUAnisotropicDiffusionFunction.h.

◆ FloatOffsetType

template<typename TImage>

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

◆ ImageType

template<typename TImage>

Extract some parameters from the image type

◆ NeighborhoodType

template<typename TImage>

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.

◆ PixelrealType

template<typename TImage>
using itk::GPUAnisotropicDiffusionFunction< TImage >::PixelrealType = typename Superclass::PixelRealType

Definition at line 55 of file itkGPUAnisotropicDiffusionFunction.h.

◆ PixelType

template<typename TImage>

◆ Pointer

template<typename TImage>
using itk::GPUAnisotropicDiffusionFunction< TImage >::Pointer = SmartPointer<Self>

Definition at line 46 of file itkGPUAnisotropicDiffusionFunction.h.

◆ RadiusType

template<typename TImage>

Neighborhood radius type

◆ Self

Standard class type aliases.

Definition at line 44 of file itkGPUAnisotropicDiffusionFunction.h.

◆ Superclass

template<typename TImage>
using itk::GPUAnisotropicDiffusionFunction< TImage >::Superclass = GPUFiniteDifferenceFunction<TImage>

Definition at line 45 of file itkGPUAnisotropicDiffusionFunction.h.

◆ TimeStepType

template<typename TImage>

Define the TimeStepType to always be double.

Constructor & Destructor Documentation

◆ GPUAnisotropicDiffusionFunction()

template<typename TImage>
itk::GPUAnisotropicDiffusionFunction< TImage >::GPUAnisotropicDiffusionFunction ( )
inlineprotected

◆ ~GPUAnisotropicDiffusionFunction()

template<typename TImage>
itk::GPUAnisotropicDiffusionFunction< TImage >::~GPUAnisotropicDiffusionFunction ( )
overrideprotecteddefault

Member Function Documentation

◆ ComputeGlobalTimeStep()

template<typename TImage>
TimeStepType itk::GPUAnisotropicDiffusionFunction< TImage >::ComputeGlobalTimeStep ( void * GlobalData) const
inlineoverridevirtual

Returns the time step supplied by the user. We don't need to use the global data supplied since we are returning a fixed value.

Implements itk::FiniteDifferenceFunction< TImage >.

Definition at line 116 of file itkGPUAnisotropicDiffusionFunction.h.

References GetTimeStep().

◆ GetAverageGradientMagnitudeSquared()

template<typename TImage>
const double & itk::GPUAnisotropicDiffusionFunction< TImage >::GetAverageGradientMagnitudeSquared ( ) const
inline

Set/Get the average gradient magnitude squared.

Definition at line 102 of file itkGPUAnisotropicDiffusionFunction.h.

References m_AverageGradientMagnitudeSquared.

Referenced by itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::InitializeIteration().

◆ GetConductanceParameter()

template<typename TImage>
const double & itk::GPUAnisotropicDiffusionFunction< TImage >::GetConductanceParameter ( ) const
inline

◆ GetGlobalDataPointer()

template<typename TImage>
void * itk::GPUAnisotropicDiffusionFunction< TImage >::GetGlobalDataPointer ( ) const
inlineoverridevirtual

The anisotropic diffusion classes don't use this particular parameter so it's safe to return a null value.

Implements itk::FiniteDifferenceFunction< TImage >.

Definition at line 124 of file itkGPUAnisotropicDiffusionFunction.h.

◆ GetNameOfClass()

◆ GetTimeStep()

template<typename TImage>
const TimeStepType & itk::GPUAnisotropicDiffusionFunction< TImage >::GetTimeStep ( ) const
inline

Definition at line 82 of file itkGPUAnisotropicDiffusionFunction.h.

References m_TimeStep.

Referenced by ComputeGlobalTimeStep().

◆ GPUCalculateAverageGradientMagnitudeSquared()

template<typename TImage>
virtual void itk::GPUAnisotropicDiffusionFunction< TImage >::GPUCalculateAverageGradientMagnitudeSquared ( ImageType * )
pure virtual

This method is called before each iteration. It calculates a scalar value that is the average of the gradient magnitude squared at each pixel in the output image (intermediate solution). The average gradient magnitude value is typically used in the anisotropic diffusion equations to calibrate the conductance term.

Implemented in itk::GPUScalarAnisotropicDiffusionFunction< TImage >.

◆ PrintSelf()

template<typename TImage>
void itk::GPUAnisotropicDiffusionFunction< TImage >::PrintSelf ( std::ostream & os,
Indent indent ) const
inlineoverrideprotectedvirtual

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::FiniteDifferenceFunction< TImage >.

Definition at line 147 of file itkGPUAnisotropicDiffusionFunction.h.

References m_ConductanceParameter, m_TimeStep, and itk::LightObject::PrintSelf().

◆ ReleaseGlobalDataPointer()

template<typename TImage>
void itk::GPUAnisotropicDiffusionFunction< TImage >::ReleaseGlobalDataPointer ( void * GlobalData) const
inlineoverridevirtual

Does nothing. No global data is used in this class of equations.

Implements itk::FiniteDifferenceFunction< TImage >.

Definition at line 131 of file itkGPUAnisotropicDiffusionFunction.h.

◆ SetAverageGradientMagnitudeSquared()

template<typename TImage>
void itk::GPUAnisotropicDiffusionFunction< TImage >::SetAverageGradientMagnitudeSquared ( const double c)
inline

◆ SetConductanceParameter()

template<typename TImage>
void itk::GPUAnisotropicDiffusionFunction< TImage >::SetConductanceParameter ( const double c)
inline

Set/Get the conductance parameter. The conductance parameter.

Definition at line 89 of file itkGPUAnisotropicDiffusionFunction.h.

References m_ConductanceParameter.

◆ SetTimeStep()

template<typename TImage>
void itk::GPUAnisotropicDiffusionFunction< TImage >::SetTimeStep ( const TimeStepType & t)
inline

Set/Get the time step. For this class of anisotropic diffusion filters, the time-step is supplied by the user and remains fixed for all updates.

Definition at line 76 of file itkGPUAnisotropicDiffusionFunction.h.

References m_TimeStep.

Member Data Documentation

◆ ImageDimension

template<typename TImage>
unsigned int itk::GPUAnisotropicDiffusionFunction< TImage >::ImageDimension = Superclass::ImageDimension
staticconstexpr

Inherit some parameters from the superclass type

Definition at line 62 of file itkGPUAnisotropicDiffusionFunction.h.

◆ m_AnisotropicDiffusionFunctionGPUBuffer

template<typename TImage>
GPUDataManager::Pointer itk::GPUAnisotropicDiffusionFunction< TImage >::m_AnisotropicDiffusionFunctionGPUBuffer {}
protected

Definition at line 155 of file itkGPUAnisotropicDiffusionFunction.h.

◆ m_AnisotropicDiffusionFunctionGPUKernelManager

template<typename TImage>
GPUKernelManager::Pointer itk::GPUAnisotropicDiffusionFunction< TImage >::m_AnisotropicDiffusionFunctionGPUKernelManager {}
protected

Definition at line 156 of file itkGPUAnisotropicDiffusionFunction.h.

◆ m_AverageGradientMagnitudeSquared

template<typename TImage>
double itk::GPUAnisotropicDiffusionFunction< TImage >::m_AverageGradientMagnitudeSquared {}
private

◆ m_AverageGradientMagnitudeSquaredGPUKernelHandle

template<typename TImage>
int itk::GPUAnisotropicDiffusionFunction< TImage >::m_AverageGradientMagnitudeSquaredGPUKernelHandle {}
protected

Definition at line 159 of file itkGPUAnisotropicDiffusionFunction.h.

◆ m_ConductanceParameter

template<typename TImage>
double itk::GPUAnisotropicDiffusionFunction< TImage >::m_ConductanceParameter {}
private

◆ m_TimeStep

template<typename TImage>
TimeStepType itk::GPUAnisotropicDiffusionFunction< TImage >::m_TimeStep {}
private

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