39 template <
typename TPixel,
unsigned int VImageDimension = 2>
40 class ITK_TEMPLATE_EXPORT
GPUImage :
public Image<TPixel,VImageDimension>
53 itkStaticConstMacro(ImageDimension,
unsigned int, VImageDimension);
79 virtual void Allocate(
bool initialize=
false) ITK_OVERRIDE;
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() ITK_OVERRIDE;
103 const TPixel * GetBufferPointer() const ITK_OVERRIDE;
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();
155 m_DataManager->SetCurrentCommandQueue( queueid );
159 return m_DataManager->GetCurrentCommandQueueID();
176 if( m_DataManager->IsCPUBufferDirty() )
178 m_DataManager->Modified();
183 virtual void Graft(
const Self *data);
209 return "A Factory for GPUImage";
214 itkFactorylessNewMacro(Self);
230 #define OverrideImageTypeMacro(pt,dm) this->RegisterOverride( \
231 typeid(itk::Image<pt,dm>).name(), \
232 typeid(itk::GPUImage<pt,dm>).name(), \
233 "GPU Image Override", \
235 itk::CreateObjectFunction<GPUImage<pt,dm> >::New() )
267 template <
typename T>
274 template <
typename TPixelType,
unsigned int NDimension>
283 #ifndef ITK_MANUAL_INSTANTIATION
284 #include "itkGPUImage.hxx"
void DataHasBeenGenerated() override
PixelContainer::ConstPointer PixelContainerConstPointer
Represent the offset between two n-dimensional indexes in a n-dimensional image.
#define ITK_SOURCE_VERSION
virtual void Initialize()
Represent the size (bounds) of a n-dimensional image.
SmartPointer< Self > Pointer
itk::SmartPointer< const Self > ConstPointer
Superclass::IOPixelType IOPixelType
An image region represents a structured region of data.
const char * GetDescription() const override
Create instances of classes using an object factory.
Implements a weak reference to an object.
DefaultPixelAccessorFunctor< Self > AccessorFunctorType
void SetCurrentCommandQueue(int queueid)
NeighborhoodAccessorFunctor< Self > NeighborhoodAccessorFunctorType
Superclass::InternalPixelType InternalPixelType
Superclass::PixelType PixelType
PixelContainer * GetPixelContainer()
Superclass::DirectionType DirectionType
Templated n-dimensional image class for the GPU.
Superclass::AccessorType AccessorType
WeakPointer< const Self > ConstWeakPointer
Provides accessor interfaces to Get pixels and is meant to be used on pointers contained within Neigh...
Superclass::PixelContainer PixelContainer
const PixelContainer * GetPixelContainer() const
virtual const char * GetITKSourceVersion() const override
virtual void DataHasBeenGenerated()
const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
Image< TPixel, VImageDimension > Superclass
GPUImageDataManager< GPUImage >::Pointer m_DataManager
Provides a common API for pixel accessors for Image and VectorImage.
itk::ObjectFactoryBase Superclass
Base class for all data objects in ITK.
virtual void Graft(const DataObject *)
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
Superclass::SpacingType SpacingType
#define OverrideImageTypeMacro(pt, dm)
SmartPointer< const Self > ConstPointer
Superclass::OffsetType OffsetType
Superclass::ValueType ValueType
Superclass::RegionType RegionType
GPUImage< TPixelType, NDimension > Type
int GetCurrentCommandQueueID()
static bool RegisterFactory(ObjectFactoryBase *, InsertionPositionType where=INSERT_AT_BACK, vcl_size_t position=0)
itk::SmartPointer< Self > Pointer
static void RegisterOneFactory(void)
Give access to partial aspects a type.
Superclass::SizeType SizeType
Superclass::IndexType IndexType
Templated n-dimensional image class.
const AccessorType GetPixelAccessor(void) const
Defines an itk::Image front-end to a standard C-array.
PixelContainer::Pointer PixelContainerPointer