ITK
6.0.0
Insight Toolkit
|
#include <itkGPUImage.h>
Templated n-dimensional image class for the GPU.
Derived from itk Image class to use with GPU image filters. This class manages both CPU and GPU memory implicitly, and can be used with non-GPU itk filters as well. Memory transfer between CPU and GPU is done automatically and implicitly.
Definition at line 40 of file itkGPUImage.h.
Public Member Functions | |
void | Allocate (bool initialize=false) override |
void | DataHasBeenGenerated () override |
void | FillBuffer (const TPixel &value) |
const TPixel * | GetBufferPointer () const override |
TPixel * | GetBufferPointer () override |
int | GetCurrentCommandQueueID () |
GPUDataManager * | GetGPUDataManager () |
virtual GPUImageDataManager< GPUImage > * | GetModifiableDataManager () |
const char * | GetNameOfClass () const override |
TPixel & | GetPixel (const IndexType &index) |
const TPixel & | GetPixel (const IndexType &index) const |
const PixelContainer * | GetPixelContainer () const |
virtual void | Graft (const Self *data) |
void | Initialize () override |
TPixel & | operator[] (const IndexType &index) |
const TPixel & | operator[] (const IndexType &index) const |
void | SetCurrentCommandQueue (int queueid) |
void | SetPixel (const IndexType &index, const TPixel &value) |
void | SetPixelContainer (PixelContainer *container) |
void | UpdateBuffers () |
AccessorType | GetPixelAccessor () |
const AccessorType | GetPixelAccessor () const |
NeighborhoodAccessorFunctorType | GetNeighborhoodAccessor () |
const NeighborhoodAccessorFunctorType | GetNeighborhoodAccessor () const |
PixelContainer * | GetPixelContainer () |
Public Member Functions inherited from itk::Image< TPixel, VImageDimension > | |
void | FillBuffer (const TPixel &value) |
NeighborhoodAccessorFunctorType | GetNeighborhoodAccessor () |
const NeighborhoodAccessorFunctorType | GetNeighborhoodAccessor () const |
unsigned int | GetNumberOfComponentsPerPixel () const override |
TPixel & | GetPixel (const IndexType &index) |
const TPixel & | GetPixel (const IndexType &index) const |
AccessorType | GetPixelAccessor () |
const AccessorType | GetPixelAccessor () const |
PixelContainer * | GetPixelContainer () |
const PixelContainer * | GetPixelContainer () const |
TPixel & | operator[] (const IndexType &index) |
const TPixel & | operator[] (const IndexType &index) const |
void | SetPixel (const IndexType &index, const TPixel &value) |
void | SetPixelContainer (PixelContainer *container) |
Public Member Functions inherited from itk::ImageBase< VImageDimension > | |
void | AllocateInitialized () |
OffsetValueType | ComputeOffset (const IndexType &ind) const |
void | CopyInformation (const DataObject *data) override |
virtual const RegionType & | GetBufferedRegion () const |
virtual const DirectionType & | GetDirection () const |
virtual const DirectionType & | GetInverseDirection () const |
virtual const RegionType & | GetLargestPossibleRegion () const |
virtual const PointType & | GetOrigin () const |
virtual const RegionType & | GetRequestedRegion () const |
virtual const SpacingType & | GetSpacing () const |
bool | IsCongruentImageGeometry (const ImageBase *otherImage, double coordinateTolerance, double directionTolerance) const |
bool | IsSameImageGeometryAs (const ImageBase *otherImage, double coordinateTolerance=DefaultImageCoordinateTolerance, double directionTolerance=DefaultImageDirectionTolerance) const |
bool | RequestedRegionIsOutsideOfTheBufferedRegion () override |
virtual void | SetBufferedRegion (const RegionType ®ion) |
virtual void | SetDirection (const DirectionType &direction) |
virtual void | SetLargestPossibleRegion (const RegionType ®ion) |
virtual void | SetRegions (const SizeType &size) |
void | SetRequestedRegion (const DataObject *data) override |
virtual void | SetRequestedRegion (const RegionType ®ion) |
void | SetRequestedRegionToLargestPossibleRegion () override |
template<typename TCoordinate > | |
void | TransformLocalVectorToPhysicalVector (const FixedArray< TCoordinate, VImageDimension > &inputGradient, FixedArray< TCoordinate, VImageDimension > &outputGradient) const |
template<typename TIndexRep , typename TCoordinate > | |
ContinuousIndex< TIndexRep, VImageDimension > | TransformPhysicalPointToContinuousIndex (const Point< TCoordinate, VImageDimension > &point) const |
template<typename TCoordinate , typename TIndexRep > | |
bool | TransformPhysicalPointToContinuousIndex (const Point< TCoordinate, VImageDimension > &point, ContinuousIndex< TIndexRep, VImageDimension > &index) const |
template<typename TCoordinate > | |
bool | TransformPhysicalPointToIndex (const Point< TCoordinate, VImageDimension > &point, IndexType &index) const |
template<typename TCoordinate > | |
void | TransformPhysicalVectorToLocalVector (const FixedArray< TCoordinate, VImageDimension > &inputGradient, FixedArray< TCoordinate, VImageDimension > &outputGradient) const |
void | UpdateOutputData () override |
void | UpdateOutputInformation () override |
bool | VerifyRequestedRegion () override |
virtual void | SetOrigin (PointType _arg) |
virtual void | SetOrigin (const double origin[VImageDimension]) |
virtual void | SetOrigin (const float origin[VImageDimension]) |
virtual void | SetRegions (const RegionType ®ion) |
const OffsetValueType * | GetOffsetTable () const |
IndexType | ComputeIndex (OffsetValueType offset) const |
virtual void | SetSpacing (const SpacingType &spacing) |
virtual void | SetSpacing (const double spacing[VImageDimension]) |
virtual void | SetSpacing (const float spacing[VImageDimension]) |
template<typename TCoordinate > | |
IndexType | TransformPhysicalPointToIndex (const Point< TCoordinate, VImageDimension > &point) const |
template<typename TCoordinate , typename TIndexRep > | |
void | TransformContinuousIndexToPhysicalPoint (const ContinuousIndex< TIndexRep, VImageDimension > &index, Point< TCoordinate, VImageDimension > &point) const |
template<typename TCoordinate , typename TIndexRep > | |
Point< TCoordinate, VImageDimension > | TransformContinuousIndexToPhysicalPoint (const ContinuousIndex< TIndexRep, VImageDimension > &index) const |
template<typename TCoordinate > | |
void | TransformIndexToPhysicalPoint (const IndexType &index, Point< TCoordinate, VImageDimension > &point) const |
template<typename TCoordinate > | |
Point< TCoordinate, VImageDimension > | TransformIndexToPhysicalPoint (const IndexType &index) const |
template<typename TVector > | |
TVector | TransformLocalVectorToPhysicalVector (const TVector &inputGradient) const |
template<typename TVector > | |
TVector | TransformPhysicalVectorToLocalVector (const TVector &inputGradient) const |
virtual void | SetNumberOfComponentsPerPixel (unsigned int) |
Public Member Functions inherited from itk::DataObject | |
void | DisconnectPipeline () |
bool | GetDataReleased () const |
virtual const bool & | GetReleaseDataFlag () const |
SmartPointer< ProcessObject > | GetSource () const |
DataObjectPointerArraySizeType | GetSourceOutputIndex () const |
const DataObjectIdentifierType & | GetSourceOutputName () const |
virtual ModifiedTimeType | GetUpdateMTime () const |
virtual void | PrepareForNewData () |
virtual void | PropagateRequestedRegion () |
void | ReleaseData () |
virtual void | ReleaseDataFlagOn () |
virtual void | ResetPipeline () |
void | SetReleaseDataFlag (bool flag) |
bool | ShouldIReleaseData () const |
virtual void | Update () |
void | UpdateSource () const |
void | SetPipelineMTime (ModifiedTimeType time) |
virtual const ModifiedTimeType & | GetPipelineMTime () const |
virtual void | SetRealTimeStamp (RealTimeStamp _arg) |
virtual const RealTimeStamp & | GetRealTimeStamp () const |
Public Member Functions inherited from itk::Object | |
unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
LightObject::Pointer | CreateAnother () const override |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) const |
void | SetDebug (bool debugFlag) const |
void | SetReferenceCount (int) override |
void | UnRegister () const noexcept override |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
virtual void | SetObjectName (std::string _arg) |
virtual const std::string & | GetObjectName () const |
Public Member Functions inherited from itk::LightObject | |
Pointer | Clone () const |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::Image< TPixel, VImageDimension > | |
static Pointer | New () |
Static Public Member Functions inherited from itk::ImageBase< VImageDimension > | |
static constexpr unsigned int | GetImageDimension () |
static Pointer | New () |
Static Public Member Functions inherited from itk::DataObject | |
static bool | GetGlobalReleaseDataFlag () |
static void | GlobalReleaseDataFlagOff () |
static void | GlobalReleaseDataFlagOn () |
static Pointer | New () |
static void | SetGlobalReleaseDataFlag (bool val) |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Static Public Attributes | |
static constexpr unsigned int | ImageDimension = VImageDimension |
Static Public Attributes inherited from itk::ImageBase< VImageDimension > | |
static constexpr ImageDimensionType | ImageDimension = VImageDimension |
Protected Member Functions | |
GPUImage () | |
void | Graft (const DataObject *data) override |
~GPUImage () override | |
Protected Member Functions inherited from itk::Image< TPixel, VImageDimension > | |
void | ComputeIndexToPhysicalPointMatrices () override |
Image ()=default | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~Image () override=default | |
Protected Member Functions inherited from itk::ImageBase< VImageDimension > | |
void | ComputeOffsetTable () |
ImageBase ()=default | |
virtual void | InitializeBufferedRegion () |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~ImageBase () override=default | |
OffsetValueType | FastComputeOffset (const IndexType &ind) const |
IndexType | FastComputeIndex (OffsetValueType offset) const |
Protected Member Functions inherited from itk::DataObject | |
DataObject () | |
virtual void | PropagateResetPipeline () |
~DataObject () override | |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
~Object () override | |
Protected Member Functions inherited from itk::LightObject | |
virtual LightObject::Pointer | InternalClone () const |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Private Attributes | |
GPUImageDataManager< GPUImage >::Pointer | m_DataManager {} |
Additional Inherited Members | |
Protected Attributes inherited from itk::ImageBase< VImageDimension > | |
SpacingType | m_Spacing { MakeFilled<SpacingType>(1.0) } |
PointType | m_Origin {} |
DirectionType | m_Direction { DirectionType::GetIdentity() } |
DirectionType | m_InverseDirection { DirectionType::GetIdentity() } |
DirectionType | m_IndexToPhysicalPoint { DirectionType::GetIdentity() } |
DirectionType | m_PhysicalPointToIndex { DirectionType::GetIdentity() } |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount {} |
using itk::GPUImage< TPixel, VImageDimension >::AccessorFunctorType = DefaultPixelAccessorFunctor<Self> |
Definition at line 72 of file itkGPUImage.h.
using itk::GPUImage< TPixel, VImageDimension >::ConstPointer = SmartPointer<const Self> |
Definition at line 48 of file itkGPUImage.h.
using itk::GPUImage< TPixel, VImageDimension >::ConstWeakPointer = WeakPointer<const Self> |
Definition at line 49 of file itkGPUImage.h.
using itk::GPUImage< TPixel, VImageDimension >::NeighborhoodAccessorFunctorType = NeighborhoodAccessorFunctor<Self> |
Definition at line 74 of file itkGPUImage.h.
using itk::GPUImage< TPixel, VImageDimension >::PixelContainerConstPointer = typename PixelContainer::ConstPointer |
Definition at line 69 of file itkGPUImage.h.
using itk::GPUImage< TPixel, VImageDimension >::PixelContainerPointer = typename PixelContainer::Pointer |
Definition at line 68 of file itkGPUImage.h.
using itk::GPUImage< TPixel, VImageDimension >::Pointer = SmartPointer<Self> |
Definition at line 47 of file itkGPUImage.h.
using itk::GPUImage< TPixel, VImageDimension >::Self = GPUImage |
Definition at line 45 of file itkGPUImage.h.
using itk::GPUImage< TPixel, VImageDimension >::Superclass = Image<TPixel, VImageDimension> |
Definition at line 46 of file itkGPUImage.h.
|
protected |
|
overrideprotected |
|
overridevirtual |
Allocate the image memory. The size of the image must already be set, e.g. by calling SetRegions().
Reimplemented from itk::Image< TPixel, VImageDimension >.
|
inlineoverridevirtual |
Inform the pipeline mechanism that data has been generated. This method is called by ProcessObject::UpdateOutputData() once the process object has finished generating its data. This essentially marks the DataObject as being updated and ready for use.
Reimplemented from itk::DataObject.
Definition at line 198 of file itkGPUImage.h.
void itk::GPUImage< TPixel, VImageDimension >::FillBuffer | ( | const TPixel & | value | ) |
|
overridevirtual |
Return a pointer to the beginning of the buffer. This is used by the image iterator class.
Reimplemented from itk::Image< TPixel, VImageDimension >.
|
overridevirtual |
Return a pointer to the beginning of the buffer. This is used by the image iterator class.
Reimplemented from itk::Image< TPixel, VImageDimension >.
|
inline |
Definition at line 181 of file itkGPUImage.h.
GPUDataManager* itk::GPUImage< TPixel, VImageDimension >::GetGPUDataManager | ( | ) |
|
virtual |
|
overridevirtual |
Reimplemented from itk::Image< TPixel, VImageDimension >.
|
inline |
Return the NeighborhoodAccessor functor
Definition at line 137 of file itkGPUImage.h.
|
inline |
Return the NeighborhoodAccessor functor
Definition at line 147 of file itkGPUImage.h.
TPixel& itk::GPUImage< TPixel, VImageDimension >::GetPixel | ( | const IndexType & | index | ) |
const TPixel& itk::GPUImage< TPixel, VImageDimension >::GetPixel | ( | const IndexType & | index | ) | const |
|
inline |
Return the Pixel Accessor object
Definition at line 119 of file itkGPUImage.h.
|
inline |
Return the Pixel Accesor object
Definition at line 128 of file itkGPUImage.h.
|
inline |
Return a pointer to the container.
Definition at line 160 of file itkGPUImage.h.
|
inline |
Definition at line 168 of file itkGPUImage.h.
|
overrideprotectedvirtual |
Graft the data and information from one image to another. This is a convenience method to setup a second image with all the meta information of another image and use the same pixel container. Note that this method is different than just using two SmartPointers to the same image since separate DataObjects are still maintained. This method is similar to ImageSource::GraftOutput(). The implementation in ImageBase simply calls CopyInformation() and copies the region ivars. The implementation here refers to the superclass' implementation and then copies over the pixel container.
Reimplemented from itk::Image< TPixel, VImageDimension >.
|
virtual |
Graft the data and information from one GPUImage to another.
Reimplemented from itk::Image< TPixel, VImageDimension >.
|
overridevirtual |
Restore the data object to its initial state. This means releasing memory.
Reimplemented from itk::Image< TPixel, VImageDimension >.
|
static |
TPixel& itk::GPUImage< TPixel, VImageDimension >::operator[] | ( | const IndexType & | index | ) |
const TPixel& itk::GPUImage< TPixel, VImageDimension >::operator[] | ( | const IndexType & | index | ) | const |
|
inline |
Definition at line 175 of file itkGPUImage.h.
void itk::GPUImage< TPixel, VImageDimension >::SetPixel | ( | const IndexType & | index, |
const TPixel & | value | ||
) |
void itk::GPUImage< TPixel, VImageDimension >::SetPixelContainer | ( | PixelContainer * | container | ) |
void itk::GPUImage< TPixel, VImageDimension >::UpdateBuffers | ( | ) |
Explicit synchronize CPU/GPU buffers
|
staticconstexpr |
Definition at line 55 of file itkGPUImage.h.
|
private |
Definition at line 219 of file itkGPUImage.h.