39template <
typename TPixel,
unsigned int VImageDimension = 2>
40class ITK_TEMPLATE_EXPORT
GPUImage :
public Image<TPixel, VImageDimension>
43 ITK_DISALLOW_COPY_AND_MOVE(
GPUImage);
55 static constexpr unsigned int ImageDimension = VImageDimension;
57 using typename Superclass::PixelType;
58 using typename Superclass::ValueType;
59 using typename Superclass::InternalPixelType;
60 using typename Superclass::IOPixelType;
62 using typename Superclass::SpacingType;
63 using typename Superclass::PixelContainer;
66 using typename Superclass::OffsetType;
70 using typename Superclass::AccessorType;
121 m_DataManager->SetGPUBufferDirty();
122 return Superclass::GetPixelAccessor();
130 m_DataManager->UpdateCPUBuffer();
131 return Superclass::GetPixelAccessor();
136 NeighborhoodAccessorFunctorType
139 m_DataManager->SetGPUBufferDirty();
146 const NeighborhoodAccessorFunctorType
149 m_DataManager->UpdateCPUBuffer();
162 m_DataManager->SetGPUBufferDirty();
163 return Superclass::GetPixelContainer();
167 const PixelContainer *
170 m_DataManager->UpdateCPUBuffer();
171 return Superclass::GetPixelContainer();
177 m_DataManager->SetCurrentCommandQueue(queueid);
183 return m_DataManager->GetCurrentCommandQueueID();
200 Superclass::DataHasBeenGenerated();
201 if (m_DataManager->IsCPUBufferDirty())
203 m_DataManager->Modified();
216 using Superclass::Graft;
241 return "A Factory for GPUImage";
261#define OverrideImageTypeMacro(pt, dm) \
262 this->RegisterOverride(typeid(itk::Image<pt, dm>).name(), \
263 typeid(itk::GPUImage<pt, dm>).name(), \
264 "GPU Image Override", \
266 itk::CreateObjectFunction<GPUImage<pt, dm>>::New())
304template <
typename TPixelType,
unsigned int VDimension>
313#ifndef ITK_MANUAL_INSTANTIATION
314# include "itkGPUImage.hxx"
Base class for all data objects in ITK.
Provides a common API for pixel accessors for Image and VectorImage.
Give access to partial aspects a type.
GPU memory manager implemented using OpenCL. Required by GPUImage class.
const char * GetDescription() const override
const char * GetITKSourceVersion() const override
static void RegisterOneFactory()
Templated n-dimensional image class for the GPU.
const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
void Graft(const DataObject *data) override
typename PixelContainer::ConstPointer PixelContainerConstPointer
const TPixel & GetPixel(const IndexType &index) const
int GetCurrentCommandQueueID()
TPixel * GetBufferPointer() override
const TPixel * GetBufferPointer() const override
const AccessorType GetPixelAccessor() const
const PixelContainer * GetPixelContainer() const
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
PixelContainer * GetPixelContainer()
void SetPixel(const IndexType &index, const TPixel &value)
void SetCurrentCommandQueue(int queueid)
virtual void Graft(const Self *data)
void Allocate(bool initialize=false) override
GPUDataManager * GetGPUDataManager()
TPixel & operator[](const IndexType &index)
void DataHasBeenGenerated() override
void Initialize() override
AccessorType GetPixelAccessor()
const TPixel & operator[](const IndexType &index) const
void SetPixelContainer(PixelContainer *container)
typename PixelContainer::Pointer PixelContainerPointer
TPixel & GetPixel(const IndexType &index)
void FillBuffer(const TPixel &value)
Templated n-dimensional image class.
Defines an itk::Image front-end to a standard C-array.
Light weight base class for most itk classes.
Provides accessor interfaces to Get pixels and is meant to be used on pointers contained within Neigh...
Create instances of classes using an object factory.
static bool RegisterFactory(ObjectFactoryBase *, InsertionPositionEnum where=InsertionPositionEnum::INSERT_AT_BACK, vcl_size_t position=0)
Base class for most ITK classes.
Implements a weak reference to an object.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
#define OverrideImageTypeMacro(pt, dm)
#define ITK_SOURCE_VERSION
ImageBaseType::DirectionType DirectionType
ImageBaseType::RegionType RegionType
ImageBaseType::IndexType IndexType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....