19 #ifndef __itkGPUImage_h
20 #define __itkGPUImage_h
39 template <
class TPixel,
unsigned int VImageDimension = 2>
53 itkStaticConstMacro(ImageDimension,
unsigned int, VImageDimension);
62 typedef typename Superclass::SizeType
SizeType;
81 virtual void Initialize();
83 void FillBuffer(
const TPixel & value);
85 void SetPixel(
const IndexType & index,
const TPixel & value);
87 const TPixel & GetPixel(
const IndexType & index)
const;
89 TPixel & GetPixel(
const IndexType & index);
91 const TPixel & operator[](
const IndexType & index)
const;
93 TPixel & operator[](
const IndexType & index);
101 TPixel* GetBufferPointer();
103 const TPixel * GetBufferPointer()
const;
108 m_DataManager->SetGPUBufferDirty();
109 return Superclass::GetPixelAccessor();
116 m_DataManager->UpdateCPUBuffer();
117 return Superclass::GetPixelAccessor();
124 m_DataManager->SetGPUBufferDirty();
133 m_DataManager->UpdateCPUBuffer();
139 void SetPixelContainer(PixelContainer *container);
144 m_DataManager->SetGPUBufferDirty();
return Superclass::GetPixelContainer();
149 m_DataManager->UpdateCPUBuffer();
150 return Superclass::GetPixelContainer();
153 void SetCurrentCommandQueue(
int queueid )
155 m_DataManager->SetCurrentCommandQueue( queueid );
159 return m_DataManager->GetCurrentCommandQueueID();
171 void DataHasBeenGenerated()
173 Superclass::DataHasBeenGenerated();
174 if( m_DataManager->IsCPUBufferDirty() )
176 m_DataManager->Modified();
184 virtual void Modified()
const;
193 void operator=(
const Self&);
211 return "A Factory for GPUImage";
216 itkFactorylessNewMacro(
Self);
233 #define OverrideImageTypeMacro(pt,dm) this->RegisterOverride( \
234 typeid(itk::Image<pt,dm>).name(), \
235 typeid(itk::GPUImage<pt,dm>).name(), \
236 "GPU Image Override", \
238 itk::CreateObjectFunction<GPUImage<pt,dm> >::New() )
277 template <
class TPixelType,
unsigned int NDimension>
287 #include "itkGPUImage.hxx"