SMIL  1.0.4
BaseImage Class Referenceabstract

Base Image class. More...

Detailed Description

Base Image class.

#include <DBaseImage.h>

+ Inheritance diagram for BaseImage:
+ Collaboration diagram for BaseImage:

Public Member Functions

size_t getWidth () const
 Get image width.
 
size_t getHeight () const
 Get image height.
 
size_t getDepth () const
 Get image depth (Z)
 
virtual size_t getAllocatedSize () const
 Get memory size (bytes)
 
UINT getDimension () const
 Get dimension (2D or 3D)
 
virtual RES_T setSize (size_t w, size_t h, size_t d=1, bool doAllocate=true)=0
 Set image size Set image size and allocate it if doAllocate is true.
 
void getSize (size_t *w, size_t *h, size_t *d) const
 Get image size.
 
void getSize (int *w, int *h, int *d) const
 Get image size.
 
void getSize (size_t s[3]) const
 Get image size.
 
void getSize (off_t s[3]) const
 Get image size.
 
void getSize (int s[3]) const
 Get image size.
 
size_t getPixelCount () const
 Get the number of pixels.
 
size_t getLineCount () const
 Get the number of lines.
 
size_t getSliceCount () const
 Get the number of slices(for 3D images)
 
bool isAllocated () const
 Check if the image is allocated.
 
virtual void * getVoidPointer ()=0
 Get the void* data array.
 
virtual void modified ()=0
 Trigger modified event.
 
bool areCoordsInImage (const off_t x, const off_t y, const off_t z=0) const
 areCoordsInImage() - checks if the triplet (x, y, z) in inside the image bounds. More...
 
bool areCoordsInImage (const size_t x, const size_t y, const size_t z=0) const
 areCoordsInImage() - checks if the triplet (x, y, z) in inside the image bounds. More...
 
bool isPointInImage (const IntPoint &p) const
 isPointInImage() - checks if a Point is in inside the image bounds. More...
 
bool isOffsetInImage (const off_t offset) const
 isOffsetInImage() - checks if a buffer offset in inside the image bounds. More...
 
bool isOffsetInImage (const size_t offset) const
 isOffsetInImage() - checks if a buffer offset in inside the image bounds. More...
 
size_t getOffsetFromCoords (size_t x, size_t y, size_t z=0) const
 Get an offset for given x,y(,z) coordinates.
 
size_t getOffsetFromPoint (IntPoint &p) const
 Get an offset for given x,y(,z) coordinates.
 
void getCoordsFromOffset (size_t off, size_t &x, size_t &y, size_t &z) const
 Get x,y(,z) coordinates for a given offset.
 
void getCoordsFromOffset (off_t off, off_t &x, off_t &y, off_t &z) const
 Get x,y(,z) coordinates for a given offset.
 
vector< size_t > getCoordsFromOffset (size_t off) const
 Get x,y(,z) coordinates for a given offset.
 
virtual const char * getInfoString (const char *="") const
 Get the description of the image.
 
virtual const char * getTypeAsString ()=0
 Get the type of the image as a string ("UINT8",...)
 
virtual bool isVisible ()
 Check if the image (viewer) is visible.
 
virtual void show (const char *=NULL, bool=false)
 Show the image (viewer)
 
virtual void showLabel (const char *=NULL)
 Show the image (viewer) as false colors.
 
virtual void hide ()=0
 Hide the image (viewer)
 
virtual RES_T load (const char *)
 Load from file.
 
virtual RES_T save (const char *)
 Save to file.
 
virtual BaseImageViewer * getViewer ()=0
 Get the viewer associated to the image.
 

Member Function Documentation

◆ areCoordsInImage() [1/2]

bool areCoordsInImage ( const off_t  x,
const off_t  y,
const off_t  z = 0 
) const
inline

areCoordsInImage() - checks if the triplet (x, y, z) in inside the image bounds.

Parameters
[in]x,y,z: coords of a point

◆ areCoordsInImage() [2/2]

bool areCoordsInImage ( const size_t  x,
const size_t  y,
const size_t  z = 0 
) const
inline

areCoordsInImage() - checks if the triplet (x, y, z) in inside the image bounds.

Parameters
[in]x,y,z: coords of a point

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ isPointInImage()

bool isPointInImage ( const IntPoint p) const
inline

isPointInImage() - checks if a Point is in inside the image bounds.

Parameters
[in]p: coords of a point

◆ isOffsetInImage() [1/2]

bool isOffsetInImage ( const off_t  offset) const
inline

isOffsetInImage() - checks if a buffer offset in inside the image bounds.

Parameters
[in]offset: offset of a point in the image buffer

◆ isOffsetInImage() [2/2]

bool isOffsetInImage ( const size_t  offset) const
inline

isOffsetInImage() - checks if a buffer offset in inside the image bounds.

Parameters
[in]offset: offset of a point in the image buffer

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