35 #ifndef __itkGPUImage_h
36 #define __itkGPUImage_h
40 #include "itkVersion.h"
41 #include "itkObjectFactoryBase.h"
62 template<
typename TPixel,
unsigned int VImageDimension = 2 >
86 typedef typename Superclass::SizeType
SizeType;
99 virtual void Allocate(
bool initialize =
false ) ITK_OVERRIDE;
101 void AllocateGPU(
void );
103 virtual
void Initialize(
void );
105 void FillBuffer( const TPixel & value );
107 void SetPixel( const
IndexType & index, const TPixel & value );
109 const TPixel & GetPixel( const
IndexType & index ) const;
113 const TPixel & operator[]( const
IndexType & index ) const;
118 void UpdateBuffers(
void );
121 void UpdateCPUBuffer(
void );
123 void UpdateGPUBuffer(
void );
126 TPixel * GetBufferPointer(
void );
128 const TPixel * GetBufferPointer(
void ) const;
133 m_DataManager->SetGPUBufferDirty();
134 return Superclass::GetPixelAccessor();
141 m_DataManager->UpdateCPUBuffer();
142 return Superclass::GetPixelAccessor();
149 m_DataManager->SetGPUBufferDirty();
157 m_DataManager->UpdateCPUBuffer();
167 m_DataManager->SetGPUBufferDirty();
return Superclass::GetPixelContainer();
173 m_DataManager->UpdateCPUBuffer();
174 return Superclass::GetPixelContainer();
180 m_DataManager->SetCurrentCommandQueue( queueid );
186 return m_DataManager->GetCurrentCommandQueueId();
201 Superclass::DataHasBeenGenerated();
203 if( m_DataManager->IsCPUBufferDirty() )
205 m_DataManager->Modified();
212 virtual void Graft(
const DataObject * data );
229 virtual void PrintSelf( std::ostream & os, Indent indent )
const;
242 template<
typename T >
250 template<
typename TPixelType,
unsigned int NDimension >
260 #ifndef ITK_MANUAL_INSTANTIATION
261 #include "itkGPUImage.hxx"