| TerraLib 4.1

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

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

Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
TePDIHistogram Class Reference
Image processing auxiliary classes/methods.

This class deals with histograms and related tasks. More...

`#include <TePDIHistogram.hpp>`

Inheritance diagram for TePDIHistogram:

List of all members.

## Classes

class | TePolygonSetPointer
| Base Histogram class (from std::map ). More...

## Public Types

typedef TeSharedPtr < TePDIHistogram > | pointer
typedef const TeSharedPtr < TePDIHistogram > | const_pointer
typedef TePDIHMapSpec::const_iterator | const_iterator
| const_iterator type definition
typedef TePDIHMapSpec::iterator | iterator
| iterator type definition

## Public Member Functions

| TePDIHistogram ()
| Default Constructor.
| TePDIHistogram (const TePDIHistogram &external)
| Alternative constructor.
| TePDIHistogram (const std::map< double, unsigned int > &external)
| Alternative constructor from std::map.
| ~TePDIHistogram ()
| Default Destructor.
bool | reset (const TePDITypes::TePDIRasterPtrType &in_raster, unsigned int band, unsigned int levels, TeStrategicIterator iterstrat, const TeSharedPtr< TePolygonSet > &polsetptr=TePolygonSetPointer())
| Generates a level-ordered histogram ( fixed step ).
bool | IsDiscrete () const
| Histogram discrete verification.
bool | hasFixedStep () const
| Histogram fixed step verification.
bool | Discretize ()
| Round the histogram levels to the near integer generating a descrete ( fixed step ) histogram.
double | GetMinLevel () const
| Histogram minimum level.
double | GetMaxLevel () const
| Histogram maximum level.
unsigned int | GetMinCount () const
| Histogram minimum count (frequency) value for all levels.
unsigned int | GetMaxCount () const
| Histogram maximum count (frequency) value for all levels.
unsigned int | getTotalCount () const
| Histogram total count ( the sum of all frequencies ).
void | clear ()
| std::map::clear() overload.
const TePDIHistogram & | operator= (const TePDIHistogram &external)
| operator= overload.
const TePDIHistogram & | operator= (const std::map< double, unsigned int > &external)
| operator= overload for simple std:maps.
void | ToggleProgressInt (bool enabled)
| Enable / Disable the progress interface.
bool | operator== (const TePDIHistogram &external) const
unsigned int | size () const
| Returns the histogram size.
std::string | toString () const
| Ouput histogram to string.

## Protected Member Functions

void | init ()
| Reset the internal variables with default values.
bool | SetH (const TePDITypes::TePDIRasterPtrType &in_raster, unsigned int band, TeStrategicIterator iterstrat, const TeSharedPtr< TePolygonSet > &polsetptr)
| Generates a level-ordered histogram ( fixed step ) from not floating point data type rasters.
bool | SetPaletteBasedH (const TePDITypes::TePDIRasterPtrType &in_raster, unsigned int band, TeStrategicIterator iterstrat, const TeSharedPtr< TePolygonSet > &polsetptr)
| Generates a level-ordered histogram ( fixed step )for an palette based raster.
bool | Set8BitH (const TePDITypes::TePDIRasterPtrType &in_raster, unsigned int band, TeStrategicIterator iterstrat, const TeSharedPtr< TePolygonSet > &polsetptr)
| Generates a level-ordered histogram ( fixed step )for an 8 bit raster.
bool | Set16BitH (const TePDITypes::TePDIRasterPtrType &in_raster, unsigned int band, TeStrategicIterator iterstrat, const TeSharedPtr< TePolygonSet > &polsetptr)
| Generates a level-ordered histogram (fixed step) for an 16 bit raster.
unsigned long int | getProgressSteps (const TeSharedPtr< TePolygonSet > &polsetptr, double resy)
| Calculate the number of progress steps when using a polygon iterator over a raster for the supplied polygon set.

## Protected Attributes

bool | progress_int_enabled_
| Progress interface enabled status.

## Detailed Description

This class deals with histograms and related tasks.

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

Examples:

  TePDIContrast_test.cpp, TePDIHistogram_test.cpp, TePDIJointHistogram_test.cpp, and TePDIStatistic_test.cpp.

## Member Typedef Documentation

typedef TePDIHMapSpec::const_iterator TePDIHistogram::const_iterator

const_iterator type definition

const TeSharedPtr< TePDIHistogram > TePDIHistogram::const_pointer

Type definition for a const instance pointer.

typedef TePDIHMapSpec::iterator TePDIHistogram::iterator

iterator type definition

TeSharedPtr< TePDIHistogram > TePDIHistogram::pointer

Type definition for a instance pointer.

## Constructor & Destructor Documentation

TePDIHistogram::TePDIHistogram | ( |  | ) |

Default Constructor.

TePDIHistogram::TePDIHistogram | ( | const TePDIHistogram & | external | ) |

Alternative constructor.

Parameters:

  external | External histogram reference.

TePDIHistogram::TePDIHistogram | ( | const std::map< double, unsigned int > & | external | ) |

Alternative constructor from std::map.

Parameters:

  external | External map reference.

TePDIHistogram::~TePDIHistogram | ( |  | ) |

Default Destructor.

## Member Function Documentation

void TePDIHistogram::clear | ( |  | ) |

std::map::clear() overload.

bool TePDIHistogram::Discretize | ( |  | ) |

Round the histogram levels to the near integer generating a descrete ( fixed step ) histogram.

Returns:
  True if the process was concluded successfully, false if not.

Examples:
  TePDIHistogram_test.cpp.

unsigned int TePDIHistogram::GetMaxCount | ( |  | ) | const

Histogram maximum count (frequency) value for all levels.

Returns:
  The histogram maximum count value.

Examples:
  TePDIHistogram_test.cpp.

double TePDIHistogram::GetMaxLevel | ( |  | ) | const

Histogram maximum level.

Returns:
  The histogram maximum level.

Examples:
  TePDIHistogram_test.cpp.

unsigned int TePDIHistogram::GetMinCount | ( |  | ) | const

Histogram minimum count (frequency) value for all levels.

Returns:
  The histogram minimum count value.

Examples:
  TePDIHistogram_test.cpp.

double TePDIHistogram::GetMinLevel | ( |  | ) | const

Histogram minimum level.

Returns:
  The histogram minimum level.

Examples:
  TePDIHistogram_test.cpp.

unsigned long int TePDIHistogram::getProgressSteps | ( | const TeSharedPtr< TePolygonSet > & | polsetptr,
|  | double | resy
| ) |  | `[protected]`

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

Parameters:

  polsetptr | The polygon set pointer.
  resy | Y axis resolution.

unsigned int TePDIHistogram::getTotalCount | ( |  | ) | const

Histogram total count ( the sum of all frequencies ).

Returns:
  The histogram total count

Examples:
  TePDIHistogram_test.cpp.

bool TePDIHistogram::hasFixedStep | ( |  | ) | const

Histogram fixed step verification.

Returns:
  true if the histogram has fixed step.

Examples:
  TePDIHistogram_test.cpp.

void TePDIHistogram::init | ( |  | ) | `[protected]`

Reset the internal variables with default values.

bool TePDIHistogram::IsDiscrete | ( |  | ) | const

Histogram discrete verification.

Returns:
  true if the histogram has only discrete levels.

Examples:
  TePDIHistogram_test.cpp.

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

operator= overload.

const TePDIHistogram & TePDIHistogram::operator= | ( | const std::map< double, unsigned int > & | external | ) |

operator= overload for simple std:maps.

bool TePDIHistogram::operator== | ( | const TePDIHistogram & | external | ) | const

bool TePDIHistogram::reset | ( | const TePDITypes::TePDIRasterPtrType & | in_raster,
|  | unsigned int | band,
|  | unsigned int | levels,
|  | TeStrategicIterator | iterstrat,
|  | const TeSharedPtr< TePolygonSet > & | polsetptr = `TePolygonSetPointer()`
| ) |  |

Generates a level-ordered histogram ( fixed step ).

Note:
  If the input raster has float data, the histogram will be interpolated.

Parameters:

  in_raster | Input raster.
  band | Band number.
  levels | The number of interpolated levels, and if set to zero, the number of levels will be automaticlly found by using level step with value one.
  iterstrat | The raster iteration strategy (if you do not know what this is use TeBoxPixelIn"
  polsetptr | The restriction polygon set.

Returns:
  true if the histogram has been generated, false on error.

Examples:
  TePDIHistogram_test.cpp, and TePDIJointHistogram_test.cpp.

bool TePDIHistogram::Set16BitH | ( | const TePDITypes::TePDIRasterPtrType & | in_raster,
|  | unsigned int | band,
|  | TeStrategicIterator | iterstrat,
|  | const TeSharedPtr< TePolygonSet > & | polsetptr
| ) |  | `[protected]`

Generates a level-ordered histogram (fixed step) for an 16 bit raster.

Note:
  No trows generated.

Parameters:

  in_raster | Input raster.
  band | Band number.
  iterstrat | The raster iteration strategy (if you do not know what this is use TeBoxPixelIn"
  polsetptr | The restriction polygon set.

Returns:
  true if the histogram has been generated, false on error.

bool TePDIHistogram::Set8BitH | ( | const TePDITypes::TePDIRasterPtrType & | in_raster,
|  | unsigned int | band,
|  | TeStrategicIterator | iterstrat,
|  | const TeSharedPtr< TePolygonSet > & | polsetptr
| ) |  | `[protected]`

Generates a level-ordered histogram ( fixed step )for an 8 bit raster.

Note:
  No trows generated.

Parameters:

  in_raster | Input raster.
  band | Band number.
  iterstrat | The raster iteration strategy (if you do not know what this is use TeBoxPixelIn"
  polsetptr | The restriction polygon set.

Returns:
  true if the histogram has been generated, false on error.

bool TePDIHistogram::SetH | ( | const TePDITypes::TePDIRasterPtrType & | in_raster,
|  | unsigned int | band,
|  | TeStrategicIterator | iterstrat,
|  | const TeSharedPtr< TePolygonSet > & | polsetptr
| ) |  | `[protected]`

Generates a level-ordered histogram ( fixed step ) from not floating point data type rasters.

Note:
  No trows generated.

Parameters:

  in_raster | Input raster.
  band | Band number.
  iterstrat | The raster iteration strategy (if you do not know what this is use TeBoxPixelIn"
  polsetptr | The restriction polygon set.

Returns:
  true if the histogram has been generated, false on error.

bool TePDIHistogram::SetPaletteBasedH | ( | const TePDITypes::TePDIRasterPtrType & | in_raster,
|  | unsigned int | band,
|  | TeStrategicIterator | iterstrat,
|  | const TeSharedPtr< TePolygonSet > & | polsetptr
| ) |  | `[protected]`

Generates a level-ordered histogram ( fixed step )for an palette based raster.

Note:
  No trows generated.

Parameters:

  in_raster | Input raster.
  band | Band number.
  iterstrat | The raster iteration strategy (if you do not know what this is use TeBoxPixelIn"
  polsetptr | The restriction polygon set.

Returns:
  true if the histogram has been generated, false on error.

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

Returns the histogram size.

Returns:
  Returns the histogram size.

Examples:
  TePDIHistogram_test.cpp, TePDIJointHistogram_test.cpp, and TePDIStatistic_test.cpp.

void TePDIHistogram::ToggleProgressInt | ( | bool | enabled | ) |

Enable / Disable the progress interface.

Parameters:

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

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

Ouput histogram to string.

Examples:
  TePDIHistogram_test.cpp.

## Member Data Documentation

bool TePDIHistogram::progress_int_enabled_`[protected]`

Progress interface enabled status.

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines