ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter > Class Template Reference

#include <itkGPUDenseFiniteDifferenceImageFilter.h>

Detailed Description

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
class itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >

This is the GPU version of DenseFiniteDifferenceImageFilter class. Currently only single-threaded, single GPU version is implemented. See documentation for FiniteDifferenceImageFilter for an overview of the iterative finite difference algorithm:

\(u_{\mathbf{i}}^{n+1}=u^n_{\mathbf{i}}+\Delta u^n_{\mathbf{i}}\Delta t\)
This class defines an update buffer for \( \Delta \) and the methods GPUCalculateChange() and GPUApplyUpdate(), which are GPU version of CalculateChange() and ApplyUpdate().

Use m_UpdateBuffer defined in CPU superclass (DenseFiniteDifferenceImageFilter).

How to use this class
This filter can be used as a base class for GPU implementation of DenseFiniteDifferenceImageFilter.

Definition at line 55 of file itkGPUDenseFiniteDifferenceImageFilter.h.

+ Inheritance diagram for itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >:
+ Collaboration diagram for itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using CPUSuperclass = TParentImageFilter
 
using FiniteDifferenceFunctionType = typename GPUSuperclass::FiniteDifferenceFunctionType
 
using GPUSuperclass = GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
 
using InputImageType = typename GPUSuperclass::InputImageType
 
using OutputImageType = typename GPUSuperclass::OutputImageType
 
using PixelType = typename GPUSuperclass::PixelType
 
using Pointer = SmartPointer< Self >
 
using Self = GPUDenseFiniteDifferenceImageFilter
 
using TimeStepType = typename GPUSuperclass::TimeStepType
 
using UpdateBufferType = OutputImageType
 
- Public Types inherited from itk::GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
using ConstPointer = SmartPointer< const Self >
 
using CPUSuperclass = TParentImageFilter
 
using FiniteDifferenceFunctionType = typename GPUFiniteDifferenceFunction< TOutputImage >::DifferenceFunctionType
 
using GPUSuperclass = GPUInPlaceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
 
using InputImageType = TInputImage
 
using InputPixelType = typename TInputImage::PixelType
 
using InputPixelValueType = typename NumericTraits< InputPixelType >::ValueType
 
using NeighborhoodScalesType = typename FiniteDifferenceFunctionType::NeighborhoodScalesType
 
using OutputImageType = TOutputImage
 
using OutputPixelType = typename TOutputImage::PixelType
 
using OutputPixelValueType = typename NumericTraits< OutputPixelType >::ValueType
 
using PixelType = OutputPixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename FiniteDifferenceFunctionType::RadiusType
 
using Self = GPUFiniteDifferenceImageFilter
 
using TimeStepType = typename FiniteDifferenceFunctionType::TimeStepType
 
- Public Types inherited from itk::GPUInPlaceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
using ConstPointer = SmartPointer< const Self >
 
using CPUSuperclass = TParentImageFilter
 
using GPUSuperclass = GPUImageToImageFilter< TInputImage, TOutputImage, TParentImageFilter >
 
using InputImageConstPointer = typename InputImageType::ConstPointer
 
using InputImagePixelType = typename InputImageType::PixelType
 
using InputImagePointer = typename InputImageType::Pointer
 
using InputImageRegionType = typename InputImageType::RegionType
 
using InputImageType = TInputImage
 
using OutputImagePixelType = typename GPUSuperclass::OutputImagePixelType
 
using OutputImagePointer = typename GPUSuperclass::OutputImagePointer
 
using OutputImageRegionType = typename GPUSuperclass::OutputImageRegionType
 
using OutputImageType = typename GPUSuperclass::OutputImageType
 
using Pointer = SmartPointer< Self >
 
using Self = GPUInPlaceImageFilter
 
- Public Types inherited from itk::GPUImageToImageFilter< TInputImage, TOutputImage, TParentImageFilter >
using ConstPointer = SmartPointer< const Self >
 
using InputImageConstPointer = typename InputImageType::ConstPointer
 
using InputImagePixelType = typename InputImageType::PixelType
 
using InputImagePointer = typename InputImageType::Pointer
 
using InputImageRegionType = typename InputImageType::RegionType
 
using InputImageType = TInputImage
 
using Pointer = SmartPointer< Self >
 
using Self = GPUImageToImageFilter
 
using Superclass = TParentImageFilter
 

Public Member Functions

const char * GetNameOfClass () const override
 
 itkGetOpenCLSourceFromKernelMacro (GPUDenseFiniteDifferenceImageFilterKernel)
 
- Public Member Functions inherited from itk::GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
const FiniteDifferenceFunctionType::PointerGetDifferenceFunction () const override
 
const char * GetNameOfClass () const override
 
void SetStateToInitialized ()
 
void SetStateToUninitialized ()
 
void SetDifferenceFunction (FiniteDifferenceFunctionType *differenceFunction) override
 
virtual void SetState (GPUFiniteDifferenceFilterEnum _arg)
 
virtual const GPUFiniteDifferenceFilterEnumGetState () const
 
virtual const TimeProbeGetInitTime () const
 
virtual const TimeProbeGetComputeUpdateTime () const
 
virtual const TimeProbeGetApplyUpdateTime () const
 
virtual const TimeProbeGetSmoothFieldTime () const
 
- Public Member Functions inherited from itk::GPUInPlaceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
const char * GetNameOfClass () const override
 
- Public Member Functions inherited from itk::GPUImageToImageFilter< TInputImage, TOutputImage, TParentImageFilter >
void GenerateData () override
 
virtual bool GetGPUEnabled () const
 
const char * GetNameOfClass () const override
 
virtual void GPUEnabledOn ()
 
virtual void GraftOutput (const DataObjectIdentifierType &key, typename itk::GPUTraits< TOutputImage >::Type *output)
 
virtual void GraftOutput (typename itk::GPUTraits< TOutputImage >::Type *output)
 
virtual void SetGPUEnabled (bool _arg)
 

Static Public Attributes

static constexpr unsigned int ImageDimension = GPUSuperclass::ImageDimension
 
- Static Public Attributes inherited from itk::GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
static constexpr unsigned int ImageDimension = OutputImageType::ImageDimension
 
- Static Public Attributes inherited from itk::GPUInPlaceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension
 
static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension
 
- Static Public Attributes inherited from itk::GPUImageToImageFilter< TInputImage, TOutputImage, TParentImageFilter >
static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension
 
static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension
 

Protected Member Functions

void AllocateUpdateBuffer () override
 
void ApplyUpdate (const TimeStepType &dt) override
 
void CopyInputToOutput () override
 
UpdateBufferTypeGetUpdateBuffer () override
 
void GPUApplyUpdate (const TimeStepType &dt) override
 
TimeStepType GPUCalculateChange () override
 
 GPUDenseFiniteDifferenceImageFilter ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~GPUDenseFiniteDifferenceImageFilter () override=default
 
- Protected Member Functions inherited from itk::GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
void GenerateInputRequestedRegion () override
 
virtual void GPUApplyUpdate (const TimeStepType &dt)=0
 
 GPUFiniteDifferenceImageFilter ()
 
void GPUGenerateData () override
 
bool Halt () override
 
void Initialize () override
 
void InitializeIteration () override
 
void PostProcessOutput () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
TimeStepType ResolveTimeStep (const std::vector< TimeStepType > &timeStepList, const BooleanStdVectorType &valid) const override
 
bool ThreadedHalt (void *) override
 
 ~GPUFiniteDifferenceImageFilter () override
 
- Protected Member Functions inherited from itk::GPUInPlaceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
void AllocateOutputs () override
 
 GPUInPlaceImageFilter ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~GPUInPlaceImageFilter () override
 
void ReleaseInputs () override
 
- Protected Member Functions inherited from itk::GPUImageToImageFilter< TInputImage, TOutputImage, TParentImageFilter >
 GPUImageToImageFilter ()
 
void GraftOutput (const DataObjectIdentifierType &key, DataObject *output) override
 
void GraftOutput (DataObject *output) override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~GPUImageToImageFilter () override
 

Protected Attributes

int m_ApplyUpdateGPUKernelHandle {}
 
- Protected Attributes inherited from itk::GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
TimeProbe m_ApplyUpdateTime
 
TimeProbe m_ComputeUpdateTime
 
TimeProbe m_InitTime
 
TimeProbe m_SmoothFieldTime {}
 
- Protected Attributes inherited from itk::GPUImageToImageFilter< TInputImage, TOutputImage, TParentImageFilter >
GPUKernelManager::Pointer m_GPUKernelManager {}
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::GPUImageToImageFilter< TInputImage, TOutputImage, TParentImageFilter >
static Pointer New ()
 

Member Typedef Documentation

◆ ConstPointer

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
using itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::ConstPointer = SmartPointer<const Self>

Definition at line 66 of file itkGPUDenseFiniteDifferenceImageFilter.h.

◆ CPUSuperclass

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
using itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::CPUSuperclass = TParentImageFilter

Definition at line 64 of file itkGPUDenseFiniteDifferenceImageFilter.h.

◆ FiniteDifferenceFunctionType

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
using itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::FiniteDifferenceFunctionType = typename GPUSuperclass::FiniteDifferenceFunctionType

Definition at line 74 of file itkGPUDenseFiniteDifferenceImageFilter.h.

◆ GPUSuperclass

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
using itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::GPUSuperclass = GPUFiniteDifferenceImageFilter<TInputImage, TOutputImage, TParentImageFilter>

Definition at line 63 of file itkGPUDenseFiniteDifferenceImageFilter.h.

◆ InputImageType

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
using itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::InputImageType = typename GPUSuperclass::InputImageType

Convenient type alias

Definition at line 72 of file itkGPUDenseFiniteDifferenceImageFilter.h.

◆ OutputImageType

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
using itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::OutputImageType = typename GPUSuperclass::OutputImageType

Definition at line 73 of file itkGPUDenseFiniteDifferenceImageFilter.h.

◆ PixelType

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
using itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::PixelType = typename GPUSuperclass::PixelType

The pixel type of the output image will be used in computations. Inherited from the superclass.

Definition at line 82 of file itkGPUDenseFiniteDifferenceImageFilter.h.

◆ Pointer

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
using itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::Pointer = SmartPointer<Self>

Definition at line 65 of file itkGPUDenseFiniteDifferenceImageFilter.h.

◆ Self

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
using itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::Self = GPUDenseFiniteDifferenceImageFilter

Standard class type aliases

Definition at line 62 of file itkGPUDenseFiniteDifferenceImageFilter.h.

◆ TimeStepType

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
using itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::TimeStepType = typename GPUSuperclass::TimeStepType

The value type of a time step. Inherited from the superclass.

Definition at line 85 of file itkGPUDenseFiniteDifferenceImageFilter.h.

◆ UpdateBufferType

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
using itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::UpdateBufferType = OutputImageType

The container type for the update buffer.

Definition at line 88 of file itkGPUDenseFiniteDifferenceImageFilter.h.

Constructor & Destructor Documentation

◆ GPUDenseFiniteDifferenceImageFilter()

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::GPUDenseFiniteDifferenceImageFilter ( )
protected

◆ ~GPUDenseFiniteDifferenceImageFilter()

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::~GPUDenseFiniteDifferenceImageFilter ( )
overrideprotecteddefault

Member Function Documentation

◆ AllocateUpdateBuffer()

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
void itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::AllocateUpdateBuffer ( )
overrideprotectedvirtual

This method allocates storage in m_UpdateBuffer. It is called from Superclass::GenerateData().

Implements itk::GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >.

◆ ApplyUpdate()

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
void itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::ApplyUpdate ( const TimeStepType dt)
overrideprotected

This method applies changes from the m_UpdateBuffer to the output using the GPU. "dt" is the time step to use for the update of each pixel.

◆ CopyInputToOutput()

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
void itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::CopyInputToOutput ( )
overrideprotectedvirtual

A simple method to copy the data from the input to the output. ( Supports "read-only" image adaptors in the case where the input image type converts to a different output image type. )

Implements itk::GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >.

◆ GetNameOfClass()

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
const char* itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::GetNameOfClass ( ) const
override

◆ GetUpdateBuffer()

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
UpdateBufferType* itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::GetUpdateBuffer ( )
inlineoverrideprotected

Method to allow subclasses to get direct access to the update buffer

Definition at line 129 of file itkGPUDenseFiniteDifferenceImageFilter.h.

◆ GPUApplyUpdate()

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
void itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::GPUApplyUpdate ( const TimeStepType dt)
overrideprotected

◆ GPUCalculateChange()

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
TimeStepType itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::GPUCalculateChange ( )
overrideprotectedvirtual

This method populates an update buffer with changes for each pixel in the output using the GPU. Returns value is a time step to be used for the update.

Implements itk::GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >.

◆ itkGetOpenCLSourceFromKernelMacro()

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::itkGetOpenCLSourceFromKernelMacro ( GPUDenseFiniteDifferenceImageFilterKernel  )

Get OpenCL Kernel source as a string, creates a GetOpenCLSource method

◆ PrintSelf()

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
void itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotected

Member Data Documentation

◆ ImageDimension

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
constexpr unsigned int itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::ImageDimension = GPUSuperclass::ImageDimension
staticconstexpr

Dimensionality of input and output data is assumed to be the same. It is inherited from the superclass.

Definition at line 78 of file itkGPUDenseFiniteDifferenceImageFilter.h.

◆ m_ApplyUpdateGPUKernelHandle

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>>
int itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::m_ApplyUpdateGPUKernelHandle {}
protected

Definition at line 140 of file itkGPUDenseFiniteDifferenceImageFilter.h.


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