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

Base class for image accessors. More...

#include <BaseImageAccessor.h>

Inheritance diagram for ipsdk::image::BaseImageAccessor:
ipsdk::BaseSerializationObject ipsdk::BaseDynamicObject ipsdk::image::BaseDiskImageAccessor ipsdk::image::BaseUserImageAccessor ipsdk::image::AutoDiskImageAccessor ipsdk::image::file::Im6ImageFile ipsdk::image::file::RawImageFile ipsdk::image::file::TiffImageFile ipsdk::image::MultiFileDiskImageAccessor ipsdk::python::PythonImageAccessor

Public Member Functions

bool isInit () const
 retrieve object initialisation flag
 
const eImageAccessModegetAccessMode () const
 retrieve user image access mode More...
 
const BaseImageGeometrygetGeometry () const
 retrieve geometry associated to image file More...
 
const GeometricCalibrationConstPtrgetGeometricCalibrationConstPtr () const
 retrieve geometric calibration associated to image 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 BaseImageGeometry &imageGeometry)
 resize image file given a geometry More...
 
void clear ()
 clear of object data
 
Constructors and destructors
 BaseImageAccessor ()
 
virtual ~BaseImageAccessor ()=0
 
bool isValidPlanIdx (const ipUInt64 zPlanIdx, const ipUInt64 cPlanIdx, const ipUInt64 tPlanIdx) const
 
bool isValidPlanIdx (const PlanIndex &planIdx) const
 
BoolResult readRaw (const ipUInt64 zPlanIdx, const ipUInt64 cPlanIdx, const ipUInt64 tPlanIdx, const ipUInt64 pixelStartOffset, const ipUInt64 nbPixels, void *pData) const
 read raw data segment from file More...
 
BoolResult readRaw (const PlanIndex &planIdx, const ipUInt64 pixelStartOffset, const ipUInt64 nbPixels, void *pData) const
 read raw data segment from file More...
 
BoolResult writeRaw (const ipUInt64 zPlanIdx, const ipUInt64 cPlanIdx, const ipUInt64 tPlanIdx, const ipUInt64 pixelStartOffset, const ipUInt64 nbPixels, const void *pData)
 write raw data segment to file More...
 
BoolResult writeRaw (const PlanIndex &planIdx, const ipUInt64 pixelStartOffset, const ipUInt64 nbPixels, const void *pData)
 write raw data segment to file More...
 
- 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

virtual std::string getImageInfoStr () const =0
 retrieve image information string in derived class More...
 
ImageGeometryPtr getGeometryPtr ()
 retrieve geometry pointer associated to user image More...
 
void initBase (const eImageAccessMode &accessMode, const BaseImageGeometry &geometry, const GeometricCalibrationConstPtr &pGeometricCalibration)
 base class initialization method More...
 
virtual BoolResult resizeData (const BaseImageGeometry &geometry)=0
 resize user image given a geometry More...
 
virtual BoolResult readRawData (const ipUInt64 zPlanIdx, const ipUInt64 cPlanIdx, const ipUInt64 tPlanIdx, const ipUInt64 pixelsStartOffset, const ipUInt64 nbPixels, void *pData) const =0
 read row data segment from user image More...
 
virtual BoolResult writeRawData (const ipUInt64 zPlanIdx, const ipUInt64 cPlanIdx, const ipUInt64 tPlanIdx, const ipUInt64 pixelsStartOffset, const ipUInt64 nbPixels, const void *pData)=0
 write row data segment to user image More...
 
virtual void clearDerived ()=0
 clear 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
 

Protected Attributes

eImageAccessMode _accessMode
 file access mode associated to manager
 
ImageGeometryPtr _pGeometry
 geometry associated to file
 
GeometricCalibrationConstPtr _pGeometricCalibration
 geometric calibration associated to image
 
bool _bInit
 object initialization flag
 

Friends

class DiskImage
 
class DiskPlanStorage
 
class UserImage
 
class UserPlanStorage
 

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

Base class for image accessors.

Author
E. Noirfalise
Date
2013/10/14

Member Function Documentation

◆ getAccessMode()

const eImageAccessMode& ipsdk::image::BaseImageAccessor::getAccessMode ( ) const

retrieve user image access mode

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

◆ getGeometry()

const BaseImageGeometry& ipsdk::image::BaseImageAccessor::getGeometry ( ) const

retrieve geometry associated to image file

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

◆ getGeometricCalibrationConstPtr()

const GeometricCalibrationConstPtr& ipsdk::image::BaseImageAccessor::getGeometricCalibrationConstPtr ( ) const

retrieve geometric calibration associated to image

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

◆ hasBinary8BitsStorage()

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

◆ isValidPlanIdx() [1/2]

bool ipsdk::image::BaseImageAccessor::isValidPlanIdx ( const ipUInt64  zPlanIdx,
const ipUInt64  cPlanIdx,
const ipUInt64  tPlanIdx 
) const

check whether plan indexes are valid given geometry

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

◆ isValidPlanIdx() [2/2]

bool ipsdk::image::BaseImageAccessor::isValidPlanIdx ( const PlanIndex planIdx) const

check whether plan indexes are valid given geometry

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

◆ resize()

BoolResult ipsdk::image::BaseImageAccessor::resize ( const BaseImageGeometry imageGeometry)

resize image file given a geometry

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

◆ readRaw() [1/2]

BoolResult ipsdk::image::BaseImageAccessor::readRaw ( const ipUInt64  zPlanIdx,
const ipUInt64  cPlanIdx,
const ipUInt64  tPlanIdx,
const ipUInt64  pixelStartOffset,
const ipUInt64  nbPixels,
void *  pData 
) const

read raw data segment from file

Parameters
zPlanIdxz plan index for data access
cPlanIdxc plan index for data access
tPlanIdxt plan index for data access
pixelStartOffsetpixel start offset for data in file
nbPixelsnumber of pixels to be processed
pDatapointer to buffer filed from image file data
Exceptions
ipsdk::image::IPSDKImageExceptionif isValidPlanIdx(zPlanIdx, cPlanIdx, tPlanIdx) == false

◆ readRaw() [2/2]

BoolResult ipsdk::image::BaseImageAccessor::readRaw ( const PlanIndex planIdx,
const ipUInt64  pixelStartOffset,
const ipUInt64  nbPixels,
void *  pData 
) const

read raw data segment from file

Parameters
zPlanIdxz plan index for data access
cPlanIdxc plan index for data access
tPlanIdxt plan index for data access
pixelStartOffsetpixel start offset for data in file
nbPixelsnumber of pixels to be processed
pDatapointer to buffer filed from image file data
Exceptions
ipsdk::image::IPSDKImageExceptionif isValidPlanIdx(zPlanIdx, cPlanIdx, tPlanIdx) == false

◆ writeRaw() [1/2]

BoolResult ipsdk::image::BaseImageAccessor::writeRaw ( const ipUInt64  zPlanIdx,
const ipUInt64  cPlanIdx,
const ipUInt64  tPlanIdx,
const ipUInt64  pixelStartOffset,
const ipUInt64  nbPixels,
const void *  pData 
)

write raw data segment to file

Parameters
zPlanIdxz plan index for data access
cPlanIdxc plan index for data access
tPlanIdxt plan index for data access
pixelStartOffsetpixel start offset for data in file
nbPixelsnumber of pixels to be processed
pDatapointer to buffer used to write image file data
Exceptions
ipsdk::image::IPSDKImageExceptionif isValidPlanIdx(zPlanIdx, cPlanIdx, tPlanIdx) == false
ipsdk::image::IPSDKImageExceptionif getAccessMode() == eImageAccessMode::eIAM_Read

◆ writeRaw() [2/2]

BoolResult ipsdk::image::BaseImageAccessor::writeRaw ( const PlanIndex planIdx,
const ipUInt64  pixelStartOffset,
const ipUInt64  nbPixels,
const void *  pData 
)

write raw data segment to file

Parameters
zPlanIdxz plan index for data access
cPlanIdxc plan index for data access
tPlanIdxt plan index for data access
pixelStartOffsetpixel start offset for data in file
nbPixelsnumber of pixels to be processed
pDatapointer to buffer used to write image file data
Exceptions
ipsdk::image::IPSDKImageExceptionif isValidPlanIdx(zPlanIdx, cPlanIdx, tPlanIdx) == false
ipsdk::image::IPSDKImageExceptionif getAccessMode() == eImageAccessMode::eIAM_Read

◆ getImageInfoStr()

virtual std::string ipsdk::image::BaseImageAccessor::getImageInfoStr ( ) const
protectedpure virtual

retrieve image information string in derived class

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

Implemented in ipsdk::image::BaseUserImageAccessor, and ipsdk::image::BaseDiskImageAccessor.

◆ getGeometryPtr()

ImageGeometryPtr ipsdk::image::BaseImageAccessor::getGeometryPtr ( )
protected

retrieve geometry pointer associated to user image

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

◆ initBase()

void ipsdk::image::BaseImageAccessor::initBase ( const eImageAccessMode accessMode,
const BaseImageGeometry geometry,
const GeometricCalibrationConstPtr pGeometricCalibration 
)
protected

base class initialization method

Parameters
accessModeread/write/resize access mode for user image
geometryunderlying geometry for image

◆ resizeData()

virtual BoolResult ipsdk::image::BaseImageAccessor::resizeData ( const BaseImageGeometry geometry)
protectedpure virtual

◆ readRawData()

virtual BoolResult ipsdk::image::BaseImageAccessor::readRawData ( const ipUInt64  zPlanIdx,
const ipUInt64  cPlanIdx,
const ipUInt64  tPlanIdx,
const ipUInt64  pixelsStartOffset,
const ipUInt64  nbPixels,
void *  pData 
) const
protectedpure virtual

read row data segment from user image

Parameters
zPlanIdxz plan index for data access
cPlanIdxc plan index for data access
tPlanIdxt plan index for data access
pixelsStartOffsetpixel start offset for data in user image
nbPixelsnumber of pixels to be processed
pDatapointer to buffer filed from user image data

Implemented in ipsdk::image::file::TiffImageFile, ipsdk::image::file::RawImageFile, ipsdk::image::BaseUserImageAccessor, ipsdk::image::file::Im6ImageFile, ipsdk::python::PythonImageAccessor, ipsdk::image::AutoDiskImageAccessor, and ipsdk::image::MultiFileDiskImageAccessor.

◆ writeRawData()

virtual BoolResult ipsdk::image::BaseImageAccessor::writeRawData ( const ipUInt64  zPlanIdx,
const ipUInt64  cPlanIdx,
const ipUInt64  tPlanIdx,
const ipUInt64  pixelsStartOffset,
const ipUInt64  nbPixels,
const void *  pData 
)
protectedpure virtual

write row data segment to user image

Parameters
zPlanIdxz plan index for data access
cPlanIdxc plan index for data access
tPlanIdxt plan index for data access
pixelsStartOffsetpixel start offset for data in user image
nbPixelsnumber of pixels to be processed
pDatapointer to buffer used to write user image data

Implemented in ipsdk::image::file::TiffImageFile, ipsdk::image::BaseUserImageAccessor, ipsdk::image::file::RawImageFile, ipsdk::image::file::Im6ImageFile, ipsdk::python::PythonImageAccessor, ipsdk::image::AutoDiskImageAccessor, and ipsdk::image::MultiFileDiskImageAccessor.


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