ITK  5.0.0
Insight Segmentation and Registration 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>

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

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 54 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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
 
enum  FilterStateType {
  UNINITIALIZED = 0,
  INITIALIZED = 1
}
 
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 DataObjectIdentifierType = typename Superclass::DataObjectIdentifierType
 
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 Superclass::OutputImagePixelType
 
using OutputImageRegionType = typename Superclass::OutputImageRegionType
 
using Pointer = SmartPointer< Self >
 
using Self = GPUImageToImageFilter
 
using Superclass = TParentImageFilter
 

Public Member Functions

virtual const char * GetNameOfClass () const
 
 itkGetOpenCLSourceFromKernelMacro (GPUDenseFiniteDifferenceImageFilterKernel)
 
- Public Member Functions inherited from itk::GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
const
FiniteDifferenceFunctionType::Pointer & 
GetDifferenceFunction () const override
 
void SetStateToInitialized ()
 
void SetStateToUninitialized ()
 
void SetDifferenceFunction (FiniteDifferenceFunctionType *differenceFunction) override
 
virtual void SetState (FilterStateType _arg)
 
virtual const FilterStateTypeGetState () const
 
virtual const TimeProbeGetInitTime () const
 
virtual const TimeProbeGetComputeUpdateTime () const
 
virtual const TimeProbeGetApplyUpdateTime () const
 
virtual const TimeProbeGetSmoothFieldTime () const
 
- Public Member Functions inherited from itk::GPUImageToImageFilter< TInputImage, TOutputImage, TParentImageFilter >
virtual ::itk::LightObject::Pointer CreateAnother () const
 
void GenerateData () override
 
virtual bool GetGPUEnabled () const
 
virtual void GPUEnabledOff ()
 
virtual void GPUEnabledOn ()
 
virtual void GraftOutput (typename itk::GPUTraits< TOutputImage >::Type *output)
 
virtual void GraftOutput (const DataObjectIdentifierType &key, 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
 
- 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
 
virtual TimeStepType ResolveTimeStep (const std::vector< TimeStepType > &timeStepList, const std::vector< bool > &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 (DataObject *output) override
 
void GraftOutput (const DataObjectIdentifierType &key, 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
 
bool m_ManualReinitialization
 
double m_MaximumRMSError
 
double m_RMSChange
 
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

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

Definition at line 65 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

Definition at line 63 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

Definition at line 73 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

Definition at line 62 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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 71 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

Definition at line 72 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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 81 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

Definition at line 64 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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 61 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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 84 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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 87 of file itkGPUDenseFiniteDifferenceImageFilter.h.

Constructor & Destructor Documentation

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

Definition at line 105 of file itkGPUDenseFiniteDifferenceImageFilter.h.

Member Function Documentation

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

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.

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

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >>
virtual const char* itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::GetNameOfClass ( ) const
virtual
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 125 of file itkGPUDenseFiniteDifferenceImageFilter.h.

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >>
void itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::GPUApplyUpdate ( const TimeStepType dt)
overrideprotected
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 >.

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

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

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

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

Definition at line 77 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

Definition at line 134 of file itkGPUDenseFiniteDifferenceImageFilter.h.


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