IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ipsdk::image::DistributedPlanStorage Class Reference

Class encapsulating distributed plan storage. More...

#include <DistributedPlanStorage.h>

Inheritance diagram for ipsdk::image::DistributedPlanStorage:
ipsdk::image::BasePlanStorage ipsdk::BaseObjectWithSkeleton ipsdk::BaseSerializationObject ipsdk::BaseDynamicObject

Public Member Functions

ePlanStorageType getPlanStorageType () const
 retrieve plan storage type
 
void init (const ImagePlanGeometry &planGeometry, const DataIdentifierConstPtr &pImageIdentifier, const PlanIndex &planIndex, const LocationMap &locationMap)
 storage initialization More...
 
const DataIdentifierConstPtrgetImageIdentifier () const
 retrieve identifier associated to full image More...
 
const GuidgetImageGuid () const
 retrieve guid associated to full image More...
 
const std::string & getImageName () const
 retrieve name associated to full image More...
 
const PlanIndexgetPlanIndex () const
 retrieve plan indexes for plan in full image More...
 
ipUInt64 getZPlanIdx () const
 retrieve z plan index for plan in full image More...
 
ipUInt64 getCPlanIdx () const
 retrieve c plan index for plan in full image More...
 
ipUInt64 getTPlanIdx () const
 retrieve t plan index for plan in full image More...
 
const LocationMapgetLocationMap () const
 retrieve location map associated to plan storage More...
 
void getGuidSet (const ipUInt64 startOffsetY, const ipUInt64 sizeY, GuidSet &guidSet) const
 retrieve collection of socket guid associated to a given row range More...
 
void getGuidSet (GuidSet &guidSet) const
 retrieve collection of socket guid associated to full plan storage More...
 
eImageAccessMode getAccessMode () const
 retrieve image access mode More...
 
bool hasRowDataAccess (const ipUInt64 startOffsetY, const ipUInt64 sizeY=1) const
 check whether object has a contiguous access to specific rows of data More...
 
bool canBeRemotlyAccessed () const
 retrieve flag indicating whether data can be remotly accessed More...
 
bool hasBinary8BitsStorage () const
 method allowing to check whether image underlying storage stores binary data with a 8 bit alignment More...
 
bool hasRemoteData () const
 method allowing to check whether plan storage is associated to remote data More...
 
Constructors and destructors
 DistributedPlanStorage ()
 
 ~DistributedPlanStorage ()
 
const void * getRowDataPtr (const ipUInt64 offsetY) const
 retrieve a row data pointer More...
 
void * getRowDataPtr (const ipUInt64 offsetY)
 retrieve a row data pointer More...
 
- Public Member Functions inherited from ipsdk::image::BasePlanStorage
bool isInit () const
 retrieve object initialisation flag
 
bool hasFullDataAccess () const
 check whether object has a contiguous access to full plan data 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
 
 BasePlanStorage ()
 
virtual ~BasePlanStorage ()=0
 
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...
 
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
 

Static Public Attributes

static const ePlanStorageType::domain g_planStorageType = ePlanStorageType::ePST_Distributed
 plan storage type
 

Protected Member Functions

BoolResult resizePlan (const ImagePlanGeometry &planGeometry)
 resize plan storage in derived class More...
 
BoolResult readRawData (const ipUInt64 startOffset, const ipUInt64 size, void *pData) const
 method allowing to read data from image storage More...
 
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...
 
BoolResult writeRawData (const ipUInt64 startOffset, const ipUInt64 size, const void *pData)
 method allowing to write data to image storage More...
 
BoolResult writeAreaData (const ipUInt64 areaStartOffsetX, const ipUInt64 areaSizeX, const ipUInt64 areaStartOffsetY, const BufferConstPtrColl &dataColl)
 method allowing to write a rectangular area of data More...
 
void clearPlanData ()
 clear plan data in derived class
 
- Protected Member Functions inherited from ipsdk::image::BasePlanStorage
void initBase (const ImagePlanGeometry &planGeometry)
 base class initialization method
 
- 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
 

Protected Attributes

DataIdentifierConstPtr _pImageIdentifier
 identifier associated to full image
 
PlanIndex _planIndex
 plan indexes for plan in full image
 
LocationMap _locationMap
 
bool _bOwnData
 
- Protected Attributes inherited from ipsdk::BaseObjectWithSkeleton
eSklSrzMode _sklSrzMode
 serialization flag for object More...
 

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
 

Detailed Description

Class encapsulating distributed plan storage.

Author
E. Noirfalise
Date
2015/08/13

This kind of plan storage can be composed of fragments potentially held

Member Function Documentation

◆ init()

void ipsdk::image::DistributedPlanStorage::init ( const ImagePlanGeometry planGeometry,
const DataIdentifierConstPtr pImageIdentifier,
const PlanIndex planIndex,
const LocationMap locationMap 
)

storage initialization

Exceptions
ipsdk::image::IPSDKImageExceptionif pImageIdentifier.get() == 0
ipsdk::image::IPSDKImageExceptionif location map data are not valid

◆ getImageIdentifier()

const DataIdentifierConstPtr& ipsdk::image::DistributedPlanStorage::getImageIdentifier ( ) const

retrieve identifier associated to full image

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

◆ getImageGuid()

const Guid& ipsdk::image::DistributedPlanStorage::getImageGuid ( ) const

retrieve guid associated to full image

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

◆ getImageName()

const std::string& ipsdk::image::DistributedPlanStorage::getImageName ( ) const

retrieve name associated to full image

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

◆ getPlanIndex()

const PlanIndex& ipsdk::image::DistributedPlanStorage::getPlanIndex ( ) const

retrieve plan indexes for plan in full image

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

◆ getZPlanIdx()

ipUInt64 ipsdk::image::DistributedPlanStorage::getZPlanIdx ( ) const

retrieve z plan index for plan in full image

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

◆ getCPlanIdx()

ipUInt64 ipsdk::image::DistributedPlanStorage::getCPlanIdx ( ) const

retrieve c plan index for plan in full image

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

◆ getTPlanIdx()

ipUInt64 ipsdk::image::DistributedPlanStorage::getTPlanIdx ( ) const

retrieve t plan index for plan in full image

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

◆ getLocationMap()

const LocationMap& ipsdk::image::DistributedPlanStorage::getLocationMap ( ) const

retrieve location map associated to plan storage

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

◆ getGuidSet() [1/2]

void ipsdk::image::DistributedPlanStorage::getGuidSet ( const ipUInt64  startOffsetY,
const ipUInt64  sizeY,
GuidSet guidSet 
) const

retrieve collection of socket guid associated to a given row range

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

◆ getGuidSet() [2/2]

void ipsdk::image::DistributedPlanStorage::getGuidSet ( GuidSet guidSet) const

retrieve collection of socket guid associated to full plan storage

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

◆ getAccessMode()

eImageAccessMode ipsdk::image::DistributedPlanStorage::getAccessMode ( ) const
virtual

retrieve image access mode

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

Implements ipsdk::image::BasePlanStorage.

◆ hasRowDataAccess()

bool ipsdk::image::DistributedPlanStorage::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 from ipsdk::image::BasePlanStorage.

◆ canBeRemotlyAccessed()

bool ipsdk::image::DistributedPlanStorage::canBeRemotlyAccessed ( ) const
virtual

retrieve flag indicating whether data can be remotly accessed

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

Implements ipsdk::image::BasePlanStorage.

◆ hasBinary8BitsStorage()

bool ipsdk::image::DistributedPlanStorage::hasBinary8BitsStorage ( ) const
virtual

method allowing to check whether image underlying storage stores binary data with a 8 bit alignment

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

Implements ipsdk::image::BasePlanStorage.

◆ getRowDataPtr() [1/2]

const void* ipsdk::image::DistributedPlanStorage::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 from ipsdk::image::BasePlanStorage.

◆ getRowDataPtr() [2/2]

void* ipsdk::image::DistributedPlanStorage::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 from ipsdk::image::BasePlanStorage.

◆ hasRemoteData()

bool ipsdk::image::DistributedPlanStorage::hasRemoteData ( ) const

method allowing to check whether plan storage is associated to remote data

Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false
Returns
true if plan storage is associated to remote data

◆ resizePlan()

BoolResult ipsdk::image::DistributedPlanStorage::resizePlan ( const ImagePlanGeometry planGeometry)
protectedvirtual

resize plan storage in derived class

Returns
false in case of failure

Implements ipsdk::image::BasePlanStorage.

◆ readRawData()

BoolResult ipsdk::image::DistributedPlanStorage::readRawData ( const ipUInt64  startOffset,
const ipUInt64  size,
void *  pData 
) const
protectedvirtual

method allowing to read data from image storage

Returns
false in case of failure

Implements ipsdk::image::BasePlanStorage.

◆ readAreaData()

BoolResult ipsdk::image::DistributedPlanStorage::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 from ipsdk::image::BasePlanStorage.

◆ writeRawData()

BoolResult ipsdk::image::DistributedPlanStorage::writeRawData ( const ipUInt64  startOffset,
const ipUInt64  size,
const void *  pData 
)
protectedvirtual

method allowing to write data to image storage

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

Implements ipsdk::image::BasePlanStorage.

◆ writeAreaData()

BoolResult ipsdk::image::DistributedPlanStorage::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 from ipsdk::image::BasePlanStorage.

Member Data Documentation

◆ _locationMap

LocationMap ipsdk::image::DistributedPlanStorage::_locationMap
protected

collection associating a strip row starting offset with a socket guid allowing to locate associated data

◆ _bOwnData

bool ipsdk::image::DistributedPlanStorage::_bOwnData
protected

flag indicating whether data are own by storage. If this is the case, data must be deleted when storage is destroyed


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