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

#include <itkGPUAnisotropicDiffusionFunction.h>

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

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.

Public Types

using ConstPointer = SmartPointer< const Self >
 
using FloatOffsetType = typename Superclass::FloatOffsetType
 
using ImageType = typename Superclass::ImageType
 
using NeighborhoodType = typename Superclass::NeighborhoodType
 
using PixelrealType = typename Superclass::PixelRealType
 
using PixelType = typename Superclass::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename Superclass::RadiusType
 
using Self = GPUAnisotropicDiffusionFunction
 
using Superclass = GPUFiniteDifferenceFunction< TImage >
 
using TimeStepType = typename Superclass::TimeStepType
 
- Public Types inherited from itk::GPUFiniteDifferenceFunction< TImage >
using ConstPointer = SmartPointer< const Self >
 
using DefaultBoundaryConditionType = typename Superclass::DefaultBoundaryConditionType
 
using DifferenceFunctionType = Superclass
 
using FloatOffsetType = typename Superclass::FloatOffsetType
 
using ImageType = typename Superclass::ImageType
 
using NeighborhoodType = typename Superclass::NeighborhoodType
 
using PixelRealType = typename Superclass::PixelRealType
 
using PixelType = typename Superclass::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename Superclass::RadiusType
 
using Self = GPUFiniteDifferenceFunction
 
using Superclass = FiniteDifferenceFunction< TImage >
 
using TimeStepType = typename Superclass::TimeStepType
 
- Public Types inherited from itk::FiniteDifferenceFunction< TImage >
using ConstPointer = SmartPointer< const Self >
 
using DefaultBoundaryConditionType = ZeroFluxNeumannBoundaryCondition< ImageType >
 
using FloatOffsetType = Vector< float, Self::ImageDimension >
 
using ImageType = TImage
 
using NeighborhoodScalesType = Vector< PixelRealType, Self::ImageDimension >
 
using NeighborhoodType = ConstNeighborhoodIterator< TImage, DefaultBoundaryConditionType >
 
using PixelRealType = double
 
using PixelType = typename ImageType::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename ConstNeighborhoodIterator< TImage >::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

TimeStepType ComputeGlobalTimeStep (void *) const override
 
const double & GetAverageGradientMagnitudeSquared () const
 
const double & GetConductanceParameter () const
 
void * GetGlobalDataPointer () const override
 
virtual const char * GetNameOfClass () const
 
const TimeStepTypeGetTimeStep () const
 
virtual void GPUCalculateAverageGradientMagnitudeSquared (ImageType *)=0
 
void ReleaseGlobalDataPointer (void *) 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 >
virtual void GPUAllocateMetricData (unsigned int)
 
virtual void GPUComputeUpdate (const typename TImage::Pointer output, typename TImage::Pointer update, void *gd)=0
 
virtual void GPUReleaseMetricData ()
 
virtual PixelType ComputeUpdate (const NeighborhoodType &, void *, const FloatOffsetType &) override
 
- Public Member Functions inherited from itk::FiniteDifferenceFunction< TImage >
const NeighborhoodScalesType ComputeNeighborhoodScales () const
 
const RadiusTypeGetRadius () const
 
void GetScaleCoefficients (PixelRealType vals[ImageDimension]) const
 
virtual void InitializeIteration ()
 
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::GPUFiniteDifferenceFunction< TImage >
static constexpr unsigned int ImageDimension
 
- Static Public Attributes inherited from itk::FiniteDifferenceFunction< TImage >
static constexpr unsigned int ImageDimension
 

Protected Member Functions

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

Protected Attributes

GPUDataManager::Pointer m_AnisotropicDiffusionFunctionGPUBuffer
 
GPUKernelManager::Pointer m_AnisotropicDiffusionFunctionGPUKernelManager
 
int m_AverageGradientMagnitudeSquaredGPUKernelHandle
 
- Protected Attributes inherited from itk::GPUFiniteDifferenceFunction< TImage >
int m_ComputeUpdateGPUKernelHandle
 
GPUKernelManager::Pointer m_GPUKernelManager
 
- Protected Attributes inherited from itk::FiniteDifferenceFunction< TImage >
RadiusType m_Radius
 
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

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

Definition at line 48 of file itkGPUAnisotropicDiffusionFunction.h.

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

Definition at line 60 of file itkGPUAnisotropicDiffusionFunction.h.

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

Inherit some parameters from the superclass type

Definition at line 54 of file itkGPUAnisotropicDiffusionFunction.h.

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

Definition at line 58 of file itkGPUAnisotropicDiffusionFunction.h.

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

Definition at line 56 of file itkGPUAnisotropicDiffusionFunction.h.

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

Definition at line 55 of file itkGPUAnisotropicDiffusionFunction.h.

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

Definition at line 47 of file itkGPUAnisotropicDiffusionFunction.h.

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

Definition at line 57 of file itkGPUAnisotropicDiffusionFunction.h.

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

Standard class type aliases.

Definition at line 45 of file itkGPUAnisotropicDiffusionFunction.h.

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

Definition at line 46 of file itkGPUAnisotropicDiffusionFunction.h.

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

Definition at line 59 of file itkGPUAnisotropicDiffusionFunction.h.

Constructor & Destructor Documentation

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

Definition at line 135 of file itkGPUAnisotropicDiffusionFunction.h.

Member Function Documentation

template<typename TImage >
TimeStepType itk::GPUAnisotropicDiffusionFunction< TImage >::ComputeGlobalTimeStep ( void *  ) 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 109 of file itkGPUAnisotropicDiffusionFunction.h.

References itk::GPUAnisotropicDiffusionFunction< TImage >::GetTimeStep().

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

Set/Get the average gradient magnitude squared.

Definition at line 97 of file itkGPUAnisotropicDiffusionFunction.h.

References itk::GPUAnisotropicDiffusionFunction< TImage >::m_AverageGradientMagnitudeSquared.

template<typename TImage >
const double& itk::GPUAnisotropicDiffusionFunction< TImage >::GetConductanceParameter ( ) const
inline
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 116 of file itkGPUAnisotropicDiffusionFunction.h.

template<typename TImage >
virtual const char* itk::GPUAnisotropicDiffusionFunction< TImage >::GetNameOfClass ( ) const
virtual
template<typename TImage >
const TimeStepType& itk::GPUAnisotropicDiffusionFunction< TImage >::GetTimeStep ( ) const
inline
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.

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

Definition at line 137 of file itkGPUAnisotropicDiffusionFunction.h.

References itk::GPUAnisotropicDiffusionFunction< TImage >::m_ConductanceParameter, itk::GPUAnisotropicDiffusionFunction< TImage >::m_TimeStep, and itk::FiniteDifferenceFunction< TImage >::PrintSelf().

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

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

Implements itk::FiniteDifferenceFunction< TImage >.

Definition at line 122 of file itkGPUAnisotropicDiffusionFunction.h.

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

Set/Get the conductance parameter. The conductance parameter.

Definition at line 86 of file itkGPUAnisotropicDiffusionFunction.h.

References itk::GPUAnisotropicDiffusionFunction< TImage >::m_ConductanceParameter.

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 75 of file itkGPUAnisotropicDiffusionFunction.h.

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

Member Data Documentation

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

Inherit some parameters from the superclass type

Definition at line 63 of file itkGPUAnisotropicDiffusionFunction.h.

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

Definition at line 146 of file itkGPUAnisotropicDiffusionFunction.h.

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

Definition at line 147 of file itkGPUAnisotropicDiffusionFunction.h.

template<typename TImage >
double itk::GPUAnisotropicDiffusionFunction< TImage >::m_AverageGradientMagnitudeSquared
private
template<typename TImage >
int itk::GPUAnisotropicDiffusionFunction< TImage >::m_AverageGradientMagnitudeSquaredGPUKernelHandle
protected

Definition at line 150 of file itkGPUAnisotropicDiffusionFunction.h.

template<typename TImage >
double itk::GPUAnisotropicDiffusionFunction< TImage >::m_ConductanceParameter
private
template<typename TImage >
TimeStepType itk::GPUAnisotropicDiffusionFunction< TImage >::m_TimeStep
private

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