| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions
TeMrSIDReader Class Reference

A reader to a MrSID image. More...

`#include <TeMrSID.h>`

List of all members.

## Public Types

enum | ColorModel { ColorModelUnknown, ColorModelGray, ColorModelMap, ColorModelRGB, ColorModelRGBA }
| Color models from MrSID encoding system. More...

## Public Member Functions

| TeMrSIDReader (const std::string &fname)
| Constructor.
| ~TeMrSIDReader ()
| Destructor.
std::string | fileName () const
| Returns the image filename associated to this reader.
ColorModel | getColorModel ()
| Returns the color model of the image.
int | nBands () const
| Returns the number of bands in the image.
unsigned int | bitsPerPixel () const
| Returns the number of bits per pixel of the image.
unsigned int | getWidth ()
| Returns the width of the image in pixels.
unsigned int | getHeight ()
| Returns the height of the image in pixels.
void | getDimensions (unsigned int &width, unsigned int &height)
| Returns the dimensions of the image.
bool | hasWorldInfo ()
| Checks if the imagem has world navigation information.
double | originX ()
| Gets the upper-left X position.
double | originY ()
| Gets the upper-left Y position.
void | getOrigin (double &x, double &y)
| Gets the (X,Y) coordinate of the upper-left position.
double | resX ()
| Returns the X resolution.
double | resY ()
| Returns the Y resolution.
void | getResolution (double &rx, double &ry)
| Returns the X and Y resolutions.
void | getWorld (double &x0, double &y0, double &x1, double &y1)
| Gets the box of the image.
void | getBoundingBox (double &xmin, double &ymin, double &xmax, double &ymax)
| Gets the bounding box of the image.
void | getNavigationParameters (std::vector< double > &nwf)
| Gets all the coordinate information.
void | world2Pixel (double wx, double wy, int &ix, int &iy)
| Converts a geo coordinate to pixel coordinate.
void | pixel2World (int ix, int iy, double &wx, double &wy)
| Converts a pixel coordinate to geo coordinate.
int | getBestResolutionLevel (unsigned int w, unsigned int h, double x0, double y0, double x1, double y1)
int | getWorstResolutionLevel (unsigned int w, unsigned int h, double x0, double y0, double x1, double y1)
int | getProxResolutionLevel (unsigned int w, unsigned int h, double x0, double y0, double x1, double y1)
int | bestResolution (double res)
bool | selectArea (int lev, double &x0, double &y0, double &x1, double &y1)
| Selects an area in a given level of the image.
int | getSelectedAreaWidth ()
| Returns the width in pixels, of the area selected.
int | getSelectedAreaHeight ()
| Returns the height in pixels, of the area selected.
bool | getSelectedAreaData (unsigned char *&data)
| Returns the selected area in a buffer of char.
bool | getNoDataPixel (std::vector< double > &nodata)
| Returns true, and the values, if there is a specification for a no data value.
int | getNumLevels ()
| Returns the number of levels in the image.
bool | zoomTo (int level)
| Zoom the image to a given level.
bool | getMaxValues (std::vector< double > &maxvalues)
| Returns true, and the values, if there is a specification for a max value.
bool | getMinValues (std::vector< double > &minvalues)
| Returns true, and the values, if there is a specification for a min value.

## Detailed Description

A reader to a MrSID image.

This class uses the SDK provided by LizardTech to built a MrSID image reader support. This class is used by TeDecoderMrSID and shouldn't be used directly.

See also:
  TeDecoderMrSID

## Member Enumeration Documentation

enum TeMrSIDReader::ColorModel

Color models from MrSID encoding system.

Enumerator:

  ColorModelUnknown | unknown color model
  ColorModelGray | gray scale, composed by one 8 bit channel
  ColorModelMap | indexed , composed by one 8 bit channel and a palette
  ColorModelRGB | composed by three 8 bit channels
  ColorModelRGBA | composed by four 8 bit channels

## Constructor & Destructor Documentation

TeMrSIDReader::TeMrSIDReader | ( | const std::string & | fname | ) |

Constructor.

TeMrSIDReader::~TeMrSIDReader | ( |  | ) |

Destructor.

## Member Function Documentation

int TeMrSIDReader::bestResolution | ( | double | res | ) |

Returns the level that corresponds to the closest resolution to the resolution given

unsigned int TeMrSIDReader::bitsPerPixel | ( |  | ) | const

Returns the number of bits per pixel of the image.

std::string TeMrSIDReader::fileName | ( |  | ) | const`[inline]`

Returns the image filename associated to this reader.

int TeMrSIDReader::getBestResolutionLevel | ( | unsigned int | w,
|  | unsigned int | h,
|  | double | x0,
|  | double | y0,
|  | double | x1,
|  | double | y1
| ) |  |

Returns the level that corresponds to a resolution >= than the resolution defined by a given box an a dimension

void TeMrSIDReader::getBoundingBox | ( | double & | xmin,
|  | double & | ymin,
|  | double & | xmax,
|  | double & | ymax
| ) |  |

Gets the bounding box of the image.

TeMrSIDReader::ColorModel TeMrSIDReader::getColorModel | ( |  | ) |

Returns the color model of the image.

void TeMrSIDReader::getDimensions | ( | unsigned int & | width,
|  | unsigned int & | height
| ) |  | `[inline]`

Returns the dimensions of the image.

Inline Methods.

unsigned int TeMrSIDReader::getHeight | ( |  | ) |

Returns the height of the image in pixels.

bool TeMrSIDReader::getMaxValues | ( | std::vector< double > & | maxvalues | ) |

Returns true, and the values, if there is a specification for a max value.

bool TeMrSIDReader::getMinValues | ( | std::vector< double > & | minvalues | ) |

Returns true, and the values, if there is a specification for a min value.

void TeMrSIDReader::getNavigationParameters | ( | std::vector< double > & | nwf | ) |

Gets all the coordinate information.

bool TeMrSIDReader::getNoDataPixel | ( | std::vector< double > & | nodata | ) |

Returns true, and the values, if there is a specification for a no data value.

Returns true if there is a specification for a no data value.

int TeMrSIDReader::getNumLevels | ( |  | ) |

Returns the number of levels in the image.

void TeMrSIDReader::getOrigin | ( | double & | x,
|  | double & | y
| ) |  | `[inline]`

Gets the (X,Y) coordinate of the upper-left position.

int TeMrSIDReader::getProxResolutionLevel | ( | unsigned int | w,
|  | unsigned int | h,
|  | double | x0,
|  | double | y0,
|  | double | x1,
|  | double | y1
| ) |  |

Returns the level that corresponds to the closest resolution to the resolution defined by a given box an a dimension

void TeMrSIDReader::getResolution | ( | double & | rx,
|  | double & | ry
| ) |  | `[inline]`

Returns the X and Y resolutions.

bool TeMrSIDReader::getSelectedAreaData | ( | unsigned char *& | data | ) |

Returns the selected area in a buffer of char.

int TeMrSIDReader::getSelectedAreaHeight | ( |  | ) |

Returns the height in pixels, of the area selected.

int TeMrSIDReader::getSelectedAreaWidth | ( |  | ) |

Returns the width in pixels, of the area selected.

unsigned int TeMrSIDReader::getWidth | ( |  | ) |

Returns the width of the image in pixels.

void TeMrSIDReader::getWorld | ( | double & | x0,
|  | double & | y0,
|  | double & | x1,
|  | double & | y1
| ) |  |

Gets the box of the image.

int TeMrSIDReader::getWorstResolutionLevel | ( | unsigned int | w,
|  | unsigned int | h,
|  | double | x0,
|  | double | y0,
|  | double | x1,
|  | double | y1
| ) |  |

Returns the level that corresponds to a resolution <= than the resolution defined by a given box an a dimension

bool TeMrSIDReader::hasWorldInfo | ( |  | ) |

Checks if the imagem has world navigation information.

int TeMrSIDReader::nBands | ( |  | ) | const

Returns the number of bands in the image.

double TeMrSIDReader::originX | ( |  | ) |

Gets the upper-left X position.

double TeMrSIDReader::originY | ( |  | ) |

Gets the upper-left Y position.

void TeMrSIDReader::pixel2World | ( | int | ix,
|  | int | iy,
|  | double & | wx,
|  | double & | wy
| ) |  |

Converts a pixel coordinate to geo coordinate.

double TeMrSIDReader::resX | ( |  | ) |

Returns the X resolution.

double TeMrSIDReader::resY | ( |  | ) |

Returns the Y resolution.

bool TeMrSIDReader::selectArea | ( | int | lev,
|  | double & | x0,
|  | double & | y0,
|  | double & | x1,
|  | double & | y1
| ) |  |

Selects an area in a given level of the image.

void TeMrSIDReader::world2Pixel | ( | double | wx,
|  | double | wy,
|  | int & | ix,
|  | int & | iy
| ) |  |

Converts a geo coordinate to pixel coordinate.

bool TeMrSIDReader::zoomTo | ( | int | level | ) |

Zoom the image to a given level.

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

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/MrSID/TeMrSID.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/MrSID/TeMrSID.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines