|
ITK
5.2.0
Insight Toolkit
|
Go to the documentation of this file.
39 template <
typename TPixel,
unsigned int VImageDimension = 2>
40 class ITK_TEMPLATE_EXPORT
GPUImage :
public Image<TPixel, VImageDimension>
43 ITK_DISALLOW_COPY_AND_MOVE(
GPUImage);
55 static constexpr
unsigned int ImageDimension = VImageDimension;
81 Allocate(
bool initialize =
false)
override;
84 Initialize()
override;
87 FillBuffer(
const TPixel & value);
90 SetPixel(
const IndexType & index,
const TPixel & value);
98 const TPixel & operator[](
const IndexType & index)
const;
100 TPixel & operator[](
const IndexType & index);
110 GetBufferPointer()
override;
113 GetBufferPointer()
const override;
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();
154 SetPixelContainer(PixelContainer * container);
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();
207 Graft(
const Self * data);
214 using Superclass::Graft;
239 return "A Factory for GPUImage";
244 itkFactorylessNewMacro(Self);
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())
295 template <
typename T>
302 template <
typename TPixelType,
unsigned int NDimension>
311 #ifndef ITK_MANUAL_INSTANTIATION
312 # include "itkGPUImage.hxx"
PixelContainer * GetPixelContainer()
Create instances of classes using an object factory.
ImageBaseType::DirectionType DirectionType
int GetCurrentCommandQueueID()
const PixelContainer * GetPixelContainer() const
Templated n-dimensional image class for the GPU.
void DataHasBeenGenerated() override
void SetCurrentCommandQueue(int queueid)
ImageBaseType::SizeType SizeType
static void RegisterOneFactory()
Give access to partial aspects a type.
Provides accessor interfaces to Get pixels and is meant to be used on pointers contained within Neigh...
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
ImageBaseType::IndexType IndexType
#define ITK_SOURCE_VERSION
GPUImageDataManager< GPUImage >::Pointer m_DataManager
GPU memory manager implemented using OpenCL. Required by GPUImage class.
Provides a common API for pixel accessors for Image and VectorImage.
Light weight base class for most itk classes.
const char * GetDescription() const override
const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
typename Superclass::RegionType RegionType
ImageBaseType::RegionType RegionType
const AccessorType GetPixelAccessor() const
Defines an itk::Image front-end to a standard C-array.
const char * GetITKSourceVersion() const override
Implements a weak reference to an object.
typename Superclass::SpacingType SpacingType
typename Superclass::IndexType IndexType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
typename PixelContainer::ConstPointer PixelContainerConstPointer
Base class for most ITK classes.
Templated n-dimensional image class.
typename Superclass::DirectionType DirectionType
typename Superclass::OffsetType OffsetType
typename PixelContainer::Pointer PixelContainerPointer
static bool RegisterFactory(ObjectFactoryBase *, InsertionPositionEnum where=InsertionPositionEnum::INSERT_AT_BACK, vcl_size_t position=0)
typename Superclass::SizeType SizeType
AccessorType GetPixelAccessor()
#define OverrideImageTypeMacro(pt, dm)
Base class for all data objects in ITK.