IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Public Member Functions | Protected Member Functions | Friends | List of all members
ipsdk::image::BasePlanStorage Class Referenceabstract

Base class for image plan data storage. More...

#include <BasePlanStorage.h>

Inheritance diagram for ipsdk::image::BasePlanStorage:
ipsdk::BaseObjectWithSkeleton ipsdk::BaseSerializationObject ipsdk::BaseDynamicObject ipsdk::image::CudaPlanStorage ipsdk::image::DiskPlanStorage ipsdk::image::DistributedPlanStorage ipsdk::image::MemoryPlanStorage ipsdk::image::ReInterpretedPlanStorage ipsdk::image::UserPlanStorage ipsdk::python::PythonAlignedPlanStorage ipsdk::python::PythonPlanStorage

Public Member Functions

virtual ePlanStorageType getPlanStorageType () const =0
 retrieve plan storage type
 
bool isInit () const
 retrieve object initialisation flag
 
virtual eImageAccessMode getAccessMode () const =0
 retrieve image access mode More...
 
bool hasFullDataAccess () const
 check whether object has a contiguous access to full plan data More...
 
virtual bool hasRowDataAccess (const ipUInt64 startOffsetY, const ipUInt64 sizeY=1) const
 check whether object has a contiguous access to specific rows of data More...
 
virtual bool canBeRemotlyAccessed () const =0
 retrieve flag indicating whether data can be remotly accessed More...
 
virtual bool hasBinary8BitsStorage () const =0
 method allowing to check whether image underlying storage stores binary data with a 8 bit alignment More...
 
BoolResult resize (const ImagePlanGeometry &planGeometry)
 resize plan storage More...
 
virtual ipUInt64 getFullBufferSize () const
 retrieve full buffer size More...
 
void clear ()
 clear object data
 
virtual ipBool isDiskPlanStorage () const
 returns true if the plan storage is used for a disk image
 
Constructors and destructors
 BasePlanStorage ()
 
virtual ~BasePlanStorage ()=0
 
Image geometry
const ImagePlanGeometrygetPlanGeometry () const
 retrieve geometry associated to storage More...
 
ipUInt64 getSizeX () const
 retrieve geometry plan x size More...
 
ipUInt64 getSizeY () const
 retrieve geometry plan y size More...
 
ipUInt64 getNbPixels () const
 retrieve number of pixels inside geometry More...
 
const eImageBufferTypegetBufferType () const
 retrieve image data type More...
 
virtual const void * getDataPtr () const
 retrieve data pointer More...
 
virtual void * getDataPtr ()
 retrieve data pointer More...
 
virtual const void * getRowDataPtr (const ipUInt64 offsetY) const
 retrieve a row data pointer More...
 
virtual void * getRowDataPtr (const ipUInt64 offsetY)
 retrieve a row data pointer More...
 
Data I/O access
BoolResult readRaw (const ipUInt64 startOffset, const ipUInt64 size, void *pData) const
 method allowing to read data from image storage More...
 
BoolResult readArea (const ipUInt64 areaStartOffsetX, const ipUInt64 areaSizeX, const ipUInt64 areaStartOffsetY, const BufferPtrColl &dataColl) const
 method allowing to read a rectangular area of data More...
 
BoolResult writeRaw (const ipUInt64 startOffset, const ipUInt64 size, const void *pData)
 method allowing to write data to image storage More...
 
BoolResult writeArea (const ipUInt64 areaStartOffsetX, const ipUInt64 areaSizeX, const ipUInt64 areaStartOffsetY, const BufferConstPtrColl &dataColl)
 method allowing to write a rectangular area of data More...
 
- Public Member Functions inherited from ipsdk::BaseObjectWithSkeleton
const eSklSrzModegetSerializationMode () const
 retrieve serialization flag for object More...
 
void setSerializationMode (const eSklSrzMode &sklSrzMode) const
 set serialization flag for object
 
 BaseObjectWithSkeleton ()
 
 ~BaseObjectWithSkeleton ()
 
- Public Member Functions inherited from ipsdk::BaseSerializationObject
 BaseSerializationObject ()
 Default constructor.
 
virtual ~BaseSerializationObject ()=0
 destructor
 
- Public Member Functions inherited from ipsdk::BaseDynamicObject
virtual const std::string & getClassName () const
 method allowing to retrieve object class name
 
virtual BaseDynamicObjectcreateNew () const =0
 method allowing to create new instance of current object type
 
virtual DynamicObjectPtr createShared () const =0
 method allowing to create new shared instance of current object type
 
virtual bool hasCopySupport () const =0
 check whether objet has copy support
 
virtual BaseDynamicObjectduplicate () const =0
 method allowing to duplicate current object More...
 
virtual DynamicObjectPtr duplicateShared () const =0
 method allowing shared duplication of current object More...
 
 BaseDynamicObject ()
 
virtual ~BaseDynamicObject ()=0
 

Protected Member Functions

void initBase (const ImagePlanGeometry &planGeometry)
 base class initialization method
 
virtual BoolResult resizePlan (const ImagePlanGeometry &planGeometry)=0
 resize plan storage in derived class More...
 
virtual BoolResult readRawData (const ipUInt64 startOffset, const ipUInt64 size, void *pData) const =0
 method allowing to read data from image storage More...
 
virtual BoolResult readAreaData (const ipUInt64 areaStartOffsetX, const ipUInt64 areaSizeX, const ipUInt64 areaStartOffsetY, const BufferPtrColl &dataColl) const
 method allowing to read a rectangular area of data More...
 
virtual BoolResult writeRawData (const ipUInt64 startOffset, const ipUInt64 size, const void *pData)=0
 method allowing to write data to image storage More...
 
virtual BoolResult writeAreaData (const ipUInt64 areaStartOffsetX, const ipUInt64 areaSizeX, const ipUInt64 areaStartOffsetY, const BufferConstPtrColl &dataColl)
 method allowing to write a rectangular area of data More...
 
virtual void clearPlanData ()=0
 clear plan data in derived class
 
- Protected Member Functions inherited from ipsdk::BaseSerializationObject
virtual BoolResult write (BaseOArchive &ar) const
 method allowing to ensure serialization write part for object
 
virtual BoolResult read (BaseIArchive &ar)
 method allowing to ensure serialization read part for object
 
- Protected Member Functions inherited from ipsdk::BaseDynamicObject
virtual void initCtorCopy (const BaseDynamicObject &object)
 
virtual void copy (const BaseDynamicObject &object)
 method allowing to copy data from another object
 

Friends

class SubImage
 

Additional Inherited Members

- Static Public Member Functions inherited from ipsdk::BaseSerializationObject
static ipUInt32 getVersion ()
 method allowing to retrieve class version information for serialization
 
- Static Public Member Functions inherited from ipsdk::BaseDynamicObject
static const std::string & getTypeName ()
 method allowing to retrieve name associated to class
 
- Protected Attributes inherited from ipsdk::BaseObjectWithSkeleton
eSklSrzMode _sklSrzMode
 serialization flag for object More...
 

Detailed Description

Base class for image plan data storage.

Author
E. Noirfalise
Date
2013/6/14

Member Function Documentation

◆ getPlanGeometry()

const ImagePlanGeometry& ipsdk::image::BasePlanStorage::getPlanGeometry ( ) const

retrieve geometry associated to storage

Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false

◆ getSizeX()

ipUInt64 ipsdk::image::BasePlanStorage::getSizeX ( ) const

retrieve geometry plan x size

Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false

◆ getSizeY()

ipUInt64 ipsdk::image::BasePlanStorage::getSizeY ( ) const

retrieve geometry plan y size

Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false

◆ getNbPixels()

ipUInt64 ipsdk::image::BasePlanStorage::getNbPixels ( ) const

retrieve number of pixels inside geometry

Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false

◆ getBufferType()

const eImageBufferType& ipsdk::image::BasePlanStorage::getBufferType ( ) const

retrieve image data type

Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false

◆ getAccessMode()

virtual eImageAccessMode ipsdk::image::BasePlanStorage::getAccessMode ( ) const
pure virtual

◆ getDataPtr() [1/2]

virtual const void* ipsdk::image::BasePlanStorage::getDataPtr ( ) const
virtual

retrieve data pointer

Note
derived class without data direct access should not instanciate these methods
Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false
Returns
0 if data pointer is not available

Reimplemented in ipsdk::image::UserPlanStorage, ipsdk::image::ReInterpretedPlanStorage, ipsdk::image::CudaPlanStorage, ipsdk::image::MemoryPlanStorage, and ipsdk::python::PythonPlanStorage.

◆ getDataPtr() [2/2]

virtual void* ipsdk::image::BasePlanStorage::getDataPtr ( )
virtual

retrieve data pointer

Note
derived class without data direct access should not instanciate these methods
Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false
Returns
0 if data pointer is not available

Reimplemented in ipsdk::image::UserPlanStorage, ipsdk::image::ReInterpretedPlanStorage, ipsdk::image::CudaPlanStorage, ipsdk::image::MemoryPlanStorage, and ipsdk::python::PythonPlanStorage.

◆ hasFullDataAccess()

bool ipsdk::image::BasePlanStorage::hasFullDataAccess ( ) const

check whether object has a contiguous access to full plan data

Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false

◆ hasRowDataAccess()

virtual bool ipsdk::image::BasePlanStorage::hasRowDataAccess ( const ipUInt64  startOffsetY,
const ipUInt64  sizeY = 1 
) const
virtual

check whether object has a contiguous access to specific rows of data

Exceptions
ipsdk::image::IPSDKImageExceptionif startOffsetY + sizeY > getSizeY()

Reimplemented in ipsdk::image::DistributedPlanStorage, and ipsdk::image::ReInterpretedPlanStorage.

◆ canBeRemotlyAccessed()

virtual bool ipsdk::image::BasePlanStorage::canBeRemotlyAccessed ( ) const
pure virtual

◆ hasBinary8BitsStorage()

virtual bool ipsdk::image::BasePlanStorage::hasBinary8BitsStorage ( ) const
pure virtual

◆ getRowDataPtr() [1/2]

virtual const void* ipsdk::image::BasePlanStorage::getRowDataPtr ( const ipUInt64  offsetY) const
virtual

retrieve a row data pointer

Warning
only few rows can be accessible (case of distributed images). Check row data availability first using hasRowDataAccess(startOffsetY, sizeY) method
Exceptions
ipsdk::image::IPSDKImageExceptionif offsetY >= getSizeY()
Returns
0 if data pointer is not accessible (hasRowDataAccess(offsetY) == 0)

Reimplemented in ipsdk::image::DistributedPlanStorage.

◆ getRowDataPtr() [2/2]

virtual void* ipsdk::image::BasePlanStorage::getRowDataPtr ( const ipUInt64  offsetY)
virtual

retrieve a row data pointer

Warning
only few rows can be accessible (case of distributed images). Check row data availability first using hasRowDataAccess(startOffsetY, sizeY) method
Exceptions
ipsdk::image::IPSDKImageExceptionif offsetY >= getSizeY()
Returns
0 if data pointer is not accessible (hasRowDataAccess(offsetY) == 0)

Reimplemented in ipsdk::image::DistributedPlanStorage.

◆ resize()

BoolResult ipsdk::image::BasePlanStorage::resize ( const ImagePlanGeometry planGeometry)

resize plan storage

Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false
Returns
false in case of failure

◆ getFullBufferSize()

virtual ipUInt64 ipsdk::image::BasePlanStorage::getFullBufferSize ( ) const
virtual

retrieve full buffer size

Note
derived class without data direct access should not instanciate this methods
Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false

Reimplemented in ipsdk::image::ReInterpretedPlanStorage, ipsdk::image::CudaPlanStorage, ipsdk::image::MemoryPlanStorage, and ipsdk::python::PythonPlanStorage.

◆ readRaw()

BoolResult ipsdk::image::BasePlanStorage::readRaw ( const ipUInt64  startOffset,
const ipUInt64  size,
void *  pData 
) const

method allowing to read data from image storage

Exceptions
ipsdk::image::IPSDKImageExceptionif startOffset + size > getNbPixels()
Returns
false in case of failure

◆ readArea()

BoolResult ipsdk::image::BasePlanStorage::readArea ( const ipUInt64  areaStartOffsetX,
const ipUInt64  areaSizeX,
const ipUInt64  areaStartOffsetY,
const BufferPtrColl &  dataColl 
) const

method allowing to read a rectangular area of data

Exceptions
ipsdk::image::IPSDKImageExceptionif areaStartOffsetY + dataColl.size() > getSizeY()
ipsdk::image::IPSDKImageExceptionif areaStartOffsetX + areaSizeX > getSizeX()
Returns
false in case of failure

◆ writeRaw()

BoolResult ipsdk::image::BasePlanStorage::writeRaw ( const ipUInt64  startOffset,
const ipUInt64  size,
const void *  pData 
)

method allowing to write data to image storage

Exceptions
ipsdk::image::IPSDKImageExceptionif startOffset + size > getNbPixels()
ipsdk::image::IPSDKImageExceptionif getAccessMode() == eImageAccessMode::eIAM_Read
Returns
false in case of failure

◆ writeArea()

BoolResult ipsdk::image::BasePlanStorage::writeArea ( const ipUInt64  areaStartOffsetX,
const ipUInt64  areaSizeX,
const ipUInt64  areaStartOffsetY,
const BufferConstPtrColl &  dataColl 
)

method allowing to write a rectangular area of data

Exceptions
ipsdk::image::IPSDKImageExceptionif areaStartOffsetY + dataColl.size() > getSizeY()
ipsdk::image::IPSDKImageExceptionif areaStartOffsetX + areaSizeX > getSizeX()
ipsdk::image::IPSDKImageExceptionif getAccessMode() == eImageAccessMode::eIAM_Read
Returns
false in case of failure

◆ resizePlan()

virtual BoolResult ipsdk::image::BasePlanStorage::resizePlan ( const ImagePlanGeometry planGeometry)
protectedpure virtual

◆ readRawData()

virtual BoolResult ipsdk::image::BasePlanStorage::readRawData ( const ipUInt64  startOffset,
const ipUInt64  size,
void *  pData 
) const
protectedpure virtual

◆ readAreaData()

virtual BoolResult ipsdk::image::BasePlanStorage::readAreaData ( const ipUInt64  areaStartOffsetX,
const ipUInt64  areaSizeX,
const ipUInt64  areaStartOffsetY,
const BufferPtrColl &  dataColl 
) const
protectedvirtual

method allowing to read a rectangular area of data

Returns
false in case of failure

Reimplemented in ipsdk::image::DistributedPlanStorage.

◆ writeRawData()

virtual BoolResult ipsdk::image::BasePlanStorage::writeRawData ( const ipUInt64  startOffset,
const ipUInt64  size,
const void *  pData 
)
protectedpure virtual

◆ writeAreaData()

virtual BoolResult ipsdk::image::BasePlanStorage::writeAreaData ( const ipUInt64  areaStartOffsetX,
const ipUInt64  areaSizeX,
const ipUInt64  areaStartOffsetY,
const BufferConstPtrColl &  dataColl 
)
protectedvirtual

method allowing to write a rectangular area of data

Exceptions
ipsdk::image::IPSDKImageExceptionif getAccessMode() == eImageAccessMode::eIAM_Read
Returns
false in case of failure

Reimplemented in ipsdk::image::DistributedPlanStorage.


The documentation for this class was generated from the following file: