RasterTransform.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file RasterTransform.h
22 
23  \brief A Raster Transform is a class that defines functions to transform a styled raster.
24 */
25 
26 #ifndef __TERRALIB_MAPTOOLS_INTERNAL_RASTERTRANSFORM_H
27 #define __TERRALIB_MAPTOOLS_INTERNAL_RASTERTRANSFORM_H
28 
29 // TerraLib
30 #include "Config.h"
31 #include "../color/RGBAColor.h"
32 #include "../color/ColorBar.h"
33 #include "../raster.h"
34 
35 // STL
36 #include <map>
37 #include <cmath>
38 
39 namespace te
40 {
41 // Forward declarations
42  namespace se
43  {
44  class RasterSymbolizer;
45  }
46 
47  namespace rst
48  {
49  class Raster;
50  class RasterProperty;
51  }
52 
53  namespace map
54  {
55 // Forward declarations
56 
57  /*!
58  \class RasterTransform
59 
60  \brief A Raster Transform is a class that defines functions to transform a styled raster.
61 
62  \sa
63  */
65  {
66  public:
67 
68  typedef void (RasterTransform::*TransformFunction)(double, double, double, double);
69  typedef te::color::RGBAColor (RasterTransform::*RGBAFunction)(double, double);
70 
71  typedef std::pair<double, double> RasterThreshold;
72 
73  typedef std::map<RasterThreshold, te::color::RGBAColor> CategorizedMap;
74  typedef std::map<RasterThreshold, te::color::ColorBar> InterpolatedMap;
75  typedef std::map<int, te::color::RGBAColor> RecodedMap;
76 
78  {
80 
81  int m_width;
82  int m_height;
83 
84  te::rst::GetBufferValueFPtr m_getBuff; //!< A pointer to a function that helps to extract a double or complex value from a specific buffer data type (char, int16, int32, float, ...).
85  te::rst::GetBufferValueFPtr m_getBuffI; //!< A pointer to a function that helps to extract the imaginary part value from a specific buffer data type (cint16, cint32, cfloat, cdouble).
86  te::rst::SetBufferValueFPtr m_setBuff; //!< A pointer to a function that helps to insert a double or complex value into a specific buffer data type (char, int16, int32, float, ...).
87  te::rst::SetBufferValueFPtr m_setBuffI; //!< A pointer to a function that helps to insert the imaginary part value into a specific buffer data type (cint16, cint32, cfloat, cdouble).
88 
89  void* m_buffer;
90 
91  BandBufferInfo(int bandDataType, int width, int height):
92  m_dataType(bandDataType),
93  m_width(width),
94  m_height(height),
95  m_buffer(nullptr)
96  {
97  te::rst::SetBlockFunctions(&m_getBuff, &m_getBuffI, &m_setBuff, &m_setBuffI, m_dataType);
98  }
99 
101  {
102  unsigned char* buffer = static_cast<unsigned char*>(m_buffer);
103  delete buffer;
104  }
105 
106  } ;
107 
109  {
110  double m_rstMinValue; //!< Min value from input raster.
111  double m_rstMaxValue; //!< Max value from input raster.
112 
113  double m_gamma; //!< Gamma gain for this band.
114 
115  double m_contrastGain; //!< Gains for this band used by the CONTRAST method.
116  double m_contrastOffset1; //!< Offsets1 for this band used by the CONTRAST method.
117  double m_contrastOffset2; //!< Offsets2 for this band used by the CONTRAST method.
118 
119  double m_noDataValue; //!< No data value for this band from input raster.
120 
122  m_rstMinValue(-std::numeric_limits<double>::max()),
123  m_rstMaxValue(std::numeric_limits<double>::max()),
124  m_gamma(1.0),
125  m_contrastGain(1.0),
126  m_contrastOffset1(0.0),
127  m_contrastOffset2(0.0),
128  m_noDataValue(std::numeric_limits<double>::max())
129  {
130 
131  }
132 
134  {
135 
136  }
137 
138  };
139 
140  //! The channels of a display
142  {
143  RED_CHANNEL=0,
144  GREEN_CHANNEL=1,
145  BLUE_CHANNEL=2,
146  ALPHA_CHANNEL=3,
147  MONO_CHANNEL=4
148  };
149 
150  // The raster transform functions type
152  {
153  NO_TRANSF=0,
154  MONO2THREE_TRANSF=1,
155  EXTRACT2RGB_TRANSF=2,
156  RED2THREE_TRANSF=3,
157  GREEN2THREE_TRANSF=4,
158  BLUE2THREE_TRANSF=5,
159  CATEGORIZE_TRANSF=6,
160  INTERPOLATE_TRANSF=7,
161  RECODE_TRANSF = 8,
162  BAND2BAND_TRANSF=9,
164  CONTRAST_TRANSF /*!< Apply a contrast method ( ContrastType ) to the given raster - Use the methods getGain, setOffset and setOffset2 to setup contrast parameters. */
165  };
166 
167  /*! \enum Allowed contrast types. */
169  {
170  LINEAR_CONTRAST, /*!< The histogram range will be changed to the supplied min/max range ( linear function ). */
171  SQUARE_CONTRAST, /*!< The contrasted image will be created by using a square function. */
172  SQUARE_ROOT_CONTRAST, /*!< The contrasted image will be created by using a square root function. */
173  LOG_CONTRAST /*!< The contrasted image will be created by using a log function. */
174  };
175 
176  public:
177 
178  /*!
179  \brief Constructor
180 
181  \param input
182  \param output
183 
184  \note
185  */
187 
188  /*! \brief Destructor. */
189  ~RasterTransform();
190 
191  /*! \brief Gets the input raster. */
192  te::rst::Raster* getInputRaster() { return m_rasterIn; }
193 
194  /*! \brief Gets the output raster. */
195  te::rst::Raster* getOutputRaster() { return m_rasterOut; }
196 
197  /*! \brief Sets the transparency. */
198  void setTransparency(double value) { m_transp = value; }
199 
200  /*! \brief Gets the transparency. */
201  double getTransparency() { return m_transp; }
202 
203  /*! \brief Sets the gain. */
204  void setGain(double value, int band);
205 
206  /*! \brief Gets the gain. */
207  std::vector< double > getGain() const;
208 
209  /*! \brief Sets the offset 1. */
210  void setOffset(double value, int band);
211 
212  /*! \brief Gets the offset. */
213  std::vector< double > getOffset();
214 
215  /*!
216  \brief Set the current contrast type.
217  \param newType New contrast type.
218  */
219  void setContrastType( const ContrastType& newType );
220 
221  /*! \brief Sets the constrast value for red band. */
222  void setGammaR(double value);
223 
224  /*! \brief Gets the constrast value for red band. */
225  double getGammaR();
226 
227  /*! \brief Sets the constrast value for green band. */
228  void setGammaG(double value);
229 
230  /*! \brief Gets the constrast value for green band. */
231  double getGammaG();
232 
233  /*! \brief Sets the constrast value for blue band. */
234  void setGammaB(double value);
235 
236  /*! \brief Gets the constrast value for blue band. */
237  double getGammaB();
238 
239  /*! \brief Sets the constrast value for gray band. */
240  void setGammaM(double value);
241 
242  /*! \brief Gets the constrast value for gray band. */
243  double getGammaM();
244 
245  /*! \brief Sets the rgb map values. */
246  void setRGBMap(std::map<RGBChannels, short>& rgbMap);
247 
248  /*! Sets the mapping from a particular input band to a particular output channel */
249  void setBChannelMapping(short bIn, RGBChannels bOut);
250 
251  short getBChannelMapping(RGBChannels channel);
252 
253  /*! Clears current mapping from bands to channel */
254  void clearRGBMap();
255 
256  /*! Returns the mapping from a particular input band to a particular output channel */
257  std::map<RGBChannels, short> getRGBMap();
258 
259  /*! Sets the categorize map information */
260  void setCategorizedMap(CategorizedMap map) { m_categorizeMap = map; }
261 
262  /*! Gets the categorize map information */
263  CategorizedMap& getCategorizedMap() { return m_categorizeMap; }
264 
265  /*! Sets the interpolate map information */
266  void setInterpolatedMap(InterpolatedMap map) { m_interpolateMap = map; }
267 
268  /*! Gets the categorize map information */
269  InterpolatedMap& getInterpolatedMap() { return m_interpolateMap; }
270 
271  /*! Sets the recode map information */
272  void setRecodedMap(RecodedMap map) { m_recodeMap = map; }
273 
274  /*! Gets the recode map information */
275  RecodedMap& getRecodedMap() { return m_recodeMap; }
276 
277  /*!
278  \brief Set parameters of linear transformation
279 
280  \param vmin smallest input value
281  \param vmax largest input value
282  \param rmin smallest value of the output range
283  \param rmax largest value of the output range
284 
285  */
286  void setLinearTransfParameters(double vmin, double vmax, double rmin, double rmax);
287 
288  /*!
289  \brief Set parameters of linear transformation for each band
290 
291  \param vmin smallest input value
292  \param vmax largest input value
293  \param rmin smallest value of the output range
294  \param rmax largest value of the output range
295  \param band band id
296  */
297  void setLinearTransfParameters(double vmin, double vmax, double rmin, double rmax, int band);
298 
299  /*!
300  \brief Set parameters of a non linear transformation for each band
301 
302  \param rmin smallest value of the output range
303  \param rmax largest value of the output range
304  \param gain value used as gain
305  \param offset1 value used as offset
306  \param offset2 value used as offset2
307  \param band band id
308  */
309  void setTransfParameters(double rmin, double rmax, double gain, double offset1, double offset2, int band);
310 
311  /*!
312  \brief Set the input/output window that will be transformed. This method enables cache strategy.
313 
314  \param inputX0 Start point (upper left X) from input image
315  \param inputY0 Start point (upper left Y) from input image
316  \param inputWidth Width of input image that will be transformed
317  \param inputHeight Height of input image that will be transformed
318  \param outWidth Width of output image that will receive the transformed input image (canvas size)
319  \param outHeight Height of output image that will receive the transformed input image (canvas size)
320 
321  \NOTE: This method was defined to increase draw speed.
322  */
323  void setInputRasterResampleSize(int inputX0, int inputY0, int inputWidth, int inputHeight, int outWidth, int outHeight);
324 
325  /*! Returns the identifier of the transformation function currently set */
326  RasterTransfFunctions getTransfFunction();
327 
328  /*! Sets the associated transformation function from an identifier */
329  void setTransfFunction(RasterTransfFunctions func);
330 
331  /*! Sets the transformation method to be used */
332  void setTransfFunction(RasterTransform::TransformFunction transfFuncPtr) { m_transfFuncPtr = transfFuncPtr; }
333 
334  /*! Sets the transformation method to be used */
335  void setRGBAFunction(RasterTransform::RGBAFunction transfFuncPtr) { m_RGBAFuncPtr = transfFuncPtr; }
336 
337  /*! Applies the selected transformation method */
338  void apply(double icol, double ilin, double ocol, double olin) {(this->*m_transfFuncPtr)(icol,ilin,ocol,olin); }
339 
340  te::color::RGBAColor apply(double icol, double ilin){return (this->*m_RGBAFuncPtr)(icol,ilin); }
341 
342  /*!
343  \brief Set gain and offset parameters to be used by the CONTRAST_TRANSF method.
344  \param contrastGains A vector of gains for each raster band.
345  \param contrastOffsets1 A vector of offsets1 for each raster band.
346  \param contrastOffsets2 A vector of offsets2 for each raster band.
347  */
348  void setContrastGainsAndOffsets( const std::vector< double >& contrastGains,
349  const std::vector< double >& contrastOffsets1,
350  const std::vector< double >& contrastOffsets2 );
351 
352  protected:
353 
354  /*!
355  \brief Type definition for the internal contrast transform function.
356  \note void ContrastTransformFunction( bandNumber, inputValue, outputValue )
357  */
358  typedef void (RasterTransform::*ContrastTransformFunction)(const unsigned int&, const double&, double&) const;
359 
360  /*!
361  \brief Configures the contrast function pointer.
362  \param contrastType Contrast type..
363  */
364  void setContrastFuncPtr(const RasterTransform::ContrastType contrastType );
365 
366  /*! This transformation repeats the value of the first band in input three bands of the output */
367  void setMono2ThreeBand(double icol, double ilin, double ocol, double olin);
368 
369  /*! This transformation repeats the value of the first band in input three bands of the output */
370  te::color::RGBAColor getMono2ThreeBand(double icol, double ilin);
371 
372  /*! This transformation is used to define a particular mapping from input bands to RGB channels */
373  void setExtractRGB(double icol, double ilin, double ocol, double olin);
374 
375  /*! This transformation is used to define a particular mapping from input bands to RGB channels */
376  te::color::RGBAColor getExtractRGB(double icol, double ilin);
377 
378  /*! This transformation is used to define a particular mapping from input bands to RGBA channels */
379  void setExtractRGBA(double icol, double ilin, double ocol, double olin);
380 
381  /*! This transformation is used to define a particular mapping from input bands to RGBA channels */
382  te::color::RGBAColor getExtractRGBA(double icol, double ilin);
383 
384  /*! This transformation repeats the value of the first band in input three bands of the output */
385  void setRed2ThreeBand(double icol, double ilin, double ocol, double olin);
386 
387  /*! This transformation repeats the value of the first band in input three bands of the output */
388  te::color::RGBAColor getRed2ThreeBand(double icol, double ilin);
389 
390  /*! This transformation repeats the value of the first band in input three bands of the output */
391  void setGreen2ThreeBand(double icol, double ilin, double ocol, double olin);
392 
393  /*! This transformation repeats the value of the first band in input three bands of the output */
394  te::color::RGBAColor getGreen2ThreeBand(double icol, double ilin);
395 
396  /*! This transformation repeats the value of the first band in input three bands of the output */
397  void setBlue2ThreeBand(double icol, double ilin, double ocol, double olin);
398 
399  /*! This transformation repeats the value of the first band in input three bands of the output */
400  te::color::RGBAColor getBlue2ThreeBand(double icol, double ilin);
401 
402  /*! This transformation get the value of the selected band in input and set the categorized value in output bands of the output */
403  void setCategorize(double icol, double ilin, double ocol, double olin);
404 
405  /*! This transformation get the value of the selected band in input and get the categorized value */
406  te::color::RGBAColor getCategorize(double icol, double ilin);
407 
408  /*! This transformation get the value of the selected band in input and set the interpolated value in output bands of the output */
409  void setInterpolate(double icol, double ilin, double ocol, double olin);
410 
411  /*! This transformation get the value of the selected band in input and get the interpolated value */
412  te::color::RGBAColor getInterpolate(double icol, double ilin);
413 
414  /*! This transformation get the value of the selected band in input and set the recoded value in output bands of the output */
415  void setRecode(double icol, double ilin, double ocol, double olin);
416 
417  /*! This transformation get the value of the selected band in input and get the recoded value */
418  te::color::RGBAColor getRecode(double icol, double ilin);
419 
420  /*! This transformation repeats the value of the n band in input to b band in output */
421  void setBand2Band(double icol, double ilin, double ocol, double olin);
422 
423  /*! This transformation aplies a linear contrast */
424  inline void applyLinearContrast(const unsigned int& bandIdx, const double& inputValue, double& outputValue) const
425  {
426  assert( bandIdx < m_inputNBands );
427  outputValue = ( ( inputValue + m_transformBandInfo[bandIdx]->m_contrastOffset1 ) *
428  m_transformBandInfo[bandIdx]->m_contrastGain ) + m_transformBandInfo[bandIdx]->m_contrastOffset2;
429  }
430 
431  /*! This transformation aplies a square contrast */
432  inline void applySquareContrast(const unsigned int& bandIdx, const double& inputValue, double& outputValue) const
433  {
434  assert( bandIdx < m_inputNBands );
435  outputValue = std::pow( inputValue, 2.0 ) * m_transformBandInfo[bandIdx]->m_contrastGain;
436  }
437 
438  /*! This transformation aplies a square root contrast */
439  inline void applySquareRootContrast(const unsigned int& bandIdx, const double& inputValue, double& outputValue) const
440  {
441  assert( bandIdx < m_inputNBands );
442  outputValue = std::sqrt( inputValue ) * m_transformBandInfo[bandIdx]->m_contrastGain;
443  }
444 
445  /*! This transformation aplies a log contrast */
446  inline void applyLogContrast(const unsigned int& bandIdx, const double& inputValue, double& outputValue) const
447  {
448  assert( bandIdx < m_inputNBands );
449  outputValue = std::log10( inputValue + m_transformBandInfo[bandIdx]->m_contrastOffset1 + 1.0 ) *
450  m_transformBandInfo[bandIdx]->m_contrastGain;
451  }
452 
453  /*! Function used to adjust the value in raster range */
454  inline void fixValue(double& value, short& band) const
455  {
456  value = std::max(m_transformBandInfo[band]->m_rstMinValue, std::min(m_transformBandInfo[band]->m_rstMaxValue, value));
457  }
458 
459  /*!
460  \brief Function used to check if value is or not a valid value
461 
462  \return True if the value is EQUAL to NoValue and false in other case.
463  */
464  inline bool checkNoValue(double& value, int band) const
465  {
466  return (m_transformBandInfo[band]->m_noDataValue == value);
467  }
468 
469  /*!
470  \brief Function used to check the alpha value
471 
472  \return Return the alpha value.
473  */
474  double checkAlphaValue(double icol, double ilin);
475 
476  /*! Function used to get the interpolated color given a pixel value */
477  te::color::RGBAColor getInterpolatedColor(double value);
478 
479  /*! Function used to get the categorized color given a pixel value */
480  te::color::RGBAColor getCategorizedColor(double value);
481 
482  /*! Function used to get the recoded color given a pixel value */
483  te::color::RGBAColor getRecodedColor(double value);
484 
485  private:
486 
487  te::rst::Raster* m_rasterIn; //!< Pointer to a input raster.
488  te::rst::Raster* m_rasterOut; //!< Pointer to a output raster.
489 
490  std::size_t m_inputNBands; //!< Number of bands from input raster.
491 
492  short m_monoBand; //!< Value for the gray band.
493  short m_redBand; //!< Value for the red band.
494  short m_greenBand; //!< Value for the green band.
495  short m_blueBand; //!< Value for the blue band.
496  short m_alphaBand; //!< Value for the alpha band.
497 
498  double m_transp; //!< Global transparency value for transformation.
499 
500  ContrastType m_currentContrastType; //!< Current contrast type.
501  ContrastTransformFunction m_contrastTransfFuncPtr; //!< Function used in contrast transformation operation.
502 
503  TransformFunction m_transfFuncPtr; //!< Function used in transformation operation.
504  RGBAFunction m_RGBAFuncPtr; //!< Function used in transformation operation.
505 
506  CategorizedMap m_categorizeMap; //!< Attribute to define the categorized transformation.
507  InterpolatedMap m_interpolateMap; //!< Attribute to define the interpolated transformation.
508  RecodedMap m_recodeMap; //!< Attribute to define the recoded transformation.
509 
510  bool m_useBufferCache; //!< Flag used to indicate if a buffer from input image will be used.
511  BandBufferInfo** m_arrayBuffer; //!< Array of band buffer info from input data.
512 
513  TransformBandInfo** m_transformBandInfo; //!< Array of band transformation information.
514  };
515 
516  } // end namespace map
517 } // end namespace te
518 
519 #endif // __TERRALIB_MAPTOOLS_INTERNAL_RASTERTRANSFORM_H
void applySquareRootContrast(const unsigned int &bandIdx, const double &inputValue, double &outputValue) const
RecodedMap & getRecodedMap()
double getTransparency()
Gets the transparency.
te::color::RGBAColor apply(double icol, double ilin)
void setRecodedMap(RecodedMap map)
void setRGBAFunction(RasterTransform::RGBAFunction transfFuncPtr)
void setTransparency(double value)
Sets the transparency.
te::rst::SetBufferValueFPtr m_setBuffI
A pointer to a function that helps to insert the imaginary part value into a specific buffer data typ...
te::rst::SetBufferValueFPtr m_setBuff
A pointer to a function that helps to insert a double or complex value into a specific buffer data ty...
double m_contrastOffset1
Offsets1 for this band used by the CONTRAST method.
InterpolatedMap & getInterpolatedMap()
TransformBandInfo ** m_transformBandInfo
Array of band transformation information.
void setTransfFunction(RasterTransform::TransformFunction transfFuncPtr)
te::rst::Raster * m_rasterIn
Pointer to a input raster.
RecodedMap m_recodeMap
Attribute to define the recoded transformation.
double m_noDataValue
No data value for this band from input raster.
double m_rstMaxValue
Max value from input raster.
void(* SetBufferValueFPtr)(int index, void *buffer, const double *value)
The type of function used to extract data from a buffer.
Definition: BlockUtils.h:40
te::rst::GetBufferValueFPtr m_getBuff
A pointer to a function that helps to extract a double or complex value from a specific buffer data t...
te::color::RGBAColor(RasterTransform::* RGBAFunction)(double, double)
short m_greenBand
Value for the green band.
ContrastTransformFunction m_contrastTransfFuncPtr
Function used in contrast transformation operation.
void(RasterTransform::* TransformFunction)(double, double, double, double)
te::rst::Raster * getOutputRaster()
Gets the output raster.
double m_contrastOffset2
Offsets2 for this band used by the CONTRAST method.
ContrastType m_currentContrastType
Current contrast type.
RGBAFunction m_RGBAFuncPtr
Function used in transformation operation.
te::rst::Raster * getInputRaster()
Gets the input raster.
double m_rstMinValue
Min value from input raster.
void(* GetBufferValueFPtr)(int index, void *buffer, double *value)
The type of function used to extract data from a buffer.
Definition: BlockUtils.h:37
An abstract class for raster data strucutures.
Definition: Raster.h:71
std::map< RasterThreshold, te::color::RGBAColor > CategorizedMap
void setCategorizedMap(CategorizedMap map)
TERASTEREXPORT void SetBlockFunctions(GetBufferValueFPtr *gb, GetBufferValueFPtr *gbi, SetBufferValueFPtr *sb, SetBufferValueFPtr *sbi, int type)
Sets the pointers to functions that helps to extract a double or complex value from a specific buffer...
TerraLib.
short m_redBand
Value for the red band.
double m_transp
Global transparency value for transformation.
double m_gamma
Gamma gain for this band.
bool m_useBufferCache
Flag used to indicate if a buffer from input image will be used.
#define TEMAPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:60
void fixValue(double &value, short &band) const
std::map< int, te::color::RGBAColor > RecodedMap
void apply(double icol, double ilin, double ocol, double olin)
TransformFunction m_transfFuncPtr
Function used in transformation operation.
te::rst::Raster * m_rasterOut
Pointer to a output raster.
BandBufferInfo(int bandDataType, int width, int height)
std::map< RasterThreshold, te::color::ColorBar > InterpolatedMap
short m_alphaBand
Value for the alpha band.
RGBChannels
The channels of a display.
InterpolatedMap m_interpolateMap
Attribute to define the interpolated transformation.
void setInterpolatedMap(InterpolatedMap map)
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
Definition: RGBAColor.h:57
BandBufferInfo ** m_arrayBuffer
Array of band buffer info from input data.
double m_contrastGain
Gains for this band used by the CONTRAST method.
short m_monoBand
Value for the gray band.
A Raster Transform is a class that defines functions to transform a styled raster.
void applyLogContrast(const unsigned int &bandIdx, const double &inputValue, double &outputValue) const
std::size_t m_inputNBands
Number of bands from input raster.
void applyLinearContrast(const unsigned int &bandIdx, const double &inputValue, double &outputValue) const
te::rst::GetBufferValueFPtr m_getBuffI
A pointer to a function that helps to extract the imaginary part value from a specific buffer data ty...
short m_blueBand
Value for the blue band.
std::pair< double, double > RasterThreshold
CategorizedMap & getCategorizedMap()
bool checkNoValue(double &value, int band) const
Function used to check if value is or not a valid value.
CategorizedMap m_categorizeMap
Attribute to define the categorized transformation.
void applySquareContrast(const unsigned int &bandIdx, const double &inputValue, double &outputValue) const