Go to the documentation of this file.
26 #ifndef __TERRALIB_RP_INTERNAL_PALETTERASTER_H
27 #define __TERRALIB_RP_INTERNAL_PALETTERASTER_H
33 #include "../raster/Band.h"
34 #include "../raster/Grid.h"
35 #include "../raster/Raster.h"
36 #include "../maptools/RasterTransform.h"
106 double Mean(
int i) {
return (i < 3 && i >= 0) ? (m_mean[i]) : (0); }
112 double Pop() {
return m_pop; }
187 double Mean(
int i) {
return (i < 3 && i >= 0 && m_pop != 0) ? ((double)m_Ex[i] / m_pop) : ((double)0); }
240 int palettesize = 256);
256 std::vector< te::rst::BandProperty::ColorEntry >
getPalette() {
return m_palette; }
262 std::vector< te::rst::BandProperty::ColorEntry >
m_palette;
te::rst::Band * m_outBand
output band
std::list< CubeColor * > m_CClist
List of pointers to CubeColors.
Defines a classification context.
A raster band description.
std::list< CubeColor * >::iterator m_itCC
iterator to CubeColors list
CubeColor * RemoveCubeColor()
Removes the current item from the list.
int m_ibb
Index of color blue in the color cube space.
std::vector< te::rst::BandProperty::ColorEntry > getPalette()
Gets the generated palette.
std::list< CubeColor * > m_CClist
list of CubeColors present in the Image
An abstract class for raster data strucutures.
int m_finalcolors
final number of colors found
~Codifima()
Normal destructor.
size_t GetNCubeColors()
Returns the number of CubeColors in this GroupColor.
int m_ibr
Index of color red in the color cube space.
Defines a Codifima class.
GroupColor * Split(int newgcid)
Splits the GroupColor in two ones. The new GroupColor will have its id given by newgcid....
te::rst::Raster * m_outputRaster
output palette raster
int m_firstvb
fisrt valid blue value
double Mean(int i)
Return Mean[i] of GroupColor.
int IndexG()
Get green component of cube center.
double m_pop
Number of Image rgb triples in the CubeColor.
int m_firstvg
fisrt valid green value
unsigned int m_outNCols
output columns number
CubeColor(int ir, int ig, int ib)
CubeColor constructor.
double Mean(int i)
Get i-th mean color component value.
double MaxVar()
Returns the biggest variance.
void DeallocateMatclass()
double m_pop
population of group color
CubeColor **** hist
histogram of CubeColors
int GroupColorIndex()
Get the index of GroupColor associated with CubeColor.
te::map::RasterTransform * m_rasterTransform
Raster Transformation from input raster.
int *** matclass
classification matrix
bool Apply()
Aplies the method.
Codifima(const te::rst::Raster &inputRaster, te::map::RasterTransform &rasterTransform, te::rst::Raster &outRasterPtr, int palettesize=256)
Codifies a rgb raster to a paletta raster.
Defines a cubic volume in the RGB color space.
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
int m_lastvb
last valid blue value
int m_ngc
number of GroupColors
int m_ibg
Index of color green in the color cube space.
unsigned int m_outNRows
output rows number
int IndexB()
Get blue component of cube center.
double Pop()
Get number of Image rgb triples in the CubeColor.
int m_firstvr
fisrt valid red value
int m_lastvr
last valid red value
double ** m_lut
lut - values found for each channel (R,G,B)
int m_id
Id of GroupColor.
GroupColor(int ident)
Constructor.
int m_lastvg
last valid green value
Proxy configuration file for TerraView (see terraview_config.h).
const te::rst::Raster * m_inputRaster
input rgb raster
int m_igc
Index of GroupColor associated with CubeColor.
double m_varmax
Biggest variance.
void InsertCubeColor(CubeColor *cc)
Inserts a CubeColor in the List.
void InsertTripleRGB(int r, int g, int b)
Inserts a triple rgb in CubeColor.
int IndexR()
Get red component of cube center.
void SetGroupColorIndex(int index)
Sets group color index.
GroupColor ** m_GC
array of GroupColors
std::vector< te::rst::BandProperty::ColorEntry > m_palette
generated palette