All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RasterTransform.cpp
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 // TerraLib
27 #include "RasterTransform.h"
28 
29 #include "../raster.h"
30 #include "../raster/RasterProperty.h"
31 #include "../se/RasterSymbolizer.h"
32 
33 // Boost
34 #include <boost/math/special_functions/fpclassify.hpp>
35 
36 // STL
37 #include <limits>
38 
40  m_rasterIn(input),
41  m_rasterOut(output),
42  m_transp(TE_OPAQUE),
43  m_gain(1.),
44  m_offset(0.),
45  m_rContrast(TE_SE_DEFAULT_GAMMA_VALUE),
46  m_gContrast(TE_SE_DEFAULT_GAMMA_VALUE),
47  m_bContrast(TE_SE_DEFAULT_GAMMA_VALUE),
48  m_mContrast(TE_SE_DEFAULT_GAMMA_VALUE),
49  m_monoBand(0),
50  m_monoBandOut(0),
51  m_transfFuncPtr(&RasterTransform::setExtractRGB),
52  m_RGBAFuncPtr(&RasterTransform::getExtractRGB)
53 {
54  m_rstMinValue = -std::numeric_limits<double>::max();
55  m_rstMaxValue = std::numeric_limits<double>::max();
56 }
57 
59 {
60  m_categorizeMap.clear();
61  m_interpolateMap.clear();
62  m_rgbMap.clear();
63 }
64 
65 void te::map::RasterTransform::setRGBMap(std::map<RGBChannels, short>& rgbMap)
66 {
67  m_rgbMap.clear();
68  m_rgbMap[RED_CHANNEL] = -1;
69  m_rgbMap[GREEN_CHANNEL] = -1;
70  m_rgbMap[BLUE_CHANNEL] = -1;
71 
72  std::map<RGBChannels,short>::iterator it = m_rgbMap.begin();
73  while (it != m_rgbMap.end())
74  {
75  if (it->first == RED_CHANNEL)
76  m_rgbMap[RED_CHANNEL] = it->second;
77 
78  else if (it->first == GREEN_CHANNEL)
79  m_rgbMap[GREEN_CHANNEL] = it->second;
80 
81  else if (it->first == BLUE_CHANNEL)
82  m_rgbMap[BLUE_CHANNEL] = it->second;
83 
84  ++it;
85  }
86 }
87 
88 void te::map::RasterTransform::setLinearTransfParameters(double vmin, double vmax, double rmin, double rmax)
89 {
90  m_rstMinValue = rmin;
91  m_rstMaxValue = rmax;
92 
93  if(vmax == vmin)
94  {
95  m_gain = 1.0;
96  m_offset = 0.0;
97  return;
98  }
99 
100  m_gain = (double)(rmax-rmin)/(vmax-vmin);
101 
102  if(boost::math::isnan(m_gain) || boost::math::isinf(m_gain))
103  {
104  m_gain = 1.0;
105  m_offset = 0.0;
106  return;
107  }
108 
109  m_offset = -1*m_gain*vmin+rmin;
110 }
111 
113 {
114  if (m_transfFuncPtr == 0 || m_RGBAFuncPtr)
115  {
116  return NO_TRANSF;
117  }
118  else if (m_transfFuncPtr == &RasterTransform::setMono2ThreeBand &&
119  m_RGBAFuncPtr == &RasterTransform::getMono2ThreeBand)
120  {
121  return MONO2THREE_TRANSF;
122  }
123  else if (m_transfFuncPtr == &RasterTransform::setExtractRGB &&
124  m_RGBAFuncPtr == &RasterTransform::getExtractRGB)
125  {
126  return EXTRACT2RGB_TRANSF;
127  }
128  else if (m_transfFuncPtr == &RasterTransform::setRed2ThreeBand &&
129  m_RGBAFuncPtr == &RasterTransform::getRed2ThreeBand)
130  {
131  return RED2THREE_TRANSF;
132  }
133  else if (m_transfFuncPtr == &RasterTransform::setGreen2ThreeBand &&
134  m_RGBAFuncPtr == &RasterTransform::getGreen2ThreeBand)
135  {
136  return GREEN2THREE_TRANSF;
137  }
138  else if (m_transfFuncPtr == &RasterTransform::setBlue2ThreeBand &&
139  m_RGBAFuncPtr == &RasterTransform::getBlue2ThreeBand)
140  {
141  return BLUE2THREE_TRANSF;
142  }
143  else if (m_transfFuncPtr == &RasterTransform::setCategorize &&
144  m_RGBAFuncPtr == &RasterTransform::getCategorize)
145  {
146  return CATEGORIZE_TRANSF;
147  }
148  else if (m_transfFuncPtr == &RasterTransform::setInterpolate &&
149  m_RGBAFuncPtr == &RasterTransform::getInterpolate)
150  {
151  return INTERPOLATE_TRANSF;
152  }
153  else if (m_transfFuncPtr == &RasterTransform::setBand2Band)
154  {
155  return BAND2BAND_TRANSF;
156  }
157  else
158  {
159  return NO_TRANSF;
160  }
161 }
162 
164 {
165  if (func == MONO2THREE_TRANSF)
166  {
167  m_transfFuncPtr = &RasterTransform::setMono2ThreeBand;
168  m_RGBAFuncPtr = &RasterTransform::getMono2ThreeBand;
169  }
170  else if (func == EXTRACT2RGB_TRANSF)
171  {
172  m_transfFuncPtr = &RasterTransform::setExtractRGB;
173  m_RGBAFuncPtr = &RasterTransform::getExtractRGB;
174  }
175  else if (func == RED2THREE_TRANSF)
176  {
177  m_transfFuncPtr = &RasterTransform::setRed2ThreeBand;
178  m_RGBAFuncPtr = &RasterTransform::getRed2ThreeBand;
179  }
180  else if (func == GREEN2THREE_TRANSF)
181  {
182  m_transfFuncPtr = &RasterTransform::setGreen2ThreeBand;
183  m_RGBAFuncPtr = &RasterTransform::getGreen2ThreeBand;
184  }
185  else if (func == BLUE2THREE_TRANSF)
186  {
187  m_transfFuncPtr = &RasterTransform::setBlue2ThreeBand;
188  m_RGBAFuncPtr = &RasterTransform::getBlue2ThreeBand;
189  }
190  else if (func == CATEGORIZE_TRANSF)
191  {
192  m_transfFuncPtr = &RasterTransform::setCategorize;
193  m_RGBAFuncPtr = &RasterTransform::getCategorize;
194  }
195  else if (func == INTERPOLATE_TRANSF)
196  {
197  m_transfFuncPtr = &RasterTransform::setInterpolate;
198  m_RGBAFuncPtr = &RasterTransform::getInterpolate;
199  }
200  else if (func == BAND2BAND_TRANSF)
201  {
202  m_transfFuncPtr = &RasterTransform::setBand2Band;
203  m_RGBAFuncPtr = 0;
204  }
205  else if (func == EXTRACT2RGBA_TRANSF)
206  {
207  m_transfFuncPtr = &RasterTransform::setExtractRGBA;
208  m_RGBAFuncPtr = &RasterTransform::getExtractRGBA;
209  }
210  else
211  {
212  m_transfFuncPtr = 0;
213  m_RGBAFuncPtr = 0;
214  }
215 }
216 
217 void te::map::RasterTransform::setMono2ThreeBand(double icol, double ilin, double ocol, double olin)
218 {
219  double val;
220 
221  m_rasterIn->getValue((int)icol, (int)ilin, val, m_monoBand);
222 
223  if(checkNoValue(val, m_monoBand) == false)
224  {
225  val = (val * m_gain + m_offset) * m_mContrast;
226 
227  fixValue(val);
228 
229  std::vector<double> vecValues;
230  vecValues.resize(3, val);
231 
232  m_rasterOut->setValues((int)ocol, (int)olin, vecValues);
233  }
234 }
235 
237 {
238  double val;
239 
240  m_rasterIn->getValue((int)icol, (int)ilin, val, m_monoBand);
241 
242  if(checkNoValue(val, m_monoBand) == false)
243  {
244  val = (val * m_gain + m_offset) * m_mContrast;
245 
246  fixValue(val);
247 
248  te::color::RGBAColor c(static_cast<int>(val), static_cast<int>(val), static_cast<int>(val), static_cast<int>(m_transp));
249 
250  return c;
251  }
252 
253  return te::color::RGBAColor();
254 }
255 
256 void te::map::RasterTransform::setExtractRGB(double icol, double ilin, double ocol, double olin)
257 {
258  double valR, valG, valB;
259 
260  m_rasterIn->getValue((int)icol, (int)ilin, valR, m_rgbMap[RED_CHANNEL]);
261  m_rasterIn->getValue((int)icol, (int)ilin, valG, m_rgbMap[GREEN_CHANNEL]);
262  m_rasterIn->getValue((int)icol, (int)ilin, valB, m_rgbMap[BLUE_CHANNEL]);
263 
264  if(checkNoValue(valR, m_rgbMap[RED_CHANNEL]) == false ||
265  checkNoValue(valG, m_rgbMap[GREEN_CHANNEL]) == false ||
266  checkNoValue(valB, m_rgbMap[BLUE_CHANNEL]) == false)
267  {
268  std::vector<double> vecValues;
269 
270  valR = (valR * m_gain + m_offset) * m_rContrast;
271  fixValue(valR);
272  vecValues.push_back(valR);
273 
274  valG = (valG * m_gain + m_offset) * m_gContrast;
275  fixValue(valG);
276  vecValues.push_back(valG);
277 
278  valB = (valB * m_gain + m_offset) * m_bContrast;
279  fixValue(valB);
280  vecValues.push_back(valB);
281 
282  m_rasterOut->setValues((int)ocol, (int)olin, vecValues);
283  }
284 }
285 
287 {
288  double valR, valG, valB;
289 
290  m_rasterIn->getValue((int)icol, (int)ilin, valR, m_rgbMap[RED_CHANNEL]);
291  m_rasterIn->getValue((int)icol, (int)ilin, valG, m_rgbMap[GREEN_CHANNEL]);
292  m_rasterIn->getValue((int)icol, (int)ilin, valB, m_rgbMap[BLUE_CHANNEL]);
293 
294  if(checkNoValue(valR, m_rgbMap[RED_CHANNEL]) == false ||
295  checkNoValue(valG, m_rgbMap[GREEN_CHANNEL]) == false ||
296  checkNoValue(valB, m_rgbMap[BLUE_CHANNEL]) == false)
297  {
298  valR = (valR * m_gain + m_offset) * m_rContrast;
299  fixValue(valR);
300 
301  valG = (valG * m_gain + m_offset) * m_gContrast;
302  fixValue(valG);
303 
304  valB = (valB * m_gain + m_offset) * m_bContrast;
305  fixValue(valB);
306 
307  te::color::RGBAColor c(static_cast<int>(valR), static_cast<int>(valG), static_cast<int>(valB), static_cast<int>(m_transp));
308 
309  return c;
310  }
311 
312  return te::color::RGBAColor();
313 }
314 
315 void te::map::RasterTransform::setExtractRGBA(double icol, double ilin, double ocol, double olin)
316 {
317  double valR, valG, valB, valA;
318 
319  m_rasterIn->getValue((int)icol, (int)ilin, valR, m_rgbMap[RED_CHANNEL]);
320  m_rasterIn->getValue((int)icol, (int)ilin, valG, m_rgbMap[GREEN_CHANNEL]);
321  m_rasterIn->getValue((int)icol, (int)ilin, valB, m_rgbMap[BLUE_CHANNEL]);
322  m_rasterIn->getValue((int)icol, (int)ilin, valA, m_rgbMap[ALPHA_CHANNEL]);
323 
324  if(checkNoValue(valR, m_rgbMap[RED_CHANNEL]) == false ||
325  checkNoValue(valG, m_rgbMap[GREEN_CHANNEL]) == false ||
326  checkNoValue(valB, m_rgbMap[BLUE_CHANNEL]) == false ||
327  checkNoValue(valA, m_rgbMap[ALPHA_CHANNEL]) == false)
328  {
329  std::vector<double> vecValues;
330 
331  valR = (valR * m_gain + m_offset) * m_rContrast;
332  fixValue(valR);
333  vecValues.push_back(valR);
334 
335  valG = (valG * m_gain + m_offset) * m_gContrast;
336  fixValue(valG);
337  vecValues.push_back(valG);
338 
339  valB = (valB * m_gain + m_offset) * m_bContrast;
340  fixValue(valB);
341  vecValues.push_back(valB);
342 
343  fixValue(valA);
344  vecValues.push_back(valB);
345 
346  m_rasterOut->setValues((int)ocol, (int)olin, vecValues);
347  }
348 }
349 
351 {
352  double valR, valG, valB, valA;
353 
354  m_rasterIn->getValue((int)icol, (int)ilin, valR, m_rgbMap[RED_CHANNEL]);
355  m_rasterIn->getValue((int)icol, (int)ilin, valG, m_rgbMap[GREEN_CHANNEL]);
356  m_rasterIn->getValue((int)icol, (int)ilin, valB, m_rgbMap[BLUE_CHANNEL]);
357  m_rasterIn->getValue((int)icol, (int)ilin, valA, m_rgbMap[ALPHA_CHANNEL]);
358 
359  if(checkNoValue(valR, m_rgbMap[RED_CHANNEL]) == false ||
360  checkNoValue(valG, m_rgbMap[GREEN_CHANNEL]) == false ||
361  checkNoValue(valB, m_rgbMap[BLUE_CHANNEL]) == false ||
362  checkNoValue(valA, m_rgbMap[ALPHA_CHANNEL]) == false)
363  {
364  valR = (valR * m_gain + m_offset) * m_rContrast;
365  fixValue(valR);
366 
367  valG = (valG * m_gain + m_offset) * m_gContrast;
368  fixValue(valG);
369 
370  valB = (valB * m_gain + m_offset) * m_bContrast;
371  fixValue(valB);
372 
373  fixValue(valA);
374 
375  if(valA < m_transp)
376  return te::color::RGBAColor(static_cast<int>(valR), static_cast<int>(valG), static_cast<int>(valB), static_cast<int>(valA));
377  else
378  return te::color::RGBAColor(static_cast<int>(valR), static_cast<int>(valG), static_cast<int>(valB), static_cast<int>(m_transp));
379  }
380 
381  return te::color::RGBAColor();
382 }
383 
384 void te::map::RasterTransform::setRed2ThreeBand(double icol, double ilin, double ocol, double olin)
385 {
386  double val;
387 
388  m_rasterIn->getValue((int)icol, (int)ilin, val, m_rgbMap[RED_CHANNEL]);
389 
390  if(checkNoValue(val, m_rgbMap[RED_CHANNEL]) == false)
391  {
392  val = (val * m_gain + m_offset) * m_rContrast;
393 
394  fixValue(val);
395 
396  std::vector<double> vecValues;
397  vecValues.push_back(val);
398  vecValues.push_back(0.);
399  vecValues.push_back(0.);
400 
401  m_rasterOut->setValues((int)ocol, (int)olin, vecValues);
402  }
403 }
404 
406 {
407  double val;
408 
409  m_rasterIn->getValue((int)icol, (int)ilin, val, m_rgbMap[RED_CHANNEL]);
410 
411  if(checkNoValue(val, m_rgbMap[RED_CHANNEL]) == false)
412  {
413  val = (val * m_gain + m_offset) * m_rContrast;
414 
415  fixValue(val);
416 
417  te::color::RGBAColor c(static_cast<int>(val), static_cast<int>(0.), static_cast<int>(0.), static_cast<int>(m_transp));
418 
419  return c;
420 
421  }
422 
423  return te::color::RGBAColor();
424 }
425 
426 void te::map::RasterTransform::setGreen2ThreeBand(double icol, double ilin, double ocol, double olin)
427 {
428  double val;
429 
430  m_rasterIn->getValue((int)icol, (int)ilin, val, m_rgbMap[GREEN_CHANNEL]);
431 
432  if(checkNoValue(val, m_rgbMap[GREEN_CHANNEL]) == false)
433  {
434  val = (val * m_gain + m_offset) * m_gContrast;
435 
436  fixValue(val);
437 
438  std::vector<double> vecValues;
439  vecValues.push_back(0.);
440  vecValues.push_back(val);
441  vecValues.push_back(0.);
442 
443  m_rasterOut->setValues((int)ocol, (int)olin, vecValues);
444  }
445 }
446 
448 {
449  double val;
450 
451  m_rasterIn->getValue((int)icol, (int)ilin, val, m_rgbMap[GREEN_CHANNEL]);
452 
453  if(checkNoValue(val, m_rgbMap[GREEN_CHANNEL]) == false)
454  {
455  val = (val * m_gain + m_offset) * m_gContrast;
456 
457  fixValue(val);
458 
459  te::color::RGBAColor c(static_cast<int>(0.), static_cast<int>(val), static_cast<int>(0.), static_cast<int>(m_transp));
460 
461  return c;
462 
463  }
464 
465  return te::color::RGBAColor();
466 }
467 
468 void te::map::RasterTransform::setBlue2ThreeBand(double icol, double ilin, double ocol, double olin)
469 {
470  double val;
471 
472  m_rasterIn->getValue((int)icol, (int)ilin, val, m_rgbMap[BLUE_CHANNEL]);
473 
474  if(checkNoValue(val, m_rgbMap[BLUE_CHANNEL]) == false)
475  {
476  val = (val * m_gain + m_offset) * m_bContrast;
477 
478  fixValue(val);
479 
480  std::vector<double> vecValues;
481  vecValues.push_back(0.);
482  vecValues.push_back(0.);
483  vecValues.push_back(val);
484 
485  m_rasterOut->setValues((int)ocol, (int)olin, vecValues);
486  }
487 }
488 
490 {
491  double val;
492 
493  m_rasterIn->getValue((int)icol, (int)ilin, val, m_rgbMap[BLUE_CHANNEL]);
494 
495  if(checkNoValue(val, m_rgbMap[BLUE_CHANNEL]) == false)
496  {
497  val = (val * m_gain + m_offset) * m_bContrast;
498 
499  fixValue(val);
500 
501  te::color::RGBAColor c(static_cast<int>(0.), static_cast<int>(0.), static_cast<int>(val), static_cast<int>(m_transp));
502 
503  return c;
504 
505  }
506 
507  return te::color::RGBAColor();
508 }
509 
510 void te::map::RasterTransform::setCategorize(double icol, double ilin, double ocol, double olin)
511 {
512  double val;
513 
514  m_rasterIn->getValue((int)icol, (int)ilin, val, m_monoBand);
515 
516  te::color::RGBAColor c= getCategorizedColor(val);
517 
518  std::vector<double> vecValues;
519  vecValues.push_back(c.getRed());
520  vecValues.push_back(c.getGreen());
521  vecValues.push_back(c.getBlue());
522 
523  m_rasterOut->setValues((int)ocol, (int)olin, vecValues);
524 }
525 
527 {
528  double val;
529 
530  m_rasterIn->getValue((int)icol, (int)ilin, val, m_monoBand);
531 
532  if(checkNoValue(val, m_monoBand) == false)
533  return getCategorizedColor(val);
534 
535  return te::color::RGBAColor();
536 }
537 
538 void te::map::RasterTransform::setInterpolate(double icol, double ilin, double ocol, double olin)
539 {
540  double val;
541 
542  m_rasterIn->getValue((int)icol, (int)ilin, val, m_monoBand);
543 
544  te::color::RGBAColor c= getInterpolatedColor(val);
545 
546  std::vector<double> vecValues;
547  vecValues.push_back(c.getRed());
548  vecValues.push_back(c.getGreen());
549  vecValues.push_back(c.getBlue());
550 
551  m_rasterOut->setValues((int)ocol, (int)olin, vecValues);
552 }
553 
555 {
556  double val;
557 
558  m_rasterIn->getValue((int)icol, (int)ilin, val, m_monoBand);
559 
560  if(checkNoValue(val, m_monoBand) == false)
561  return getInterpolatedColor(val);
562 
563  return te::color::RGBAColor();
564 }
565 
566 void te::map::RasterTransform::setBand2Band(double icol, double ilin, double ocol, double olin)
567 {
568  double val;
569 
570  for(std::size_t t = 0; t < m_rasterIn->getNumberOfBands(); ++t)
571  {
572  m_rasterIn->getValue((int)icol, (int)ilin, val, t);
573 
574  if(checkNoValue(val, t) == false)
575  {
576  val = (val * m_gain + m_offset);
577 
578  fixValue(val);
579 
580  m_rasterOut->setValue((int)ocol, (int)olin, val, t);
581  }
582  }
583 }
584 
586 {
587  if (value < m_rstMinValue)
588  {
589  value = m_rstMinValue;
590  }
591  else if (value > m_rstMaxValue)
592  {
593  value = m_rstMaxValue;
594  }
595 }
596 
597 bool te::map::RasterTransform::checkNoValue(double& value, int band)
598 {
599  if(m_rasterIn->getBand(band)->getProperty()->m_noDataValue == value)
600  {
601  return true;
602  }
603 
604  return false;
605 }
606 
608 {
609  InterpolatedMap::iterator it = m_interpolateMap.begin();
610 
611  while(it != m_interpolateMap.end())
612  {
613  RasterThreshold rt = it->first;
614 
615  if(rt.first<= value && rt.second > value)
616  {
617  int distance = int(value - it->first.first);
618 
619  if(distance < 0)
620  {
621  distance = 0;
622  }
623  else if(distance >= (int)it->second.getColorBar().size())
624  {
625  distance = it->second.getColorBar().size() - 1;
626  }
627 
628  return it->second.getColorBar()[distance];
629  }
630 
631  ++it;
632  }
633 
634  return te::color::RGBAColor();
635 }
636 
638 {
639  CategorizedMap::iterator it = m_categorizeMap.begin();
640 
641  while(it != m_categorizeMap.end())
642  {
643  RasterThreshold rt = it->first;
644 
645  if(rt.first<= value && rt.second > value)
646  {
647  return it->second;
648  }
649 
650  ++it;
651  }
652 
653  return te::color::RGBAColor();
654 }
void setCategorize(double icol, double ilin, double ocol, double olin)
void setTransfFunction(RasterTransfFunctions func)
te::color::RGBAColor getInterpolatedColor(double value)
A Raster Transform is a class that defines functions to transform a styled raster.
void setRGBMap(std::map< RGBChannels, short > &rgbMap)
Sets the rgb map values.
int getRed() const
It returns the red component color value (a value from 0 to 255).
Definition: RGBAColor.h:295
double m_rstMinValue
Min value from input raster.
void setGreen2ThreeBand(double icol, double ilin, double ocol, double olin)
void setInterpolate(double icol, double ilin, double ocol, double olin)
void setBand2Band(double icol, double ilin, double ocol, double olin)
void setExtractRGBA(double icol, double ilin, double ocol, double olin)
void setMono2ThreeBand(double icol, double ilin, double ocol, double olin)
int getBlue() const
It returns the blue component color value (a value from 0 to 255).
Definition: RGBAColor.h:305
te::color::RGBAColor getMono2ThreeBand(double icol, double ilin)
int getGreen() const
It returns the green component color value (a value from 0 to 255).
Definition: RGBAColor.h:300
double m_rstMaxValue
Max value from input raster.
RasterTransfFunctions getTransfFunction()
void setLinearTransfParameters(double vmin, double vmax, double rmin, double rmax)
Set parameters of linear transformation.
void setRed2ThreeBand(double icol, double ilin, double ocol, double olin)
An abstract class for raster data strucutures.
Definition: Raster.h:71
te::color::RGBAColor getGreen2ThreeBand(double icol, double ilin)
#define TE_OPAQUE
For an RGBA color this is the value of the alpha-channel for totally opaque.
Definition: Config.h:39
RasterTransform(te::rst::Raster *input, te::rst::Raster *output)
Constructor.
te::color::RGBAColor getBlue2ThreeBand(double icol, double ilin)
void setBlue2ThreeBand(double icol, double ilin, double ocol, double olin)
te::color::RGBAColor getCategorizedColor(double value)
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
Definition: RGBAColor.h:57
#define TE_SE_DEFAULT_GAMMA_VALUE
It specifies the default gamma value.
Definition: Config.h:107
te::color::RGBAColor getInterpolate(double icol, double ilin)
A Raster Transform is a class that defines functions to transform a styled raster.
te::color::RGBAColor getExtractRGB(double icol, double ilin)
void setExtractRGB(double icol, double ilin, double ocol, double olin)
std::pair< double, double > RasterThreshold
te::color::RGBAColor getExtractRGBA(double icol, double ilin)
bool checkNoValue(double &value, int band)
Function used to check if value is or not a valid value.
te::color::RGBAColor getRed2ThreeBand(double icol, double ilin)
void fixValue(double &value)
te::color::RGBAColor getCategorize(double icol, double ilin)