| 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
TePDIRaster2Vector Class Reference
General purpose algorithms.

Raster vectorizer. More...

`#include <TePDIRaster2Vector.hpp>`

Inheritance diagram for TePDIRaster2Vector:

List of all members.

## Public Types

typedef TeSharedPtr < TePDIRaster2Vector > | pointer
typedef const TeSharedPtr < TePDIRaster2Vector > | const_pointer

## Public Member Functions

| TePDIRaster2Vector ()
| Default Constructor.
| ~TePDIRaster2Vector ()
| Default destructor.
bool | CheckParameters (const TePDIParameters &parameters) const
| Checks if the supplied parameters fits the requirements of each PDI algorithm implementation.

## Protected Member Functions

bool | RunImplementation ()
| Runs the current algorithm implementation.
void | ResetState (const TePDIParameters &params)
| Reset the internal state to the initial state.
bool | detectEdge (long i, long j, TeLine2D &line)
| Detects a edge of a cell in Raster.
bool | startingEdgeTest (const int &x, const int &y)
| Tests if the current point is a edge start.
void | clear ()
| Clear all internally allocated resources.

## Protected Attributes

bool | raster_uses_dummy_
| Flag indication for dummy value use ( rotulated image ).
double | dummy_value_
| The used dummy value.
TeCoord2D | directions_ [8]
| Directions vector.
TePDITypes::TePDIRasterPtrType | raster_
| pointer to the input image
double | resx_
| resolution x
double | resy_
| resolution y
long | nLines_
| number of lines
long | nCols_
| number of cols
unsigned int | raster_channel_
| number of cols
TeSAM::TeRTree< unsigned int, 8, 4 > * | rtreePolygons_
| A RTree instance pointer to optimize the searching of points inside already created polygons.
vector < TePDIRaster2VectorPolStruct > | containerPolygons_
| Vector of all polygons.

## Detailed Description

Raster vectorizer.

Author:
  Emiliano F. Castejon <castejon@dpi.inpe.br>
  Eric S. Abreu <eric@dpi.inpe.br>
  Gilberto Ribeiro de Quiroz <gribeiro@dpi.inpe.br>
  Nicolas Despres <nicolasdespres@wanadoo.fr>

Note:
  The general required parameters by TePDIRaster2Vector :

Parameters:

  rotulated_image | (TePDITypes::TePDIRasterPtrType), The rotulated_image raster ( 1 band, not floating point, 4-connected
  - each region is for 4-connected ).
  output_polsets | ( TePDITypes::TePDIPolSetMapPtrType ) - The user supplied output polygon sets map where the generated polygons will be stored (each polygon set contains polygons related to the same pixel value).
  channel | (unsigned int) - The raster channel to process.

Note:
  Optional parameters:

Parameters:

  max_pols | (unsigned long int) - The maximum number of poligons to generate (default:0 - no maximum defined).

Examples:

  TePDIRaster2Vector_test.cpp.

## Member Typedef Documentation

typedef const TeSharedPtr< TePDIRaster2Vector > TePDIRaster2Vector::const_pointer

Type definition for a const algorithm instance pointer.

Reimplemented from TePDIAlgorithm.

typedef TeSharedPtr< TePDIRaster2Vector > TePDIRaster2Vector::pointer

Type definition for an algorithm instance pointer.

Reimplemented from TePDIAlgorithm.

## Constructor & Destructor Documentation

TePDIRaster2Vector::TePDIRaster2Vector | ( |  | ) |

Default Constructor.

TePDIRaster2Vector::~TePDIRaster2Vector | ( |  | ) |

Default destructor.

## Member Function Documentation

bool TePDIRaster2Vector::CheckParameters | ( | const TePDIParameters & | parameters | ) | const`[virtual]`

Checks if the supplied parameters fits the requirements of each PDI algorithm implementation.

Note:
  Error log messages must be generated. No exceptions generated.

Parameters:

  parameters | The parameters to be checked.

Returns:
  true if the parameters are OK. false if not.

Implements TePDIAlgorithm.

void TePDIRaster2Vector::clear | ( |  | ) | `[protected]`

Clear all internally allocated resources.

bool TePDIRaster2Vector::detectEdge | ( | long | i,
|  | long | j,
|  | TeLine2D & | line
| ) |  | `[protected]`

Detects a edge of a cell in Raster.

Parameters:

  i | abscissa( column ) of the upper-left point of the shape
  j | ordinate( line ) of the upper-left point of the shape
  line | 2D Line.

Returns:
  true if ok, otherwise false

void TePDIRaster2Vector::ResetState | ( | const TePDIParameters & | params | ) | `[protected, virtual]`

Reset the internal state to the initial state.

Parameters:

  params | The new parameters referente at initial state.

Implements TePDIAlgorithm.

bool TePDIRaster2Vector::RunImplementation | ( |  | ) | `[protected, virtual]`

Runs the current algorithm implementation.

Returns:
  true if OK. false on error.

Implements TePDIAlgorithm.

bool TePDIRaster2Vector::startingEdgeTest | ( | const int & | x,
|  | const int & | y
| ) |  | `[protected]`

Tests if the current point is a edge start.

Parameters:

  x | X coord.
  y | Y coord.

Returns:
  true if the current point is a edge start, false if not.

## Member Data Documentation

vector<TePDIRaster2VectorPolStruct> TePDIRaster2Vector::containerPolygons_`[protected]`

Vector of all polygons.

TeCoord2D TePDIRaster2Vector::directions_[8]`[protected]`

Directions vector.

double TePDIRaster2Vector::dummy_value_`[protected]`

The used dummy value.

long TePDIRaster2Vector::nCols_`[protected]`

number of cols

long TePDIRaster2Vector::nLines_`[protected]`

number of lines

TePDITypes::TePDIRasterPtrType TePDIRaster2Vector::raster_`[protected]`

pointer to the input image

unsigned int TePDIRaster2Vector::raster_channel_`[protected]`

number of cols

bool TePDIRaster2Vector::raster_uses_dummy_`[protected]`

Flag indication for dummy value use ( rotulated image ).

double TePDIRaster2Vector::resx_`[protected]`

resolution x

double TePDIRaster2Vector::resy_`[protected]`

resolution y

TeSAM::TeRTree<unsigned int, 8, 4>* TePDIRaster2Vector::rtreePolygons_`[protected]`

A RTree instance pointer to optimize the searching of points inside already created polygons.

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines