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

Image class with data stored into memory. More...

#include <MemoryImage.h>

Inheritance diagram for ipsdk::image::MemoryImage:
ipsdk::image::BaseCompleteImage ipsdk::image::BaseImage ipsdk::BaseObjectWithSkeleton ipsdk::BaseSerializationObject ipsdk::BaseDynamicObject

Public Member Functions

 ~MemoryImage ()
 destructor
 
eImageType getImageType () const
 retrieve image type
 
ipBool isGpuImage () const
 returns true if the image is loaded on GPU
 
ipBool isDiskImage () const
 returns true if the image is a disk one
 
virtual BoolResult init (const BaseImageGeometry &geometry)
 image initialization More...
 
eImageAccessMode getAccessMode () const
 retrieve image access mode More...
 
BoolResult resize (const BaseImageGeometry &geometry)
 resize of image given a new geometry More...
 
const void * getDataPtr (const ipUInt64 zPlanIdx, const ipUInt64 cPlanIdx, const ipUInt64 tPlanIdx) const
 retrieve buffer associated to image for a given plan index More...
 
void * getDataPtr (const ipUInt64 zPlanIdx, const ipUInt64 cPlanIdx, const ipUInt64 tPlanIdx)
 
const void * getDataPtr (const PlanIndex &planIndex) const
 retrieve buffer associated to image for a given plan index More...
 
void * getDataPtr (const PlanIndex &planIndex)
 retrieve buffer associated to image for a given plan index More...
 
- Public Member Functions inherited from ipsdk::image::BaseCompleteImage
virtual ~BaseCompleteImage ()=0
 destructor
 
eImageBaseType getImageBaseType () const
 retrieve image type
 
void setName (const std::string &imageName)
 access to image name More...
 
BaseDataItemgetHeaderItem (const std::string &key)
 retrieve a header item given associated key More...
 
void addHeaderItem (const std::string &key, const DataItemPtr &pItem)
 add data item to header given associated key More...
 
void removeHeaderItem (const std::string &key)
 remove item from header given associated key More...
 
void clearHeader ()
 remove all items from header More...
 
- Public Member Functions inherited from ipsdk::image::BaseImage
virtual ~BaseImage ()=0
 destructor
 
bool isInit () const
 retrieve object initialisation flag
 
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 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
 
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...
 
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...
 
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...
 
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...
 
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
 

Static Public Attributes

static const eImageType::domain g_imageType = eImageType::eIT_Memory
 type associated to attribute
 
- Static Public Attributes inherited from ipsdk::image::BaseCompleteImage
static const eImageBaseType::domain g_imageBaseType = eImageBaseType::eIBT_Complete
 type associated to attribute
 

Protected Member Functions

 MemoryImage ()
 constructor
 
BoolResult createImagePlans (const BaseImageGeometry &geometry, PlanStorageColl3d &imagePlans)
 method allowing to create image plan collection from a geometry More...
 
- Protected Member Functions inherited from ipsdk::image::BaseCompleteImage
 BaseCompleteImage ()
 constructor
 
BoolResult initBase (const ImageGeometryPtr &pGeometry, const PlanStorageColl3d &imagePlans)
 base class initialization method More...
 
DataIdentifierConstPtr getIdentifier () const
 method allowing to access to image identifier
 
virtual void clearDerived ()
 clear data in derived class
 
- Protected Member Functions inherited from ipsdk::image::BaseImage
 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...
 
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

boost::shared_ptr< MemoryImageboost::make_shared ()
 

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::image::BaseCompleteImage
DataIdentifierPtr _pIdentifier
 image identifier
 
DataItemMapPtr _pHeader
 image header
 
- Protected Attributes inherited from ipsdk::BaseObjectWithSkeleton
eSklSrzMode _sklSrzMode
 serialization flag for object More...
 

Detailed Description

Image class with data stored into memory.

Author
E. Noirfalise
Date
2013/8/22

Member Function Documentation

◆ init()

virtual BoolResult ipsdk::image::MemoryImage::init ( const BaseImageGeometry geometry)
virtual

image initialization

Returns
false in case of failure

Implements ipsdk::image::BaseImage.

◆ getAccessMode()

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

retrieve image access mode

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

Implements ipsdk::image::BaseImage.

◆ resize()

BoolResult ipsdk::image::MemoryImage::resize ( const BaseImageGeometry geometry)
virtual

resize of image given a new geometry

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

Implements ipsdk::image::BaseCompleteImage.

◆ getDataPtr() [1/3]

const void* ipsdk::image::MemoryImage::getDataPtr ( const PlanIndex planIndex) const

retrieve buffer associated to image for a given plan index

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

◆ getDataPtr() [2/3]

void* ipsdk::image::MemoryImage::getDataPtr ( const PlanIndex planIndex)

retrieve buffer associated to image for a given plan index

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

◆ getDataPtr() [3/3]

const void* ipsdk::image::MemoryImage::getDataPtr ( const ipUInt64  zPlanIdx,
const ipUInt64  cPlanIdx,
const ipUInt64  tPlanIdx 
) const

retrieve buffer associated to image for a given plan index

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

◆ createImagePlans()

BoolResult ipsdk::image::MemoryImage::createImagePlans ( const BaseImageGeometry geometry,
PlanStorageColl3d imagePlans 
)
protected

method allowing to create image plan collection from a geometry

Returns
false in case of failure

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