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

This is the class for raster color transforms. More...

`#include <TePDIColorTransform.hpp>`

Inheritance diagram for TePDIColorTransform:

List of all members.

## Public Types

enum | ColorTransfTypes { Rgb2Ihs = 1, Ihs2Rgb = 2 }

## Public Member Functions

| TePDIColorTransform ()
| Default Constructor.
| ~TePDIColorTransform ()
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 | RunRgb2Ihs (TePDITypes::TePDIRasterVectorType &input_rasters, std::vector< int > &input_channels, TePDITypes::TePDIRasterVectorType &output_rasters, std::vector< int > &output_channels, const double rgb_channels_min, const double rgb_channels_max)
| Runs the RGB -> IHS implementation.
bool | RunIhs2Rgb (TePDITypes::TePDIRasterVectorType &input_rasters, std::vector< int > &input_channels, TePDITypes::TePDIRasterVectorType &output_rasters, std::vector< int > &output_channels, const double rgb_channels_min, const double rgb_channels_max)
| Runs the IHS -> RGB implementation.

## Detailed Description

This is the class for raster color transforms.

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

Note:
  The general required parameters are:

Parameters:

  input_rasters | ( TePDITypes::TePDIRasterVectorType ) - A vector of all used input rasters ( NOTE: When two or more bands from the same raster are used, this raster must be inserted two or three times inside the vector.
  input_channels | ( std::vector< int > ) - A vector of all used input rasters channels/bands.
  output_rasters | ( TePDITypes::TePDIRasterVectorType ) - A vector of all used output rasters ( Possible combinations: One raster with 3 channels, 3 rasters with one channel per raster. ).
  transf_type | ( TePDIColorTransform::ColorTransfTypes ) - Transformation type.
  rgb_channels_min | (double) - The output RGB channels min level.
  rgb_channels_max | (double) - The output RGB channels max level.

Note:
  Channels disposition for RGB images: input_rasters[ 0 ]=Red , input_rasters[ 1 ]=Green , input_rasters[ 2 ]=Blue
  Channels disposition for IHS images: input_rasters[ 0 ]=Intensity , input_rasters[ 1 ]=Hue , input_rasters[ 2 ]=Saturation
  This algorithm generates and expects IHS images with the following channels ranges: I:[0,1] H:[0,2pi] (radians) S:[0,1]

Examples:

  TePDIColorTransform_test.cpp.

## Member Enumeration Documentation

enum TePDIColorTransform::ColorTransfTypes

Color transformation types.

Note:
  Reference: Digital Image Processing - Gonzales.

Enumerator:

  Rgb2Ihs | RGB -> IHS
  Ihs2Rgb | IHS -> RGB

## Constructor & Destructor Documentation

TePDIColorTransform::TePDIColorTransform | ( |  | ) |

Default Constructor.

TePDIColorTransform::~TePDIColorTransform | ( |  | ) |

Destructor

## Member Function Documentation

bool TePDIColorTransform::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 TePDIColorTransform::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 TePDIColorTransform::RunIhs2Rgb | ( | TePDITypes::TePDIRasterVectorType & | input_rasters,
|  | std::vector< int > & | input_channels,
|  | TePDITypes::TePDIRasterVectorType & | output_rasters,
|  | std::vector< int > & | output_channels,
|  | const double | rgb_channels_min,
|  | const double | rgb_channels_max
| ) |  | `[protected]`

Runs the IHS -> RGB implementation.

Parameters:

  input_rasters | Input rasters.
  input_channels | Input rasters channels.
  output_rasters | Output rasters.
  output_channels | Output rasters channels.
  rgb_channels_min | The output RGB channels min value.
  rgb_channels_max | The output RGB channels max value.

Returns:
  true if OK. false if not.

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

Runs the current algorithm implementation.

Returns:
  true if OK. false on error.

Implements TePDIAlgorithm.

bool TePDIColorTransform::RunRgb2Ihs | ( | TePDITypes::TePDIRasterVectorType & | input_rasters,
|  | std::vector< int > & | input_channels,
|  | TePDITypes::TePDIRasterVectorType & | output_rasters,
|  | std::vector< int > & | output_channels,
|  | const double | rgb_channels_min,
|  | const double | rgb_channels_max
| ) |  | `[protected]`

Runs the RGB -> IHS implementation.

Parameters:

  input_rasters | Input rasters.
  input_channels | Input rasters channels.
  output_rasters | Output rasters.
  output_channels | Output rasters channels.
  rgb_channels_min | The output RGB channels min value.
  rgb_channels_max | The output RGB channels max value.

Returns:
  true if OK. false if not.

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines