| TerraLib 4.1

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

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

Public Member Functions
TePDIRGSCell Class Reference

This is the basic element in the region growing process. The cell represents an area in the image being segmented. It contains spectral, geometrical and contextual information of this area. The behaviour of this class allows it to merge. More...

`#include <TePDIRegGrowSeg.hpp>`

List of all members.

## Public Member Functions

| TePDIRGSCell ()
| Default Constructor.
| TePDIRGSCell (unsigned long *tuple, long id, short lin, short col, short nban)
| Alternative Constructor.
| ~TePDIRGSCell ()
| Default destructor.
void | Init (unsigned long *tuple, long id, short lin, short col, short nban)
| Initializes an existing TePDIRGSCell.
void | ResetId (long idc)
| Changes the Id number of the cell.
char | Dead ()
| Returns The status of the cell.
void | Kill ()
| Turns cell dead.
void | BoundingRectangle (int &lmin, int &cmin, int &lmax, int &cmax)
| Return the bounding box of the cell.
int | LineMax ()
| LinMax.
bool | Merge (TePDIRGSCell *c)
| Merge cell c with the "this" cell.
void | AdjustNeighborhood ()
| Remove dead cells from the list of neighbour cells and closest cells.
bool | AddNeighbor (TePDIRGSCell *c, float dist)
| Add neighbour to neighbour cells list and closest cells list.
bool | InsertNeighbor (TePDIRGSCell *c, float dist)
| Insert neighbour to neighbour cells list and closest cells list.
TePDIRGSCell * | ClosestNeighbor (float &dist)
| Return the cell with the minimum euclidian distance.
float | Distance (TePDIRGSCell *c)
| Return the euclidian distance between cell c and "this" cell.
long | Id ()
| Returns the Id number of the cell.
long | Area ()
| Return the number of pixels of the cell.
int | GetNban ()
| Return the number of espectral bands used.
void | Print ()
| Prints cell state.

## Detailed Description

This is the basic element in the region growing process. The cell represents an area in the image being segmented. It contains spectral, geometrical and contextual information of this area. The behaviour of this class allows it to merge.

The behaviour of this class allows it to merge with other cells and to update its information. At the initial stage in the region growing process each cell is composed by one pixel of the image. It uses 4-Neighbourhood (contextual information).

## Constructor & Destructor Documentation

TePDIRGSCell::TePDIRGSCell | ( |  | ) |

Default Constructor.

TePDIRGSCell::TePDIRGSCell | ( | unsigned long * | tuple,
|  | long | id,
|  | short | lin,
|  | short | col,
|  | short | nban
| ) |  |

Alternative Constructor.

Parameters:

  tuple,: | pixel tuple containing spectral information.
  id,: | Id number of the cell.
  lin,: | line position of tuple in the image.
  col,: | column position of tuple in the image.
  nban,: | Number of bands.

TePDIRGSCell::~TePDIRGSCell | ( |  | ) |

Default destructor.

## Member Function Documentation

bool TePDIRGSCell::AddNeighbor | ( | TePDIRGSCell * | c,
|  | float | dist
| ) |  |

Add neighbour to neighbour cells list and closest cells list.

Parameters:

  c | being added.
  dist | euclidian distance to "this" cell

Returns:
  true if OK. false on error.

void TePDIRGSCell::AdjustNeighborhood | ( |  | ) |

Remove dead cells from the list of neighbour cells and closest cells.

long TePDIRGSCell::Area | ( |  | ) | `[inline]`

Return the number of pixels of the cell.

Returns:
  Number of pixels of the cell

void TePDIRGSCell::BoundingRectangle | ( | int & | lmin,
|  | int & | cmin,
|  | int & | lmax,
|  | int & | cmax
| ) |  | `[inline]`

Return the bounding box of the cell.

Parameters:

  lmin,: | Minimum image row wich contains a pixel belonging to the cell
  cmin,: | Minimum image column wich contains a pixel belonging to the cell
  lmax,: | Maximum image row wich contains a pixel belonging to the cell
  cmax,: | Maximum image column wich contains a pixel belonging to the cell

TePDIRGSCell * TePDIRGSCell::ClosestNeighbor | ( | float & | dist | ) |

Return the cell with the minimum euclidian distance.

Parameters:

  dist,: | minimum distance.

Returns:
  Pointer to cell which has the minimum euclidian distance.

char TePDIRGSCell::Dead | ( |  | ) | `[inline]`

Returns The status of the cell.

Returns:
  If cell is dead return 1, otherwise, 0.

float TePDIRGSCell::Distance | ( | TePDIRGSCell * | c | ) |

Return the euclidian distance between cell c and "this" cell.

Parameters:

  c,: | input cell

Returns:
  euclidian distance between cell c and "this" cell.

int TePDIRGSCell::GetNban | ( |  | ) | `[inline]`

Return the number of espectral bands used.

Returns:
  Number of espectral bands used

long TePDIRGSCell::Id | ( |  | ) | `[inline]`

Returns the Id number of the cell.

Returns:
  Id number of the cell.

void TePDIRGSCell::Init | ( | unsigned long * | tuple,
|  | long | id,
|  | short | lin,
|  | short | col,
|  | short | nban
| ) |  |

Initializes an existing TePDIRGSCell.

Parameters:

  tuple,: | pixel tuple containing spectral information.
  id,: | Id number of the cell.
  lin,: | line position of tuple in the image.
  col,: | column position of tuple in the image.
  nban,: | Number of bands.

bool TePDIRGSCell::InsertNeighbor | ( | TePDIRGSCell * | c,
|  | float | dist
| ) |  |

Insert neighbour to neighbour cells list and closest cells list.

Parameters:

  c | being added.
  dist,: | euclidian distance to "this" cell

Returns:
  true if OK. false on error.

void TePDIRGSCell::Kill | ( |  | ) | `[inline]`

Turns cell dead.

When the cell is dead it does not represent any region in the image.

int TePDIRGSCell::LineMax | ( |  | ) | `[inline]`

LinMax.

Returns:
  Maximum image line wich contains a pixel belonging to the cell

bool TePDIRGSCell::Merge | ( | TePDIRGSCell * | c | ) |

Merge cell c with the "this" cell.

Returns:
  true if OK. false on error.

void TePDIRGSCell::Print | ( |  | ) |

Prints cell state.

void TePDIRGSCell::ResetId | ( | long | idc | ) | `[inline]`

Changes the Id number of the cell.

Parameters:

  idc,: | new id number

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines