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