go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private 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 >:

Public Types

typedef DefaultPixelAccessorFunctor< SelfAccessorFunctorType
 
typedef Superclass::AccessorType AccessorType
 
typedef SmartPointer< const SelfConstPointer
 
typedef WeakPointer< const SelfConstWeakPointer
 
typedef Superclass::DirectionType DirectionType
 
typedef Superclass::IndexType IndexType
 
typedef Superclass::InternalPixelType InternalPixelType
 
typedef Superclass::IOPixelType IOPixelType
 
typedef NeighborhoodAccessorFunctor< SelfNeighborhoodAccessorFunctorType
 
typedef Superclass::OffsetType OffsetType
 
typedef Superclass::PixelContainer PixelContainer
 
typedef PixelContainer::ConstPointer PixelContainerConstPointer
 
typedef PixelContainer::Pointer PixelContainerPointer
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::RegionType RegionType
 
typedef GPUImage Self
 
typedef Superclass::SizeType SizeType
 
typedef Superclass::SpacingType SpacingType
 
typedef Image< TPixel, VImageDimension > Superclass
 
typedef Superclass::ValueType ValueType
 

Public Member Functions

void Allocate (bool initialize=false) override
 
void AllocateGPU (void)
 
void DataHasBeenGenerated (void)
 
void FillBuffer (const TPixel &value)
 
TPixel * GetBufferPointer (void)
 
const TPixel * GetBufferPointer (void) const
 
virtual const char * GetClassName () const
 
int GetCurrentCommandQueueId (void)
 
GPUDataManager::Pointer GetGPUDataManager (void) const
 
virtual const DirectionTypeGetIndexToPhysicalPoint ()
 
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor (void)
 
const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor (void) const
 
virtual const DirectionTypeGetPhysicalPointToIndex ()
 
TPixel & GetPixel (const IndexType &index)
 
const TPixel & GetPixel (const IndexType &index) const
 
AccessorType GetPixelAccessor (void)
 
const AccessorType GetPixelAccessor (void) const
 
PixelContainerGetPixelContainer (void)
 
const PixelContainerGetPixelContainer (void) const
 
virtual void Graft (const DataObject *data)
 
void GraftITKImage (const DataObject *data)
 
virtual void Initialize (void)
 
 itkStaticConstMacro (ImageDimension, unsigned int, VImageDimension)
 
virtual void Modified (void) const
 
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)
 
void UpdateCPUBuffer (void)
 
void UpdateGPUBuffer (void)
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 GPUImage ()
 
virtual void PrintSelf (std::ostream &os, Indent indent) const
 
virtual ~GPUImage ()
 

Private Member Functions

 GPUImage (const Self &)
 
void operator= (const Self &)
 

Private Attributes

GPUImageDataManager< GPUImage >::Pointer m_DataManager
 
bool m_Graft
 

Member Typedef Documentation

◆ AccessorFunctorType

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

Definition at line 94 of file itkGPUImage.h.

◆ AccessorType

template<typename TPixel , unsigned int VImageDimension = 2>
typedef Superclass::AccessorType itk::GPUImage< TPixel, VImageDimension >::AccessorType

Definition at line 92 of file itkGPUImage.h.

◆ ConstPointer

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

Definition at line 70 of file itkGPUImage.h.

◆ ConstWeakPointer

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

Definition at line 71 of file itkGPUImage.h.

◆ DirectionType

template<typename TPixel , unsigned int VImageDimension = 2>
typedef Superclass::DirectionType itk::GPUImage< TPixel, VImageDimension >::DirectionType

Definition at line 83 of file itkGPUImage.h.

◆ IndexType

template<typename TPixel , unsigned int VImageDimension = 2>
typedef Superclass::IndexType itk::GPUImage< TPixel, VImageDimension >::IndexType

Definition at line 87 of file itkGPUImage.h.

◆ InternalPixelType

template<typename TPixel , unsigned int VImageDimension = 2>
typedef Superclass::InternalPixelType itk::GPUImage< TPixel, VImageDimension >::InternalPixelType

Definition at line 81 of file itkGPUImage.h.

◆ IOPixelType

template<typename TPixel , unsigned int VImageDimension = 2>
typedef Superclass::IOPixelType itk::GPUImage< TPixel, VImageDimension >::IOPixelType

Definition at line 82 of file itkGPUImage.h.

◆ NeighborhoodAccessorFunctorType

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

Definition at line 96 of file itkGPUImage.h.

◆ OffsetType

template<typename TPixel , unsigned int VImageDimension = 2>
typedef Superclass::OffsetType itk::GPUImage< TPixel, VImageDimension >::OffsetType

Definition at line 88 of file itkGPUImage.h.

◆ PixelContainer

template<typename TPixel , unsigned int VImageDimension = 2>
typedef Superclass::PixelContainer itk::GPUImage< TPixel, VImageDimension >::PixelContainer

Definition at line 85 of file itkGPUImage.h.

◆ PixelContainerConstPointer

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

Definition at line 91 of file itkGPUImage.h.

◆ PixelContainerPointer

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

Definition at line 90 of file itkGPUImage.h.

◆ Pointer

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

Definition at line 69 of file itkGPUImage.h.

◆ RegionType

template<typename TPixel , unsigned int VImageDimension = 2>
typedef Superclass::RegionType itk::GPUImage< TPixel, VImageDimension >::RegionType

Definition at line 89 of file itkGPUImage.h.

◆ Self

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

Definition at line 67 of file itkGPUImage.h.

◆ SizeType

template<typename TPixel , unsigned int VImageDimension = 2>
typedef Superclass::SizeType itk::GPUImage< TPixel, VImageDimension >::SizeType

Definition at line 86 of file itkGPUImage.h.

◆ SpacingType

template<typename TPixel , unsigned int VImageDimension = 2>
typedef Superclass::SpacingType itk::GPUImage< TPixel, VImageDimension >::SpacingType

Definition at line 84 of file itkGPUImage.h.

◆ Superclass

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

Definition at line 68 of file itkGPUImage.h.

◆ ValueType

template<typename TPixel , unsigned int VImageDimension = 2>
typedef Superclass::ValueType itk::GPUImage< TPixel, VImageDimension >::ValueType

Definition at line 80 of file itkGPUImage.h.

Constructor & Destructor Documentation

◆ GPUImage() [1/2]

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

◆ ~GPUImage()

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

Definition at line 227 of file itkGPUImage.h.

◆ GPUImage() [2/2]

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

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 ( void  )

◆ DataHasBeenGenerated()

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

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 199 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>
TPixel * itk::GPUImage< TPixel, VImageDimension >::GetBufferPointer ( void  )

Get CPU buffer pointer

◆ GetBufferPointer() [2/2]

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

◆ 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 ( void  )
inline

Definition at line 184 of file itkGPUImage.h.

◆ GetGPUDataManager()

template<typename TPixel , unsigned int VImageDimension = 2>
GPUDataManager::Pointer itk::GPUImage< TPixel, VImageDimension >::GetGPUDataManager ( void  ) 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 ( void  )
inline

Return the NeighborhoodAccessor functor

Definition at line 147 of file itkGPUImage.h.

◆ GetNeighborhoodAccessor() [2/2]

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

Return the NeighborhoodAccessor functor

Definition at line 155 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 ( void  )
inline

Return the Pixel Accessor object

Definition at line 131 of file itkGPUImage.h.

◆ GetPixelAccessor() [2/2]

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

Return the Pixel Accesor object

Definition at line 139 of file itkGPUImage.h.

◆ GetPixelContainer() [1/2]

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

Return a pointer to the container.

Definition at line 165 of file itkGPUImage.h.

◆ GetPixelContainer() [2/2]

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

Definition at line 171 of file itkGPUImage.h.

◆ Graft()

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

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>
virtual void itk::GPUImage< TPixel, VImageDimension >::Initialize ( void  )
virtual

◆ 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>
virtual void itk::GPUImage< TPixel, VImageDimension >::Modified ( void  ) const
virtual

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=()

template<typename TPixel , unsigned int VImageDimension = 2>
void itk::GPUImage< TPixel, VImageDimension >::operator= ( const Self )
private

◆ 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>
virtual void itk::GPUImage< TPixel, VImageDimension >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protectedvirtual

◆ SetCurrentCommandQueue()

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

Definition at line 178 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 ( void  )

Explicit synchronize CPU/GPU buffers

◆ UpdateCPUBuffer()

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

Explicit synchronize CPU/GPU buffers

◆ UpdateGPUBuffer()

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

Field Documentation

◆ m_DataManager

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

Definition at line 238 of file itkGPUImage.h.

◆ m_Graft

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

Definition at line 236 of file itkGPUImage.h.



Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo