35#ifndef __itkGPUImage_h
36#define __itkGPUImage_h
40#include "itkVersion.h"
41#include "itkObjectFactoryBase.h"
62template<
typename TPixel,
unsigned int VImageDimension = 2 >
79 typedef typename Superclass::PixelType PixelType;
86 typedef typename Superclass::SizeType
SizeType;
99 void Allocate(
bool initialize =
false )
override;
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;
242template<
typename T >
250template<
typename TPixelType,
unsigned int NDimension >
251class GPUTraits<
Image< TPixelType, NDimension > >
255 typedef GPUImage< TPixelType, NDimension > Type;
260#ifndef ITK_MANUAL_INSTANTIATION
261#include "itkGPUImage.hxx"
Templated n-dimensional image class for the GPU.
Image< TPixel, VImageDimension > Superclass
TPixel * GetBufferPointer(void)
SmartPointer< Self > Pointer
SmartPointer< const Self > ConstPointer
const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor(void) const
const TPixel * GetBufferPointer(void) const
GPUDataManager::Pointer GetGPUDataManager(void) const
void GraftITKImage(const DataObject *data)
Superclass::AccessorType AccessorType
void operator=(const Self &)
AccessorType GetPixelAccessor(void)
NeighborhoodAccessorFunctor< Self > NeighborhoodAccessorFunctorType
virtual void Graft(const DataObject *data)
virtual void Initialize(void)
const TPixel & GetPixel(const IndexType &index) const
DefaultPixelAccessorFunctor< Self > AccessorFunctorType
void UpdateGPUBuffer(void)
virtual void Modified(void) const
PixelContainer::ConstPointer PixelContainerConstPointer
Superclass::OffsetType OffsetType
Superclass::DirectionType DirectionType
const PixelContainer * GetPixelContainer(void) const
virtual void PrintSelf(std::ostream &os, Indent indent) const
Superclass::IOPixelType IOPixelType
void SetPixel(const IndexType &index, const TPixel &value)
void SetCurrentCommandQueue(int queueid)
Superclass::RegionType RegionType
PixelContainer::Pointer PixelContainerPointer
Superclass::SpacingType SpacingType
void UpdateCPUBuffer(void)
PixelContainer * GetPixelContainer(void)
void Allocate(bool initialize=false) override
TPixel & operator[](const IndexType &index)
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor(void)
const TPixel & operator[](const IndexType &index) const
void DataHasBeenGenerated(void)
itkStaticConstMacro(ImageDimension, unsigned int, VImageDimension)
GPUImageDataManager< GPUImage >::Pointer m_DataManager
int GetCurrentCommandQueueId(void)
void SetPixelContainer(PixelContainer *container)
Superclass::ValueType ValueType
Superclass::PixelContainer PixelContainer
WeakPointer< const Self > ConstWeakPointer
Superclass::InternalPixelType InternalPixelType
TPixel & GetPixel(const IndexType &index)
Superclass::SizeType SizeType
void FillBuffer(const TPixel &value)
const AccessorType GetPixelAccessor(void) const
Superclass::IndexType IndexType