go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
itk::GPUImage< TPixel, VImageDimension > Class Template Reference

#include <itkGPUImage.h>

Detailed Description

template<typename TPixel, unsigned int VImageDimension = 2>
class itk::GPUImage< TPixel, VImageDimension >

Templated n-dimensional image class for the GPU.

Derived from itk Image class to use with GPU image filters. This class manages both CPU and GPU memory implicitly, and can be used with non-GPU itk filters as well. Memory transfer between CPU and GPU is done automatically and implicitly.

Note
This file was taken from ITK 4.1.0. It was modified by Denis P. Shamonin and Marius Staring. Division of Image Processing, Department of Radiology, Leiden, The Netherlands. Added functionality is described in the Insight Journal paper: http://hdl.handle.net/10380/3393

DataManager for GPUImage. This class will take care of data synchronization between CPU Image and GPU Image.

Note
This file was taken from ITK 4.1.0. It was modified by Denis P. Shamonin and Marius Staring. Division of Image Processing, Department of Radiology, Leiden, The Netherlands. Added functionality is described in the Insight Journal paper: http://hdl.handle.net/10380/3393

Definition at line 63 of file itkGPUImage.h.

Inheritance diagram for itk::GPUImage< TPixel, VImageDimension >:
Inheritance graph
[legend]

Data Structures

struct  Rebind
 

Public Types

using AccessorFunctorType = DefaultPixelAccessorFunctor< Self >
 
using ConstPointer = SmartPointer< const Self >
 
using ConstWeakPointer = WeakPointer< const Self >
 
using NeighborhoodAccessorFunctorType = NeighborhoodAccessorFunctor< Self >
 
using PixelContainerConstPointer = typename PixelContainer::ConstPointer
 
using PixelContainerPointer = typename PixelContainer::Pointer
 
using Pointer = SmartPointer< Self >
 
template<typename UPixelType , unsigned int VUImageDimension = VImageDimension>
using RebindImageType = itk::GPUImage< UPixelType, VUImageDimension >
 
using Self = GPUImage
 
using Superclass = Image< TPixel, VImageDimension >
 

Public Member Functions

void Allocate (bool initialize=false) override
 
void AllocateGPU ()
 
void DataHasBeenGenerated () override
 
void FillBuffer (const TPixel &value)
 
const TPixel * GetBufferPointer () const override
 
TPixel * GetBufferPointer () override
 
virtual const char * GetClassName () const
 
int GetCurrentCommandQueueId ()
 
GPUDataManager::Pointer GetGPUDataManager () const
 
virtual const DirectionType & GetIndexToPhysicalPoint ()
 
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor ()
 
const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor () const
 
virtual const DirectionType & GetPhysicalPointToIndex ()
 
TPixel & GetPixel (const IndexType &index)
 
const TPixel & GetPixel (const IndexType &index) const
 
AccessorType GetPixelAccessor ()
 
const AccessorType GetPixelAccessor () const
 
PixelContainer * GetPixelContainer ()
 
const PixelContainer * GetPixelContainer () const
 
void Graft (const DataObject *data) override
 
void GraftITKImage (const DataObject *data)
 
void Initialize () override
 
 ITK_DISALLOW_COPY_AND_MOVE (GPUImage)
 
 itkStaticConstMacro (ImageDimension, unsigned int, VImageDimension)
 
void Modified () const override
 
TPixel & operator[] (const IndexType &index)
 
const TPixel & operator[] (const IndexType &index) const
 
void SetCurrentCommandQueue (int queueid)
 
void SetPixel (const IndexType &index, const TPixel &value)
 
void SetPixelContainer (PixelContainer *container)
 
void UpdateBuffers ()
 
void UpdateCPUBuffer ()
 
void UpdateGPUBuffer ()
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 GPUImage ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~GPUImage () override=default
 

Private Attributes

GPUImageDataManager< GPUImage >::Pointer m_DataManager
 
bool m_Graft
 

Member Typedef Documentation

◆ AccessorFunctorType

template<typename TPixel , unsigned int VImageDimension = 2>
using itk::GPUImage< TPixel, VImageDimension >::AccessorFunctorType = DefaultPixelAccessorFunctor<Self>

Definition at line 95 of file itkGPUImage.h.

◆ ConstPointer

template<typename TPixel , unsigned int VImageDimension = 2>
using itk::GPUImage< TPixel, VImageDimension >::ConstPointer = SmartPointer<const Self>

Definition at line 71 of file itkGPUImage.h.

◆ ConstWeakPointer

template<typename TPixel , unsigned int VImageDimension = 2>
using itk::GPUImage< TPixel, VImageDimension >::ConstWeakPointer = WeakPointer<const Self>

Definition at line 72 of file itkGPUImage.h.

◆ NeighborhoodAccessorFunctorType

template<typename TPixel , unsigned int VImageDimension = 2>
using itk::GPUImage< TPixel, VImageDimension >::NeighborhoodAccessorFunctorType = NeighborhoodAccessorFunctor<Self>

Definition at line 97 of file itkGPUImage.h.

◆ PixelContainerConstPointer

template<typename TPixel , unsigned int VImageDimension = 2>
using itk::GPUImage< TPixel, VImageDimension >::PixelContainerConstPointer = typename PixelContainer::ConstPointer

Definition at line 92 of file itkGPUImage.h.

◆ PixelContainerPointer

template<typename TPixel , unsigned int VImageDimension = 2>
using itk::GPUImage< TPixel, VImageDimension >::PixelContainerPointer = typename PixelContainer::Pointer

Definition at line 91 of file itkGPUImage.h.

◆ Pointer

template<typename TPixel , unsigned int VImageDimension = 2>
using itk::GPUImage< TPixel, VImageDimension >::Pointer = SmartPointer<Self>

Definition at line 70 of file itkGPUImage.h.

◆ RebindImageType

template<typename TPixel , unsigned int VImageDimension = 2>
template<typename UPixelType , unsigned int VUImageDimension = VImageDimension>
using itk::GPUImage< TPixel, VImageDimension >::RebindImageType = itk::GPUImage<UPixelType, VUImageDimension>

Definition at line 107 of file itkGPUImage.h.

◆ Self

template<typename TPixel , unsigned int VImageDimension = 2>
using itk::GPUImage< TPixel, VImageDimension >::Self = GPUImage

Definition at line 68 of file itkGPUImage.h.

◆ Superclass

template<typename TPixel , unsigned int VImageDimension = 2>
using itk::GPUImage< TPixel, VImageDimension >::Superclass = Image<TPixel, VImageDimension>

Definition at line 69 of file itkGPUImage.h.

Constructor & Destructor Documentation

◆ GPUImage()

template<typename TPixel , unsigned int VImageDimension = 2>
itk::GPUImage< TPixel, VImageDimension >::GPUImage ( )
protected

◆ ~GPUImage()

template<typename TPixel , unsigned int VImageDimension = 2>
itk::GPUImage< TPixel, VImageDimension >::~GPUImage ( )
overrideprotecteddefault

Member Function Documentation

◆ Allocate()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::Allocate ( bool  initialize = false)
override

Allocate CPU and GPU memory space

◆ AllocateGPU()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::AllocateGPU ( )

◆ DataHasBeenGenerated()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::DataHasBeenGenerated ( )
inlineoverride

Override DataHasBeenGenerated() in DataObject class. We need this because CPU time stamp is always bigger than GPU's. That is because Modified() is called at the end of each filter in the pipeline so although we increment GPU's time stamp in GPUGenerateData() the CPU's time stamp will be increased after that.

Definition at line 235 of file itkGPUImage.h.

◆ FillBuffer()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::FillBuffer ( const TPixel &  value)

◆ GetBufferPointer() [1/2]

template<typename TPixel , unsigned int VImageDimension = 2>
const TPixel * itk::GPUImage< TPixel, VImageDimension >::GetBufferPointer ( ) const
override

◆ GetBufferPointer() [2/2]

template<typename TPixel , unsigned int VImageDimension = 2>
TPixel * itk::GPUImage< TPixel, VImageDimension >::GetBufferPointer ( )
override

Get CPU buffer pointer

◆ GetClassName()

template<typename TPixel , unsigned int VImageDimension = 2>
virtual const char * itk::GPUImage< TPixel, VImageDimension >::GetClassName ( ) const
virtual

◆ GetCurrentCommandQueueId()

template<typename TPixel , unsigned int VImageDimension = 2>
int itk::GPUImage< TPixel, VImageDimension >::GetCurrentCommandQueueId ( )
inline

Definition at line 218 of file itkGPUImage.h.

◆ GetGPUDataManager()

template<typename TPixel , unsigned int VImageDimension = 2>
GPUDataManager::Pointer itk::GPUImage< TPixel, VImageDimension >::GetGPUDataManager ( ) const

◆ GetIndexToPhysicalPoint()

template<typename TPixel , unsigned int VImageDimension = 2>
virtual const DirectionType & itk::GPUImage< TPixel, VImageDimension >::GetIndexToPhysicalPoint ( )
virtual

Get matrices intended to help with the conversion of Index coordinates to PhysicalPoint coordinates

◆ GetNeighborhoodAccessor() [1/2]

template<typename TPixel , unsigned int VImageDimension = 2>
NeighborhoodAccessorFunctorType itk::GPUImage< TPixel, VImageDimension >::GetNeighborhoodAccessor ( )
inline

Return the NeighborhoodAccessor functor

Definition at line 174 of file itkGPUImage.h.

◆ GetNeighborhoodAccessor() [2/2]

template<typename TPixel , unsigned int VImageDimension = 2>
const NeighborhoodAccessorFunctorType itk::GPUImage< TPixel, VImageDimension >::GetNeighborhoodAccessor ( ) const
inline

Return the NeighborhoodAccessor functor

Definition at line 183 of file itkGPUImage.h.

◆ GetPhysicalPointToIndex()

template<typename TPixel , unsigned int VImageDimension = 2>
virtual const DirectionType & itk::GPUImage< TPixel, VImageDimension >::GetPhysicalPointToIndex ( )
virtual

◆ GetPixel() [1/2]

template<typename TPixel , unsigned int VImageDimension = 2>
TPixel & itk::GPUImage< TPixel, VImageDimension >::GetPixel ( const IndexType &  index)

◆ GetPixel() [2/2]

template<typename TPixel , unsigned int VImageDimension = 2>
const TPixel & itk::GPUImage< TPixel, VImageDimension >::GetPixel ( const IndexType &  index) const

◆ GetPixelAccessor() [1/2]

template<typename TPixel , unsigned int VImageDimension = 2>
AccessorType itk::GPUImage< TPixel, VImageDimension >::GetPixelAccessor ( )
inline

Return the Pixel Accessor object

Definition at line 156 of file itkGPUImage.h.

◆ GetPixelAccessor() [2/2]

template<typename TPixel , unsigned int VImageDimension = 2>
const AccessorType itk::GPUImage< TPixel, VImageDimension >::GetPixelAccessor ( ) const
inline

Return the Pixel Accesor object

Definition at line 165 of file itkGPUImage.h.

◆ GetPixelContainer() [1/2]

template<typename TPixel , unsigned int VImageDimension = 2>
PixelContainer * itk::GPUImage< TPixel, VImageDimension >::GetPixelContainer ( )
inline

Return a pointer to the container.

Definition at line 195 of file itkGPUImage.h.

◆ GetPixelContainer() [2/2]

template<typename TPixel , unsigned int VImageDimension = 2>
const PixelContainer * itk::GPUImage< TPixel, VImageDimension >::GetPixelContainer ( ) const
inline

Definition at line 203 of file itkGPUImage.h.

◆ Graft()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::Graft ( const DataObject *  data)
override

Graft the data and information from one GPUImage to another.

◆ GraftITKImage()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::GraftITKImage ( const DataObject *  data)

◆ Initialize()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::Initialize ( )
override

◆ ITK_DISALLOW_COPY_AND_MOVE()

template<typename TPixel , unsigned int VImageDimension = 2>
itk::GPUImage< TPixel, VImageDimension >::ITK_DISALLOW_COPY_AND_MOVE ( GPUImage< TPixel, VImageDimension >  )

◆ itkStaticConstMacro()

template<typename TPixel , unsigned int VImageDimension = 2>
itk::GPUImage< TPixel, VImageDimension >::itkStaticConstMacro ( ImageDimension  ,
unsigned int  ,
VImageDimension   
)

◆ Modified()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::Modified ( ) const
override

Whenever the image has been modified, set the GPU Buffer to dirty

◆ New()

template<typename TPixel , unsigned int VImageDimension = 2>
static Pointer itk::GPUImage< TPixel, VImageDimension >::New ( )
static

◆ operator[]() [1/2]

template<typename TPixel , unsigned int VImageDimension = 2>
TPixel & itk::GPUImage< TPixel, VImageDimension >::operator[] ( const IndexType &  index)

◆ operator[]() [2/2]

template<typename TPixel , unsigned int VImageDimension = 2>
const TPixel & itk::GPUImage< TPixel, VImageDimension >::operator[] ( const IndexType &  index) const

◆ PrintSelf()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotected

◆ SetCurrentCommandQueue()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::SetCurrentCommandQueue ( int  queueid)
inline

Definition at line 211 of file itkGPUImage.h.

◆ SetPixel()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::SetPixel ( const IndexType &  index,
const TPixel &  value 
)

◆ SetPixelContainer()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::SetPixelContainer ( PixelContainer *  container)

◆ UpdateBuffers()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::UpdateBuffers ( )

Explicit synchronize CPU/GPU buffers

◆ UpdateCPUBuffer()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::UpdateCPUBuffer ( )

Explicit synchronize CPU/GPU buffers

◆ UpdateGPUBuffer()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::UpdateGPUBuffer ( )

Field Documentation

◆ m_DataManager

template<typename TPixel , unsigned int VImageDimension = 2>
GPUImageDataManager<GPUImage>::Pointer itk::GPUImage< TPixel, VImageDimension >::m_DataManager
private

Definition at line 272 of file itkGPUImage.h.

◆ m_Graft

template<typename TPixel , unsigned int VImageDimension = 2>
bool itk::GPUImage< TPixel, VImageDimension >::m_Graft
private

Definition at line 270 of file itkGPUImage.h.



Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo