| 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 | Protected Member Functions | Protected Attributes
TePDIJointHistogram Class Reference
Image processing auxiliary classes/methods.

Raster joint histogram. More...

`#include <TePDIJointHistogram.hpp>`

List of all members.

## Public Types

typedef std::map< std::pair < double, double >, unsigned int > | ConteinerT
| Joint histogram container type definition.
typedef ConteinerT::iterator | iterator
| Iterator type definition.
typedef ConteinerT::const_iterator | const_iterator
| Const-Iterator type definition.

## Public Member Functions

| TePDIJointHistogram ()
| TePDIJointHistogram (const TePDIJointHistogram &external)
| ~TePDIJointHistogram ()
const TePDIJointHistogram & | operator= (const TePDIJointHistogram &external)
void | toggleProgress (bool enabled)
| Enable / Disable the progress interface.
bool | update (TeRaster &inputRaster1, unsigned int inputRasterChn1, TeRaster &inputRaster2, unsigned int inputRasterChn2, TeStrategicIterator iterStrat, unsigned int levels, const TePolygonSet &restricPolSet=TePolygonSet())
| Update the current histogram reading data from the supplied rasters.
void | clear ()
| Clear the current histogram contents.
const TePDIHistogram & | getRaster1Hist () const
| Return a reference to raster 1 histogram.
const TePDIHistogram & | getRaster2Hist () const
| Return a reference to raster 2 histogram.
const_iterator | begin () const
| Returns an iterator pointing to the beginning of the joint histogram.
const_iterator | end () const
| Returns an iterator pointing to the end of the joint histogram.
unsigned int | size () const
| Returns the histogram size.
void | getInverseJHist (TePDIJointHistogram &external)
| Generate a inversed joint histogram from the current one.
unsigned long int | getFreqSum () const
| Returns the sum of all pixel velues frequencies.
std::string | toString () const
| Ouput histogram to string.

## Protected Member Functions

bool | updateFloat (TeRaster &inputRaster1, unsigned int inputRasterChn1, TeRaster &inputRaster2, unsigned int inputRasterChn2, TeStrategicIterator iterStrat, unsigned int levels, const TePolygonSet &restricPolSet)
bool | updateInteger (TeRaster &inputRaster1, unsigned int inputRasterChn1, TeRaster &inputRaster2, unsigned int inputRasterChn2, TeStrategicIterator iterStrat, const TePolygonSet &restricPolSet)
bool | update8Bits (TeRaster &inputRaster1, unsigned int inputRasterChn1, TeRaster &inputRaster2, unsigned int inputRasterChn2, TeStrategicIterator iterStrat, const TePolygonSet &restricPolSet)
unsigned long int | getProgressSteps (const TePolygonSet &polset, double resy)
| Calculate the number of progress steps when using a polygon iterator over a raster for the supplied polygon set.
void | clearTempHistBuffers ()
| Clear the internal temporary histogram buffers ( init_jhist_, init_jhist_lines_, init_jhist_cols_, init_r1hist_, init_r2hist_.

## Protected Attributes

bool | progressEnabled_
| Progress enabled flag.
ConteinerT | jHistContainer_
| Internal container.
TePDIHistogram | r1Histogram_
| Raster1 histogram.
TePDIHistogram | r2Histogram_
| Raster2 histogram.
unsigned int ** | init_jhist_
unsigned int | init_jhist_lines_
unsigned int | init_jhist_cols_
unsigned int * | init_r1hist_
unsigned int * | init_r2hist_

## Detailed Description

Raster joint histogram.

Author:
  Emiliano F. Castejon <castejon@dpi.inpe.br>

Examples:

  TePDIJointHistogram_test.cpp.

## Member Typedef Documentation

typedef ConteinerT::const_iterator TePDIJointHistogram::const_iterator

Const-Iterator type definition.

typedef std::map< std::pair< double, double >, unsigned int > TePDIJointHistogram::ConteinerT

Joint histogram container type definition.

typedef ConteinerT::iterator TePDIJointHistogram::iterator

Iterator type definition.

## Constructor & Destructor Documentation

TePDIJointHistogram::TePDIJointHistogram | ( |  | ) |

TePDIJointHistogram::TePDIJointHistogram | ( | const TePDIJointHistogram & | external | ) |

TePDIJointHistogram::~TePDIJointHistogram | ( |  | ) |

## Member Function Documentation

TePDIJointHistogram::const_iterator TePDIJointHistogram::begin | ( |  | ) | const

Returns an iterator pointing to the beginning of the joint histogram.

void TePDIJointHistogram::clear | ( |  | ) |

Clear the current histogram contents.

void TePDIJointHistogram::clearTempHistBuffers | ( |  | ) | `[protected]`

Clear the internal temporary histogram buffers ( init_jhist_, init_jhist_lines_, init_jhist_cols_, init_r1hist_, init_r2hist_.

TePDIJointHistogram::const_iterator TePDIJointHistogram::end | ( |  | ) | const

Returns an iterator pointing to the end of the joint histogram.

unsigned long int TePDIJointHistogram::getFreqSum | ( |  | ) | const

Returns the sum of all pixel velues frequencies.

Returns:
  The sum of all pixel velues frequencies.

void TePDIJointHistogram::getInverseJHist | ( | TePDIJointHistogram & | external | ) |

Generate a inversed joint histogram from the current one.

Parameters:

  external | A external output histogram.

Note:
  The inversed histogram has swapped raster1 and raster2 values.

unsigned long int TePDIJointHistogram::getProgressSteps | ( | const TePolygonSet & | polset,
|  | double | resy
| ) |  | `[protected]`

Calculate the number of progress steps when using a polygon iterator over a raster for the supplied polygon set.

Parameters:

  polset | The polygon set.
  resy | Y axis resolution.

const TePDIHistogram & TePDIJointHistogram::getRaster1Hist | ( |  | ) | const

Return a reference to raster 1 histogram.

Returns:
  A reference to raster 1 histogram.

const TePDIHistogram & TePDIJointHistogram::getRaster2Hist | ( |  | ) | const

Return a reference to raster 2 histogram.

Returns:
  A reference to raster 2 histogram.

const TePDIJointHistogram & TePDIJointHistogram::operator= | ( | const TePDIJointHistogram & | external | ) |

unsigned int TePDIJointHistogram::size | ( |  | ) | const

Returns the histogram size.

void TePDIJointHistogram::toggleProgress | ( | bool | enabled | ) |

Enable / Disable the progress interface.

Parameters:

  enabled | Flag to enable ( true - default ) or disable ( false ).

std::string TePDIJointHistogram::toString | ( |  | ) | const

Ouput histogram to string.

bool TePDIJointHistogram::update | ( | TeRaster & | inputRaster1,
|  | unsigned int | inputRasterChn1,
|  | TeRaster & | inputRaster2,
|  | unsigned int | inputRasterChn2,
|  | TeStrategicIterator | iterStrat,
|  | unsigned int | levels,
|  | const TePolygonSet & | restricPolSet = `TePolygonSet()`
| ) |  |

Update the current histogram reading data from the supplied rasters.

Parameters:

  input1Raster | Input raster.
  input1RasterChn | Input raster channel/band number.
  input2Raster | Input raster.
  input2RasterChn | Input raster channel/band number.
  iterStrat | The raster iteration strategy (if you do not know what this is use TeBoxPixelIn).
  levels | The number of histogram levels, and if set to zero, the number of levels will be automaticlly found by using level step with value one.
  restricPolSet | The restriction polygon set.

Returns:
  true if OK, false on errors.

Note:
  Pallete based rasters not supported.
  Only rasters with the same pixel resolution must be used.
  Floating point rasters will generate an aproximated histogram with the number of gray levels configured by the parameter levels.

bool TePDIJointHistogram::update8Bits | ( | TeRaster & | inputRaster1,
|  | unsigned int | inputRasterChn1,
|  | TeRaster & | inputRaster2,
|  | unsigned int | inputRasterChn2,
|  | TeStrategicIterator | iterStrat,
|  | const TePolygonSet & | restricPolSet
| ) |  | `[protected]`

bool TePDIJointHistogram::updateFloat | ( | TeRaster & | inputRaster1,
|  | unsigned int | inputRasterChn1,
|  | TeRaster & | inputRaster2,
|  | unsigned int | inputRasterChn2,
|  | TeStrategicIterator | iterStrat,
|  | unsigned int | levels,
|  | const TePolygonSet & | restricPolSet
| ) |  | `[protected]`

bool TePDIJointHistogram::updateInteger | ( | TeRaster & | inputRaster1,
|  | unsigned int | inputRasterChn1,
|  | TeRaster & | inputRaster2,
|  | unsigned int | inputRasterChn2,
|  | TeStrategicIterator | iterStrat,
|  | const TePolygonSet & | restricPolSet
| ) |  | `[protected]`

## Member Data Documentation

unsigned int** TePDIJointHistogram::init_jhist_`[protected]`

unsigned int TePDIJointHistogram::init_jhist_cols_`[protected]`

unsigned int TePDIJointHistogram::init_jhist_lines_`[protected]`

unsigned int* TePDIJointHistogram::init_r1hist_`[protected]`

unsigned int* TePDIJointHistogram::init_r2hist_`[protected]`

ConteinerT TePDIJointHistogram::jHistContainer_`[protected]`

Internal container.

bool TePDIJointHistogram::progressEnabled_`[protected]`

Progress enabled flag.

TePDIHistogram TePDIJointHistogram::r1Histogram_`[protected]`

Raster1 histogram.

TePDIHistogram TePDIJointHistogram::r2Histogram_`[protected]`

Raster2 histogram.

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

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/image_processing/TePDIJointHistogram.hpp
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/image_processing/TePDIJointHistogram.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines