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

Base class for images data type. More...

#include <BaseImage.h>

Inheritance diagram for ipsdk::image::BaseImage:
ipsdk::BaseObjectWithSkeleton ipsdk::BaseSerializationObject ipsdk::BaseDynamicObject ipsdk::image::BaseCompleteImage ipsdk::image::SubImage ipsdk::image::CudaImage ipsdk::image::DiskImage ipsdk::image::DistributedImage ipsdk::image::MemoryImage ipsdk::image::UserImage ipsdk::python::PythonImage ipsdk::python::PythonCudaImage

Public Member Functions

virtual ~BaseImage ()=0
 destructor
 
virtual eImageBaseType getImageBaseType () const =0
 retrieve image type
 
virtual ipBool isGpuImage () const =0
 returns true if the image is loaded on GPU
 
virtual ipBool isDiskImage () const =0
 returns true if the image is a disk one
 
bool isInit () const
 retrieve object initialisation flag
 
virtual BoolResult init (const BaseImageGeometry &geometry)=0
 image initialization More...
 
void setScaleGeometricCalibration (const ipReal32 scale, const std::string &unitStr="")
 set geometric calibration associated to image by changing only the scale and the unit More...
 
void setScaleGeometricCalibration (const ipReal32 xScale, const ipReal32 yScale, const std::string &unitStr="")
 
void setScaleGeometricCalibration (const ipReal32 xScale, const ipReal32 yScale, const ipReal32 zScale, const std::string &unitStr="")
 
void setOrigin (const ipReal32 xOrigin, const ipReal32 yOrigin)
 set geometric calibration associated to image More...
 
void setOrigin (const ipReal32 xOrigin, const ipReal32 yOrigin, const ipReal32 zOrigin)
 
virtual eImageAccessMode getAccessMode () const =0
 retrieve image access mode More...
 
virtual bool hasRemoteStorage () const
 method allowing to check whether image is associated to remote data (data with remote storage) More...
 
bool hasBinary8BitsStorage () const
 method allowing to check whether image underlying storage stores binary data with a 8 bit alignment More...
 
bool hasByPlanDataAccess () const
 check whether all plans have contiguous access to full plan data More...
 
PlanStorageConstPtr getPlanStorage (const PlanIndex &planIndex) const
 
PlanStoragePtr getPlanStorage (const PlanIndex &planIndex)
 
const PlanStorageColl3dgetPlanStorageColl () const
 
std::string getUserPropertiesStr () const
 
void setUserPropertiesStr (const std::string &newStrUserProperties)
 
std::string getChannelName (const ipUInt64 c) const
 
void setChannelName (const std::string &strName, const ipUInt64 c)
 
bool minIsBlack () const
 Returns true if the minimum image value is assigned to black. More...
 
void clear ()
 clear of object data
 
Image identifier
const DataIdentifiergetIdentifier () const
 retrieve identifier associated to image More...
 
const DataIdentifierConstPtr getIdentifierPtr () const
 retrieve pointer to identifier associated to image More...
 
const GuidgetGuid () const
 access to image guid More...
 
const std::string & getName () const
 access to image name More...
 
Image header
bool existsHeaderKey (const std::string &key) const
 check whether a given key exists into header More...
 
ItemNames getHeaderKeys () const
 retrieve header key list More...
 
const BaseDataItemgetHeaderItem (const std::string &key) const
 retrieve a header item given associated key More...
 
DataItemConstPtr getHeaderItemPtr (const std::string &key) const
 retrieve a header item given associated key More...
 
DataItemMapConstPtr getHeaderPtr () const
 retrieve the header item map More...
 
Image Calibration
bool hasGeometricCalibration () const
 check whether image is associated to a geometric calibration More...
 
const GeometricCalibrationgetGeometricCalibration () const
 retrieve geometric calibration associated to image More...
 
const GeometricCalibrationConstPtrgetGeometricCalibrationConstPtr () const
 retrieve geometric calibration associated to image More...
 
void setGeometricCalibration (const GeometricCalibrationConstPtr &pGeometricCalibration)
 set geometric calibration associated to image More...
 
Image Geometry
const BaseImageGeometrygetGeometry () const
 retrieve image geometry More...
 
ImageGeometryConstPtr getGeometryPtr () const
 retrieve image geometry More...
 
ipUInt64 getSizeX () const
 retrieve geometry plan x size More...
 
ipUInt64 getSizeY () const
 retrieve geometry plan y size More...
 
const VolumeGeometrygetVolumeGeometry () const
 retrieve volume geometry (z) size and type More...
 
const eVolumeGeometryTypegetVolumeGeometryType () const
 retrieve volume geometry (z) type More...
 
ipUInt64 getSizeZ () const
 retrieve volume geometry (z) size More...
 
const ColorGeometrygetColorGeometry () const
 retrieve color geometry (c) size and type More...
 
const eColorGeometryTypegetColorGeometryType () const
 retrieve color geometry (c) type More...
 
ipUInt64 getSizeC () const
 retrieve color geometry (c) size More...
 
const TemporalGeometrygetTemporalGeometry () const
 retrieve temporal geometry (t) size and type More...
 
const eTemporalGeometryTypegetTemporalGeometryType () const
 retrieve temporal geometry (t) type More...
 
ipUInt64 getSizeT () const
 retrieve temporal geometry (t) size More...
 
ipUInt64 getNbTotPlans () const
 retrieve total number of plans for geometry More...
 
bool isValidPlanIdx (const ipUInt64 zPlanIdx, const ipUInt64 cPlanIdx, const ipUInt64 tPlanIdx) const
 check whether a given plan index is valid More...
 
bool isValidPlanIdx (const PlanIndex &planIdx) const
 check whether a given plan index is valid More...
 
const eImageBufferTypegetBufferType () const
 retrieve image data type More...
 
const eImageBufferTypegetBufferType (const ipUInt64 tPlanIdx) const
 retrieve image data type for a given temporal component More...
 
Other methods
void toGPU (CudaImagePtr pCudaImg) const
 Returns a copy of the image instance stored on NVidia device(s), specified by the input Cuda image.
 
CudaImagePtr toGPU () const
 Returns a copy of the image instance stored on NVidia device(s)
 
ipBool containSameData (const BaseImage &otherImage) const
 
void setVolumeGeometryType (const eVolumeGeometryType &vType)
 Setters of geometry types : More...
 
void setColorGeometryType (const eColorGeometryType &cType)
 Returns a copy of the image instance stored on NVidia device(s), specified by the input Cuda image.
 
void setTemporalGeometryType (const eTemporalGeometryType &tType)
 Returns a copy of the image instance stored on NVidia device(s), specified by the input Cuda image.
 
void setBufferType (const eImageBufferType &type)
 Returns a copy of the image instance stored on NVidia device(s), specified by the input Cuda image.
 
- 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

 BaseImage ()
 constructor
 
BoolResult initBase (const DataIdentifierConstPtr &pIdentifier, const DataItemMapConstPtr &pHeader, const ImageGeometryPtr &pGeometry, const PlanStorageColl3d &imagePlans)
 base class initialization method More...
 
void resizeBase (const ImageGeometryPtr &pGeometry, const PlanStorageColl3d &imagePlans)
 resize of image given a new geometry and a new image plan collection More...
 
virtual void clearDerived ()
 clear data in derived class
 
bool checkForRemoteStorage () const
 method allowing to check whether some plan storage are associated to remote storage More...
 
const PlanStorageColl3daccessImagePlans () const
 access to plan storage collection in derived class
 
PlanStorageColl3daccessImagePlans ()
 access to plan storage collection 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

struct SubImageExtractor
 
struct ImageStripExtractor
 
struct ImageTileExtractor
 

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 images data type.

Author
E. Noirfalise
Date
2013/8/21

Member Function Documentation

◆ init()

virtual BoolResult ipsdk::image::BaseImage::init ( const BaseImageGeometry geometry)
pure virtual

◆ getIdentifier()

const DataIdentifier& ipsdk::image::BaseImage::getIdentifier ( ) const

retrieve identifier associated to image

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

◆ getIdentifierPtr()

const DataIdentifierConstPtr ipsdk::image::BaseImage::getIdentifierPtr ( ) const

retrieve pointer to identifier associated to image

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

◆ getGuid()

const Guid& ipsdk::image::BaseImage::getGuid ( ) const

access to image guid

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

◆ getName()

const std::string& ipsdk::image::BaseImage::getName ( ) const

access to image name

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

◆ existsHeaderKey()

bool ipsdk::image::BaseImage::existsHeaderKey ( const std::string &  key) const

check whether a given key exists into header

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

◆ getHeaderKeys()

ItemNames ipsdk::image::BaseImage::getHeaderKeys ( ) const

retrieve header key list

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

◆ getHeaderItem()

const BaseDataItem& ipsdk::image::BaseImage::getHeaderItem ( const std::string &  key) const

retrieve a header item given associated key

Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false
ipsdk::IPSDKBaseDataExceptionif existsHeaderKey(key) == false

◆ getHeaderItemPtr()

DataItemConstPtr ipsdk::image::BaseImage::getHeaderItemPtr ( const std::string &  key) const

retrieve a header item given associated key

Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false
ipsdk::IPSDKBaseDataExceptionif existsHeaderKey(key) == false

◆ getHeaderPtr()

DataItemMapConstPtr ipsdk::image::BaseImage::getHeaderPtr ( ) const

retrieve the header item map

Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false
ipsdk::IPSDKBaseDataExceptionif existsHeaderKey(key) == false

◆ hasGeometricCalibration()

bool ipsdk::image::BaseImage::hasGeometricCalibration ( ) const

check whether image is associated to a geometric calibration

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

◆ getGeometricCalibration()

const GeometricCalibration& ipsdk::image::BaseImage::getGeometricCalibration ( ) const

retrieve geometric calibration associated to image

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

◆ getGeometricCalibrationConstPtr()

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

retrieve geometric calibration associated to image

Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false
Returns
a null shared pointer if not set

◆ setGeometricCalibration()

void ipsdk::image::BaseImage::setGeometricCalibration ( const GeometricCalibrationConstPtr pGeometricCalibration)

set geometric calibration associated to image

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

◆ setScaleGeometricCalibration()

void ipsdk::image::BaseImage::setScaleGeometricCalibration ( const ipReal32  scale,
const std::string &  unitStr = "" 
)

set geometric calibration associated to image by changing only the scale and the unit

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

◆ setOrigin()

void ipsdk::image::BaseImage::setOrigin ( const ipReal32  xOrigin,
const ipReal32  yOrigin 
)

set geometric calibration associated to image

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

◆ getGeometry()

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

retrieve image geometry

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

◆ getGeometryPtr()

ImageGeometryConstPtr ipsdk::image::BaseImage::getGeometryPtr ( ) const

retrieve image geometry

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

◆ getSizeX()

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

retrieve geometry plan x size

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

◆ getSizeY()

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

retrieve geometry plan y size

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

◆ getVolumeGeometry()

const VolumeGeometry& ipsdk::image::BaseImage::getVolumeGeometry ( ) const

retrieve volume geometry (z) size and type

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

◆ getVolumeGeometryType()

const eVolumeGeometryType& ipsdk::image::BaseImage::getVolumeGeometryType ( ) const

retrieve volume geometry (z) type

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

◆ getSizeZ()

ipUInt64 ipsdk::image::BaseImage::getSizeZ ( ) const

retrieve volume geometry (z) size

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

◆ getColorGeometry()

const ColorGeometry& ipsdk::image::BaseImage::getColorGeometry ( ) const

retrieve color geometry (c) size and type

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

◆ getColorGeometryType()

const eColorGeometryType& ipsdk::image::BaseImage::getColorGeometryType ( ) const

retrieve color geometry (c) type

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

◆ getSizeC()

ipUInt64 ipsdk::image::BaseImage::getSizeC ( ) const

retrieve color geometry (c) size

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

◆ getTemporalGeometry()

const TemporalGeometry& ipsdk::image::BaseImage::getTemporalGeometry ( ) const

retrieve temporal geometry (t) size and type

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

◆ getTemporalGeometryType()

const eTemporalGeometryType& ipsdk::image::BaseImage::getTemporalGeometryType ( ) const

retrieve temporal geometry (t) type

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

◆ getSizeT()

ipUInt64 ipsdk::image::BaseImage::getSizeT ( ) const

retrieve temporal geometry (t) size

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

◆ getNbTotPlans()

ipUInt64 ipsdk::image::BaseImage::getNbTotPlans ( ) const

retrieve total number of plans for geometry

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

◆ isValidPlanIdx() [1/2]

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

check whether a given plan index is valid

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

◆ isValidPlanIdx() [2/2]

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

check whether a given plan index is valid

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

◆ getBufferType() [1/2]

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

retrieve image data type

Note
a returned value of eImageBufferType::eIBT_None stands for heterogeneous buffer type (sequence case)
Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false

◆ getBufferType() [2/2]

const eImageBufferType& ipsdk::image::BaseImage::getBufferType ( const ipUInt64  tPlanIdx) const

retrieve image data type for a given temporal component

Exceptions
ipsdk::image::IPSDKImageExceptionif tPlanIdx >= getSizeT()

◆ getAccessMode()

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

◆ hasRemoteStorage()

virtual bool ipsdk::image::BaseImage::hasRemoteStorage ( ) const
virtual

method allowing to check whether image is associated to remote data (data with remote storage)

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

Reimplemented in ipsdk::image::DistributedImage, and ipsdk::image::SubImage.

◆ hasBinary8BitsStorage()

bool ipsdk::image::BaseImage::hasBinary8BitsStorage ( ) const

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

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

◆ hasByPlanDataAccess()

bool ipsdk::image::BaseImage::hasByPlanDataAccess ( ) const

check whether all plans have contiguous access to full plan data

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

◆ getPlanStorage()

PlanStorageConstPtr ipsdk::image::BaseImage::getPlanStorage ( const PlanIndex planIndex) const

retrieve plan storage associated to a given plan index

Exceptions
ipsdk::image::IPSDKImageExceptionif isValidPlanIdx(planIndex) == false

◆ getPlanStorageColl()

const PlanStorageColl3d& ipsdk::image::BaseImage::getPlanStorageColl ( ) const

retrieve plan storage collection

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

◆ getUserPropertiesStr()

std::string ipsdk::image::BaseImage::getUserPropertiesStr ( ) const

retrieve the image properties string

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

◆ setUserPropertiesStr()

void ipsdk::image::BaseImage::setUserPropertiesStr ( const std::string &  newStrUserProperties)

replace the image properties string

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

◆ getChannelName()

std::string ipsdk::image::BaseImage::getChannelName ( const ipUInt64  c) const

retrieve the name of the channel c

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

◆ setChannelName()

void ipsdk::image::BaseImage::setChannelName ( const std::string &  strName,
const ipUInt64  c 
)

replace the name of the channel c

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

◆ minIsBlack()

bool ipsdk::image::BaseImage::minIsBlack ( ) const

Returns true if the minimum image value is assigned to black.

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

◆ containSameData()

ipBool ipsdk::image::BaseImage::containSameData ( const BaseImage otherImage) const

returns true if the image provided as input parameters points to the same data that this image. This is tested by the pointer to the first plan buffer

◆ setVolumeGeometryType()

void ipsdk::image::BaseImage::setVolumeGeometryType ( const eVolumeGeometryType vType)

Setters of geometry types :

  • allow to switch from 3D to 2D if sizeZ == 1 or from 2D to 3D regardless of sizeZ
  • allow to switch from Color to Grey if sizeC == 1 or from Grey to Color regardless of sizeC
  • allow to switch from Sequence to Single if sizeT == 1 or from Single to Sequence regardless of sizeT
  • allow to switch between eIBT_Binary/eIBT_Label8/eIBT_Int8/eIBT_UInt8, eIBT_Label16/eIBT_Int16/eIBT_UInt16 or eIBT_Label32/eIBT_Int32/eIBT_UInt32
    Exceptions
    ipsdk::image::IPSDKImageExceptionif isInit() == false

◆ initBase()

BoolResult ipsdk::image::BaseImage::initBase ( const DataIdentifierConstPtr pIdentifier,
const DataItemMapConstPtr pHeader,
const ImageGeometryPtr pGeometry,
const PlanStorageColl3d imagePlans 
)
protected

base class initialization method

Warning
there is no check on geometry/image plans consistency
there is no check on shared pointer validity and initialization
Returns
false in case of failure

◆ resizeBase()

void ipsdk::image::BaseImage::resizeBase ( const ImageGeometryPtr pGeometry,
const PlanStorageColl3d imagePlans 
)
protected

resize of image given a new geometry and a new image plan collection

Warning
there is no check on geometry/image plans consistency
Exceptions
ipsdk::image::IPSDKImageExceptionif isInit() == false

◆ checkForRemoteStorage()

bool ipsdk::image::BaseImage::checkForRemoteStorage ( ) const
protected

method allowing to check whether some plan storage are associated to remote storage

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

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