ITK  4.9.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | 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

typedef SmartPointer< const SelfConstPointer
 
typedef TParentImageFilter CPUSuperclass
 
typedef
GPUSuperclass::FiniteDifferenceFunctionType 
FiniteDifferenceFunctionType
 
typedef
GPUFiniteDifferenceImageFilter
< TInputImage, TOutputImage,
TParentImageFilter > 
GPUSuperclass
 
typedef
GPUSuperclass::InputImageType 
InputImageType
 
typedef
GPUSuperclass::OutputImageType 
OutputImageType
 
typedef GPUSuperclass::PixelType PixelType
 
typedef SmartPointer< SelfPointer
 
typedef
GPUDenseFiniteDifferenceImageFilter 
Self
 
typedef GPUSuperclass::TimeStepType TimeStepType
 
typedef OutputImageType UpdateBufferType
 
- Public Types inherited from itk::GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
typedef SmartPointer< const SelfConstPointer
 
typedef TParentImageFilter CPUSuperclass
 
enum  FilterStateType {
  UNINITIALIZED = 0,
  INITIALIZED = 1
}
 
typedef
GPUFiniteDifferenceFunction
< TOutputImage >
::DifferenceFunctionType 
FiniteDifferenceFunctionType
 
typedef GPUInPlaceImageFilter
< TInputImage, TOutputImage,
TParentImageFilter > 
GPUSuperclass
 
typedef TInputImage InputImageType
 
typedef TInputImage::PixelType InputPixelType
 
typedef NumericTraits
< InputPixelType >::ValueType 
InputPixelValueType
 
typedef
FiniteDifferenceFunctionType::NeighborhoodScalesType 
NeighborhoodScalesType
 
typedef TOutputImage OutputImageType
 
typedef TOutputImage::PixelType OutputPixelType
 
typedef NumericTraits
< OutputPixelType >::ValueType 
OutputPixelValueType
 
typedef OutputPixelType PixelType
 
typedef SmartPointer< SelfPointer
 
typedef
FiniteDifferenceFunctionType::RadiusType 
RadiusType
 
typedef
GPUFiniteDifferenceImageFilter 
Self
 
typedef
FiniteDifferenceFunctionType::TimeStepType 
TimeStepType
 
- Public Types inherited from itk::GPUInPlaceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
typedef SmartPointer< const SelfConstPointer
 
typedef TParentImageFilter CPUSuperclass
 
typedef GPUImageToImageFilter
< TInputImage, TOutputImage,
TParentImageFilter > 
GPUSuperclass
 
typedef
InputImageType::ConstPointer 
InputImageConstPointer
 
typedef InputImageType::PixelType InputImagePixelType
 
typedef InputImageType::Pointer InputImagePointer
 
typedef InputImageType::RegionType InputImageRegionType
 
typedef TInputImage InputImageType
 
typedef
GPUSuperclass::OutputImagePixelType 
OutputImagePixelType
 
typedef
GPUSuperclass::OutputImagePointer 
OutputImagePointer
 
typedef
GPUSuperclass::OutputImageRegionType 
OutputImageRegionType
 
typedef
GPUSuperclass::OutputImageType 
OutputImageType
 
typedef SmartPointer< SelfPointer
 
typedef GPUInPlaceImageFilter Self
 
- Public Types inherited from itk::GPUImageToImageFilter< TInputImage, TOutputImage, TParentImageFilter >
typedef SmartPointer< const SelfConstPointer
 
typedef
Superclass::DataObjectIdentifierType 
DataObjectIdentifierType
 
typedef
InputImageType::ConstPointer 
InputImageConstPointer
 
typedef InputImageType::PixelType InputImagePixelType
 
typedef InputImageType::Pointer InputImagePointer
 
typedef InputImageType::RegionType InputImageRegionType
 
typedef TInputImage InputImageType
 
typedef
Superclass::OutputImagePixelType 
OutputImagePixelType
 
typedef
Superclass::OutputImageRegionType 
OutputImageRegionType
 
typedef SmartPointer< SelfPointer
 
typedef GPUImageToImageFilter Self
 
typedef TParentImageFilter Superclass
 

Public Member Functions

virtual const char * GetNameOfClass () const
 
 itkGetOpenCLSourceFromKernelMacro (GPUDenseFiniteDifferenceImageFilterKernel)
 
 typedef (Concept::MultiplyOperator< PixelType, double >) OutputTimesDoubleCheck
 
 typedef (Concept::AdditiveOperators< PixelType >) OutputAdditiveOperatorsCheck
 
 typedef (Concept::Convertible< typename TInputImage::PixelType, PixelType >) InputConvertibleToOutputCheck
 
- Public Member Functions inherited from itk::GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
virtual const
FiniteDifferenceFunctionType::Pointer
GetDifferenceFunction () const override
 
void SetStateToInitialized ()
 
void SetStateToUninitialized ()
 
virtual 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 (DataObject *output) override
 
virtual void GraftOutput (const DataObjectIdentifierType &key, DataObject *output) override
 
virtual void SetGPUEnabled (bool _arg)
 

Static Public Attributes

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

Protected Member Functions

virtual void AllocateUpdateBuffer () override
 
virtual void ApplyUpdate (const TimeStepType &dt) override
 
virtual void CopyInputToOutput () override
 
virtual UpdateBufferTypeGetUpdateBuffer () override
 
virtual void GPUApplyUpdate (const TimeStepType &dt) override
 
virtual TimeStepType GPUCalculateChange () override
 
 GPUDenseFiniteDifferenceImageFilter ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~GPUDenseFiniteDifferenceImageFilter ()
 
- Protected Member Functions inherited from itk::GPUFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
virtual void GenerateInputRequestedRegion () override
 
virtual void GPUApplyUpdate (const TimeStepType &dt)=0
 
 GPUFiniteDifferenceImageFilter ()
 
virtual void GPUGenerateData () override
 
virtual bool Halt () override
 
virtual void Initialize () override
 
virtual void InitializeIteration () override
 
virtual 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
 
virtual bool ThreadedHalt (void *) override
 
 ~GPUFiniteDifferenceImageFilter ()
 
- Protected Member Functions inherited from itk::GPUInPlaceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
virtual void AllocateOutputs () override
 
 GPUInPlaceImageFilter ()
 
virtual void ReleaseInputs () override
 
 ~GPUInPlaceImageFilter ()
 
- Protected Member Functions inherited from itk::GPUImageToImageFilter< TInputImage, TOutputImage, TParentImageFilter >
 GPUImageToImageFilter ()
 
 ~GPUImageToImageFilter ()
 

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
 

Private Member Functions

 GPUDenseFiniteDifferenceImageFilter (const Self &) ITK_DELETE_FUNCTION
 
void operator= (const Self &) ITK_DELETE_FUNCTION
 

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 >>
typedef SmartPointer< const Self > itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::ConstPointer

Definition at line 64 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

Definition at line 62 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

Definition at line 72 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

Definition at line 61 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

Convenient typedefs

Definition at line 67 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

Definition at line 71 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

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

Definition at line 80 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

Definition at line 63 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

Standard class typedefs

Definition at line 60 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

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

Definition at line 83 of file itkGPUDenseFiniteDifferenceImageFilter.h.

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

The container type for the update buffer.

Definition at line 86 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 ( )
inlineprotected

Definition at line 104 of file itkGPUDenseFiniteDifferenceImageFilter.h.

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >>
itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::GPUDenseFiniteDifferenceImageFilter ( const Self )
private

Member Function Documentation

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

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.

Reimplemented in itk::GPUDemonsRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField, TParentImageFilter >.

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >>
virtual 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 >.

Reimplemented in itk::GPUPDEDeformableRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField, 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 >>
virtual UpdateBufferType* itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::GetUpdateBuffer ( )
inlineoverrideprotectedvirtual

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 >>
virtual void itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::GPUApplyUpdate ( const TimeStepType dt)
overrideprotectedvirtual
template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >>
virtual 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 >::operator= ( const Self )
private
template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >>
void itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual
template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >>
itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::typedef ( Concept::MultiplyOperator< PixelType, double >  )

This class requires OutputTimesDoubleCheck in the form of ( Concept::MultiplyOperator< PixelType, double > )

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >>
itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::typedef ( Concept::AdditiveOperators< PixelType )

This class requires OutputAdditiveOperatorsCheck in the form of ( Concept::AdditiveOperators< PixelType > )

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >>
itk::GPUDenseFiniteDifferenceImageFilter< TInputImage, TOutputImage, TParentImageFilter >::typedef ( Concept::Convertible< typename TInputImage::PixelType, PixelType )

This class requires InputConvertibleToOutputCheck in the form of ( Concept::Convertible< typename TInputImage::PixelType, PixelType > )

Member Data Documentation

template<typename TInputImage, typename TOutputImage, typename TParentImageFilter = DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >>
const 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 76 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: