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();
173 void DataHasBeenGenerated()
175 Superclass::DataHasBeenGenerated();
176 if( m_DataManager->IsCPUBufferDirty() )
178 m_DataManager->Modified();
186 virtual void Modified()
const;
196 void operator=(
const Self&);
214 return "A Factory for GPUImage";
219 itkFactorylessNewMacro(
Self);
236 #define OverrideImageTypeMacro(pt,dm) this->RegisterOverride( \
237 typeid(itk::Image<pt,dm>).name(), \
238 typeid(itk::GPUImage<pt,dm>).name(), \
239 "GPU Image Override", \
241 itk::CreateObjectFunction<GPUImage<pt,dm> >::New() )
280 template <
class TPixelType,
unsigned int NDimension>
289 #ifndef ITK_MANUAL_INSTANTIATION
290 #include "itkGPUImage.hxx"