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;
119 m_DataManager->SetGPUBufferDirty();
120 return Superclass::GetPixelAccessor();
128 m_DataManager->UpdateCPUBuffer();
129 return Superclass::GetPixelAccessor();
134 NeighborhoodAccessorFunctorType
137 m_DataManager->SetGPUBufferDirty();
144 const NeighborhoodAccessorFunctorType
147 m_DataManager->UpdateCPUBuffer();
160 m_DataManager->SetGPUBufferDirty();
161 return Superclass::GetPixelContainer();
165 const PixelContainer *
168 m_DataManager->UpdateCPUBuffer();
169 return Superclass::GetPixelContainer();
175 m_DataManager->SetCurrentCommandQueue(queueid);
181 return m_DataManager->GetCurrentCommandQueueID();
198 Superclass::DataHasBeenGenerated();
199 if (m_DataManager->IsCPUBufferDirty())
201 m_DataManager->Modified();
214 using Superclass::Graft;
239 return "A Factory for GPUImage";
259#define OverrideImageTypeMacro(pt, dm) \
260 this->RegisterOverride(typeid(itk::Image<pt, dm>).name(), \
261 typeid(itk::GPUImage<pt, dm>).name(), \
262 "GPU Image Override", \
264 itk::CreateObjectFunction<GPUImage<pt, dm>>::New())
302template <
typename TPixelType,
unsigned int VDimension>
311#ifndef ITK_MANUAL_INSTANTIATION
312# 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....