libimage  0.25.4
 All Classes Namespaces Files Functions Variables Enumerations Macros Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Image Class Reference

#include <Image.h>

Inheritance diagram for Image:
Inheritance graph
Collaboration diagram for Image:
Collaboration graph

Public Member Functions

void makeMask ()
 Define the image as a mask.
int getWidth ()
 Return the image's width.
int getHeight ()
 Return the image's height.
void setBbox (BoundingBox< double > box)
 Define the image's bounding box and calculate resolutions.
bool setDimensions (int w, int h, BoundingBox< double > box, double rx, double ry)
 Define the image's bounding box and calculate resolutions.
BoundingBox< double > getBbox () const
 Return the image's bounding box.
void setCRS (CRS srs)
 Define the CRS of the image's bounding box.
CRS getCRS () const
 Return the image's bounding box's CRS.
double getXmin () const
 Return bounding box's xmin.
double getYmax () const
 Return bounding box's ymax.
double getXmax () const
 Return bounding box's xmax.
double getYmin () const
 Return bounding box's ymin.
double getResX () const
 Return the X wise resolution.
double getResY () const
 Return the Y wise resolution.
ImagegetMask ()
 Return the associated mask.
bool setMask (Image *newMask)
 Defined data mask and check consistency.
int x2c (double x)
 Conversion from terrain coordinate X to image column indice.
int y2l (double y)
 Conversion from terrain coordinate Y to image line indice.
double c2x (int c)
 Conversion from image column indice to terrain coordinate X (pixel's center)
double l2y (int l)
 Conversion from image line indice to terrain coordinate X (pixel's center)
double getPhaseX ()
 Phasis calculation, X wise.
double getPhaseY ()
 Phasis calculation, Y wise.
bool isCompatibleWith (Image *pImage)
 Determine compatibility with another image, comparing CRS, phasis and resolutions.
 Image (int width, int height, int channels, double resx, double resy, BoundingBox< double > bbox)
 Create an Image object, from all attributes.
 Image (int width, int height, int channels)
 Create an Image without providing georeferencement, neither resolutions nor bounding box.
 Image (int width, int height, int channels, BoundingBox< double > bbox)
 Create an Image without providing resolutions.
 Image (int width, int height, int channels, double resx, double resy)
 Create an Image object without providing bbox.
virtual int getline (uint8_t *buffer, int line)=0
virtual int getline (uint16_t *buffer, int line)=0
virtual int getline (float *buffer, int line)=0
virtual ~Image ()
 Default destructor.
virtual void print ()
 Image description output.
virtual void printTFW ()
 Image TFW output.

Static Public Member Functions

static bool dimensionsAreConsistent (double resolution_x, double resolution_y, int w, int h, BoundingBox< double > bounding_box)
 Check provided dimensions' consistency.

Public Attributes

const int channels
 Number of samples per pixel.

Protected Member Functions

void computeResolutions ()
 Resolutions calculation, from pixel size and bounding box.

Protected Attributes

int width
 Image's width, in pixel.
int height
 Image's height, in pixel.
bool isMask
 Is this image a mask ?
BoundingBox< double > bbox
 Image's bounding box.
CRS crs
 Bounding box's CRS.
Imagemask
 Mask associated to the image, optionnal.
double resx
 Image's resolution, X wise.
double resy
 Image's resolution, Y wise.

Detailed Description

Author
Institut national de l'information géographique et forestière

Constructor & Destructor Documentation

Image::Image ( int  width,
int  height,
int  channels,
double  resx,
double  resy,
BoundingBox< double >  bbox 
)
inline

Create an Image object, from all attributes.

Parameters
[in]widthimage width, in pixel
[in]heightimage height, in pixel
[in]channelnumber of samples per pixel
[in]resxX wise resolution
[in]resyY wise resolution
[in]bboxbounding box

Here is the call graph for this function:

Image::Image ( int  width,
int  height,
int  channels 
)
inline

Create an Image without providing georeferencement, neither resolutions nor bounding box.

Parameters
[in]widthimage width, in pixel
[in]heightimage height, in pixel
[in]channelnumber of samples per pixel
Image::Image ( int  width,
int  height,
int  channels,
BoundingBox< double >  bbox 
)
inline

Create an Image without providing resolutions.

Parameters
[in]widthimage width, in pixel
[in]heightimage height, in pixel
[in]channelnumber of samples per pixel
[in]bboxbounding box

Here is the call graph for this function:

Image::Image ( int  width,
int  height,
int  channels,
double  resx,
double  resy 
)
inline

Create an Image object without providing bbox.

Parameters
[in]widthimage width, in pixel
[in]heightimage height, in pixel
[in]channelnumber of samples per pixel
[in]resxX wise resolution
[in]resyY wise resolution

Member Function Documentation

double Image::c2x ( int  c)
inline

Conversion from image column indice to terrain coordinate X (pixel's center)

Parameters
[in]ccolumn
Returns
terrain coordinate X
static bool Image::dimensionsAreConsistent ( double  resolution_x,
double  resolution_y,
int  w,
int  h,
BoundingBox< double >  bounding_box 
)
inlinestatic

Check provided dimensions' consistency.

Parameters
[in]resolution_xImage's resolution, X wise
[in]resolution_yImage's resolution, Y wise
[in]wImage's width, in pixel
[in]hImage's height, in pixel
[in]bounding_boxImage's bounding box

Here is the caller graph for this function:

BoundingBox<double> Image::getBbox ( ) const
inline

Return the image's bounding box.

Returns
bounding box

Here is the caller graph for this function:

CRS Image::getCRS ( ) const
inline

Return the image's bounding box's CRS.

Returns
CRS

Here is the caller graph for this function:

int Image::getHeight ( )
inline

Return the image's height.

Returns
height

Here is the caller graph for this function:

Image* Image::getMask ( )
inline

Return the associated mask.

Returns
mask

Reimplemented in DecimatedImage.

Here is the caller graph for this function:

double Image::getPhaseX ( )
inline

Phasis calculation, X wise.

phases.png
Returns
X phasis

Here is the caller graph for this function:

double Image::getPhaseY ( )
inline

Phasis calculation, Y wise.

Returns
Y phasis

Here is the caller graph for this function:

double Image::getResX ( ) const
inline

Return the X wise resolution.

Returns
X resolution

Here is the caller graph for this function:

double Image::getResY ( ) const
inline

Return the Y wise resolution.

Returns
Y resolution

Here is the caller graph for this function:

int Image::getWidth ( )
inline

Return the image's width.

Returns
width

Here is the caller graph for this function:

double Image::getXmax ( ) const
inline

Return bounding box's xmax.

Returns
xmax

Here is the caller graph for this function:

double Image::getXmin ( ) const
inline

Return bounding box's xmin.

Returns
xmin

Here is the caller graph for this function:

double Image::getYmax ( ) const
inline

Return bounding box's ymax.

Returns
ymax

Here is the caller graph for this function:

double Image::getYmin ( ) const
inline

Return bounding box's ymin.

Returns
ymin

Here is the caller graph for this function:

bool Image::isCompatibleWith ( Image pImage)
inline

Determine compatibility with another image, comparing CRS, phasis and resolutions.

Parameters
[in]pImageimage to compare
Returns
compatibility

Here is the call graph for this function:

double Image::l2y ( int  l)
inline

Conversion from image line indice to terrain coordinate X (pixel's center)

Parameters
[in]lline
Returns
terrain coordinate Y
void Image::setBbox ( BoundingBox< double >  box)
inline

Define the image's bounding box and calculate resolutions.

Parameters
[in]boxImage's bounding box

Here is the call graph for this function:

void Image::setCRS ( CRS  srs)
inline

Define the CRS of the image's bounding box.

Parameters
[in]boxImage's bounding box

Here is the caller graph for this function:

bool Image::setDimensions ( int  w,
int  h,
BoundingBox< double >  box,
double  rx,
double  ry 
)
inline

Define the image's bounding box and calculate resolutions.

Parameters
[in]boxImage's bounding box
bool Image::setMask ( Image newMask)
inline

Defined data mask and check consistency.

Parameters
[in]newMaskMasque de donnée

Here is the call graph for this function:

Here is the caller graph for this function:

int Image::x2c ( double  x)
inline

Conversion from terrain coordinate X to image column indice.

Parameters
[in]xterrain coordinate X
Returns
column

Here is the caller graph for this function:

int Image::y2l ( double  y)
inline

Conversion from terrain coordinate Y to image line indice.

Parameters
[in]yterrain coordinate Y
Returns
line

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