FusionWizardPage.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 terralib/qt/widgets/rp/FusionWizardPage.cpp
22 
23  \brief This file defines a class for a Fusion Wizard page.
24 */
25 
26 // TerraLib
27 #include "../../../common/StringUtils.h"
28 #include "../../../dataaccess/dataset/DataSet.h"
29 #include "../../../dataaccess/utils/Utils.h"
30 #include "../../../raster/Interpolator.h"
31 #include "../../../raster/Raster.h"
32 #include "../../../rp/Functions.h"
33 #include "../../../rp/SpectralResponseFunctions.h"
34 #include "../../../se/Utils.h"
35 #include "FusionWizardPage.h"
36 #include "ui_FusionWizardPageForm.h"
37 
38 // Qt
39 #include <QApplication>
40 #include <QFileDialog>
41 #include <QGridLayout>
42 #include <QMessageBox>
43 
44 // stl
45 #include <fstream>
46 #include <iosfwd>
47 #include <memory>
48 #include <stdio.h>
49 
50 //QWT
51 #include <qwt_legend.h>
52 #include <qwt_plot.h>
53 
55 
56 te::qt::widgets::FusionWizardPage::FusionWizardPage(QWidget* parent)
57  : QWizardPage(parent),
58  m_ui(new Ui::FusionWizardPageForm),
59  m_scatterHighRes(nullptr),
60  m_layerLower(nullptr),
61  m_layerHigher(nullptr)
62 {
63 // setup controls
64  m_ui->setupUi(this);
65 
66  fillFusionTypes();
67 
68  fillSensorTypes(m_ui->m_sensorTypeComboBox);
69 
70  fillWaveletTypes();
71 
72  //chart dialog
73  m_chartDialog = new QDialog(this, Qt::Tool | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
74  QGridLayout* dlgLayout = new QGridLayout(m_chartDialog);
75  m_chartDisplay = new te::qt::widgets::ChartDisplay(m_chartDialog);
76  dlgLayout->addWidget(m_chartDisplay);
77 
78  m_chartDisplay->setAxisTitle(QwtPlot::xBottom, tr("Wavelength in Microns"));
79  m_chartDisplay->setAxisTitle(QwtPlot::yLeft, tr("Reflectance"));
80  m_chartDisplay->insertLegend(new QwtLegend(), QwtPlot::RightLegend);
81 
82  //connects
83  connect(m_ui->m_scatterBoolButton, SIGNAL(toggled(bool)), m_chartDialog, SLOT(setVisible(bool)));
84  connect(m_ui->m_sensorTypeComboBox, SIGNAL(activated(int)), this, SLOT(onHighResSensorTypeActivated(int)));
85  connect(m_ui->m_csvToolButton, SIGNAL(clicked()), this, SLOT(onHighCsvToolButtonClicked()));
86 
87 
88  //configure page
89  this->setTitle(tr("Fusion"));
90  this->setSubTitle(tr("Select the type of fusion and set their specific parameters."));
91 
92  m_ui->m_scatterBoolButton->setIcon(QIcon::fromTheme("chart-lines"));
93 }
94 
96 
98 {
99  return true;
100 }
101 
103 {
104  m_layerLower = layer;
105 
106  m_ui->m_ihsLowerLineEdit->setText(m_layerLower->getTitle().c_str());
107  m_ui->m_pcaLowerLineEdit->setText(m_layerLower->getTitle().c_str());
108  m_ui->m_wisperLowerLineEdit->setText(m_layerLower->getTitle().c_str());
109 
110  listBandsLower();
111 }
112 
114 {
115  m_layerHigher = layer;
116 
117  m_ui->m_higherLineEdit_IHS->setText(m_layerHigher->getTitle().c_str());
118  m_ui->m_higherLineEdit_PCA->setText(m_layerHigher->getTitle().c_str());
119  m_ui->m_higherLineEdit_Wisper->setText(m_layerHigher->getTitle().c_str());
120 
121  listBandsHigher();
122 }
123 
125 {
126  int idx = m_ui->m_fusionTypeComboBox->currentIndex();
127 
128  int type = m_ui->m_fusionTypeComboBox->itemData(idx).toInt();
129 
130  if(type == FUSION_IHS)
131  return true;
132 
133  return false;
134 }
135 
137 {
138  int idx = m_ui->m_fusionTypeComboBox->currentIndex();
139 
140  int type = m_ui->m_fusionTypeComboBox->itemData(idx).toInt();
141 
142  if(type == FUSION_PCA)
143  return true;
144 
145  return false;
146 }
147 
149 {
150  int idx = m_ui->m_fusionTypeComboBox->currentIndex();
151 
152  int type = m_ui->m_fusionTypeComboBox->itemData(idx).toInt();
153 
154  if(type == FUSION_WISPER)
155  return true;
156 
157  return false;
158 }
159 
161 {
162  return m_ui->m_cropCheckBox->isChecked();
163 }
164 
166 {
167  int interpolationIdx = m_ui->m_interpolatorComboBox->currentIndex();
168  te::rst::Interpolator::Method method = (te::rst::Interpolator::Method)m_ui->m_interpolatorComboBox->itemData(interpolationIdx).toInt();
169 
170  te::rp::IHSFusion::InputParameters algoInputParams;
171 
172  algoInputParams.m_enableProgress = true;
173  algoInputParams.m_interpMethod = method;
174 
175  algoInputParams.m_lowResRasterRedBandIndex = m_ui->m_ihsRComboBox->currentText().toInt();
176  algoInputParams.m_lowResRasterGreenBandIndex = m_ui->m_ihsGComboBox->currentText().toInt();
177  algoInputParams.m_lowResRasterBlueBandIndex = m_ui->m_ihsBComboBox->currentText().toInt();
178 
179  algoInputParams.m_highResRasterBand = m_ui->m_bandComboBox_IHS->currentText().toInt();
180 
181  return algoInputParams;
182 }
183 
185 {
186  te::rp::IHSFusion::OutputParameters algoOutputParams;
187 
188  return algoOutputParams;
189 }
190 
192 {
193  int interpolationIdx = m_ui->m_interpolatorComboBox->currentIndex();
194  te::rst::Interpolator::Method method = (te::rst::Interpolator::Method)m_ui->m_interpolatorComboBox->itemData(interpolationIdx).toInt();
195 
196  te::rp::PCAFusion::InputParameters algoInputParams;
197 
198  algoInputParams.m_enableProgress = true;
199  algoInputParams.m_interpMethod = method;
200 
201  int nBands = m_ui->m_listWidget->count();
202  for(int i = 0; i < nBands; ++i)
203  {
204  if(m_ui->m_listWidget->item(i)->isSelected())
205  algoInputParams.m_lowResRasterBands.push_back(i);
206  }
207 
208  algoInputParams.m_highResRasterBand = m_ui->m_bandComboBox_PCA->currentText().toInt();
209 
210  return algoInputParams;
211 }
212 
214 {
215  te::rp::PCAFusion::OutputParameters algoOutputParams;
216 
217  return algoOutputParams;
218 }
219 
221 {
222  int idx = m_ui->m_interpolatorComboBox->currentIndex();
223  te::rst::Interpolator::Method method = (te::rst::Interpolator::Method)m_ui->m_interpolatorComboBox->itemData(idx).toInt();
224 
226 
227  algoInputParams.m_enableProgress = true;
228  algoInputParams.m_interpMethod = method;
229 
230  int nBands = m_ui->m_wisperTableWidget->rowCount();
231  for(int i = 0; i < nBands; ++i)
232  {
233  QTableWidgetItem* item = m_ui->m_wisperTableWidget->item(i, 0);
234 
235  if(item->checkState() == Qt::Checked)
236  {
237  algoInputParams.m_lowResRasterBands.push_back(i);
238 
239  QComboBox* cmbBox = (QComboBox*)m_ui->m_wisperTableWidget->cellWidget(i, 2);
240 
241  idx = cmbBox->currentIndex();
242  te::rp::srf::SensorType st = (te::rp::srf::SensorType)cmbBox->itemData(idx).toInt();
243  std::string stName = cmbBox->itemText(idx).toUtf8().data();
244  algoInputParams.m_lowResRasterBandsSRFs.push_back(getSRFMap(st, stName));
245 
246  //algoInputParams.m_lowResRasterBandSensors.push_back((te::rp::srf::SensorType)cmbBox->itemData(idx).toInt());
247  }
248  }
249 
250  algoInputParams.m_highResRasterBand = m_ui->m_bandComboBox_Wisper->currentText().toInt();
251 
252  idx = m_ui->m_sensorTypeComboBox->currentIndex();
253  te::rp::srf::SensorType st = (te::rp::srf::SensorType)m_ui->m_sensorTypeComboBox->itemData(idx).toInt();
254  std::string stName = m_ui->m_sensorTypeComboBox->itemText(idx).toUtf8().data();
255  algoInputParams.m_hiResRasterBandsSRFs = getSRFMap(st, stName);
256 
257  //algoInputParams.m_hiResRasterBandSensor = (te::rp::srf::SensorType)m_ui->m_sensorTypeComboBox->itemData(idx).toInt();
258 
259  //wavelet
260  idx = m_ui->m_waveletComboBox->currentIndex();
261  algoInputParams.m_waveletFilterType = (te::rp::WaveletAtrousFilterType)m_ui->m_waveletComboBox->itemData(idx).toInt();
262  algoInputParams.m_hiResRasterWaveletLevels = (unsigned int)m_ui->m_waveletLevelsSpinBox->value();
263 
264  return algoInputParams;
265 }
266 
268 {
270 
271  return algoOutputParams;
272 }
273 
275 {
276  //start scatter
277  if(!m_scatterHighRes)
278  {
281  m_scatterChartHighRes->setPen(Qt::blue);
282  m_scatterChartHighRes->setSymbol(nullptr);
283  m_scatterChartHighRes->setStyle(QwtPlotCurve::Lines);
285  m_scatterChartHighRes->setTitle(tr("High Resolution"));
286  }
287 
288  te::rp::srf::SensorType st = (te::rp::srf::SensorType)m_ui->m_sensorTypeComboBox->itemData(idx).toInt();
289  std::string stName = m_ui->m_sensorTypeComboBox->itemText(idx).toUtf8().data();
290 
291  std::map<double, double> srf = getSRFMap(st, stName);
292  std::map<double, double>::iterator it;
293 
294  //plot model curve
295  std::vector<double> wavelengthX;
296  std::vector<double> reflectanceY;
297 
298  for(it = srf.begin(); it != srf.end(); ++it)
299  {
300  wavelengthX.push_back(it->first);
301  reflectanceY.push_back(it->second);
302  }
303 
304  m_scatterHighRes->setXValues(wavelengthX);
305  m_scatterHighRes->setYValues(reflectanceY);
308 
309  //replot the chart display
310  m_chartDisplay->replot();
311  m_chartDisplay->updateLayout();
312 }
313 
315 {
316  QComboBox* cmbBox = dynamic_cast<QComboBox*>(sender());
317  if(!cmbBox)
318  return;
319 
320  int row = m_comboMap[cmbBox];
321 
324 
325  //start scatter
326  if(!scatter)
327  {
328  scatter = new te::qt::widgets::Scatter();
329  scatterChart = new te::qt::widgets::ScatterChart(scatter);
330 
331  //color
332  QColor c(te::se::GenerateRandomColor().c_str());
333  scatterChart->setPen(c);
334 
335  scatterChart->setSymbol(nullptr);
336  scatterChart->setStyle(QwtPlotCurve::Lines);
337  scatterChart->attach(m_chartDisplay);
338 
339  //title
340  QString title(tr("Low Resolution - Band "));
341  title.append(QString::number(row));
342  scatterChart->setTitle(title);
343 
344  m_scatterLowResVec[row] = scatter;
345  m_scatterChartLowResVec[row] = scatterChart;
346  }
347 
348  te::rp::srf::SensorType st = (te::rp::srf::SensorType)cmbBox->itemData(idx).toInt();
349  std::string stName = cmbBox->itemText(idx).toUtf8().data();
350 
351  std::map<double, double> srf = getSRFMap(st, stName);
352  std::map<double, double>::iterator it;
353 
354  //plot model curve
355  std::vector<double> wavelengthX;
356  std::vector<double> reflectanceY;
357 
358  for(it = srf.begin(); it != srf.end(); ++it)
359  {
360  wavelengthX.push_back(it->first);
361  reflectanceY.push_back(it->second);
362  }
363 
364  scatter->setXValues(wavelengthX);
365  scatter->setYValues(reflectanceY);
366  scatter->calculateMinMaxValues();
367  scatterChart->setData();
368 
369  //replot the chart display
370  m_chartDisplay->replot();
371  m_chartDisplay->updateLayout();
372 }
373 
375 {
376  QString fileName = QFileDialog::getOpenFileName(this, tr("Open Spectral Response Function File"), "", tr("CSV Files (*.csv *.CSV)"));
377 
378  if(fileName.isEmpty())
379  return;
380 
381  int idx = m_ui->m_sensorTypeComboBox->count();
382  m_ui->m_sensorTypeComboBox->addItem(fileName, QVariant(-1));
383  m_ui->m_sensorTypeComboBox->setCurrentIndex(idx);
385 }
386 
388 {
389  QToolButton* button = dynamic_cast<QToolButton*>(sender());
390  if(!button)
391  return;
392 
393  int row = m_buttonMap[button];
394 
395  QComboBox* combo = (QComboBox*)m_ui->m_wisperTableWidget->cellWidget(row, 2);
396 
397  if(!combo)
398  return;
399 
400  QString fileName = QFileDialog::getOpenFileName(this, tr("Open Spectral Response Function File"), "", tr("CSV Files (*.csv *.CSV)"));
401 
402  if(fileName.isEmpty())
403  return;
404 
405  int idx = combo->count();
406  combo->addItem(fileName, QVariant(-1));
407  combo->setCurrentIndex(idx);
408 }
409 
411 {
412  m_ui->m_fusionTypeComboBox->clear();
413 
414  m_ui->m_fusionTypeComboBox->addItem(tr("IHS"), FUSION_IHS);
415  m_ui->m_fusionTypeComboBox->addItem(tr("PCA"), FUSION_PCA);
416  m_ui->m_fusionTypeComboBox->addItem(tr("WISPER"), FUSION_WISPER);
417 
418  m_ui->m_interpolatorComboBox->clear();
419 
420  m_ui->m_interpolatorComboBox->addItem(tr("Nearest Neighbor"), te::rst::NearestNeighbor);
421  m_ui->m_interpolatorComboBox->addItem(tr("Bilinear"), te::rst::Bilinear);
422  m_ui->m_interpolatorComboBox->addItem(tr("Bicubic"), te::rst::Bicubic);
423 }
424 
426 {
427  combo->clear();
428 
429  combo->addItem("CBERS 2B Band 1", QVariant(te::rp::srf::CBERS2BCCDB1Sensor));
430  combo->addItem("CBERS 2B Band 2", QVariant(te::rp::srf::CBERS2BCCDB2Sensor));
431  combo->addItem("CBERS 2B Band 3", QVariant(te::rp::srf::CBERS2BCCDB3Sensor));
432  combo->addItem("CBERS 2B Band 4", QVariant(te::rp::srf::CBERS2BCCDB4Sensor));
433  combo->addItem("CBERS 2B Band 5", QVariant(te::rp::srf::CBERS2BCCDB5PANSensor));
434 
435  combo->addItem("CBERS 4 MUX Band 5", QVariant(te::rp::srf::CBERS4MUXB5Sensor));
436  combo->addItem("CBERS 4 MUX Band 6", QVariant(te::rp::srf::CBERS4MUXB6Sensor));
437  combo->addItem("CBERS 4 MUX Band 7", QVariant(te::rp::srf::CBERS4MUXB7Sensor));
438  combo->addItem("CBERS 4 MUX Band 8", QVariant(te::rp::srf::CBERS4MUXB8Sensor));
439 
440 
441  combo->addItem("LANDSAT 8 OLI Band 1", QVariant(te::rp::srf::LANDSAT8OLIB1Sensor));
442  combo->addItem("LANDSAT 8 OLI Band 2", QVariant(te::rp::srf::LANDSAT8OLIB2Sensor));
443  combo->addItem("LANDSAT 8 OLI Band 3", QVariant(te::rp::srf::LANDSAT8OLIB3Sensor));
444  combo->addItem("LANDSAT 8 OLI Band 4", QVariant(te::rp::srf::LANDSAT8OLIB4Sensor));
445  combo->addItem("LANDSAT 8 OLI Band 5", QVariant(te::rp::srf::LANDSAT8OLIB5Sensor));
446  combo->addItem("LANDSAT 8 OLI Band 6", QVariant(te::rp::srf::LANDSAT8OLIB6Sensor));
447  combo->addItem("LANDSAT 8 OLI Band 7", QVariant(te::rp::srf::LANDSAT8OLIB7Sensor));
448  combo->addItem("LANDSAT 8 OLI Band 8", QVariant(te::rp::srf::LANDSAT8OLIB8Sensor));
449  combo->addItem("LANDSAT 8 OLI Band 9", QVariant(te::rp::srf::LANDSAT8OLIB9Sensor));
450  combo->addItem("LANDSAT 8 OLI Band 10", QVariant(te::rp::srf::LANDSAT8OLIB10Sensor));
451  combo->addItem("LANDSAT 8 OLI Band 11", QVariant(te::rp::srf::LANDSAT8OLIB11Sensor));
452 
453  combo->addItem("LANDSAT 7 ETM+ Band 1", QVariant(te::rp::srf::LANDSAT7ETMB1Sensor));
454  combo->addItem("LANDSAT 7 ETM+ Band 2", QVariant(te::rp::srf::LANDSAT7ETMB2Sensor));
455  combo->addItem("LANDSAT 7 ETM+ Band 3", QVariant(te::rp::srf::LANDSAT7ETMB3Sensor));
456  combo->addItem("LANDSAT 7 ETM+ Band 4", QVariant(te::rp::srf::LANDSAT7ETMB4Sensor));
457  combo->addItem("LANDSAT 7 ETM+ Band 5", QVariant(te::rp::srf::LANDSAT7ETMB5Sensor));
458  combo->addItem("LANDSAT 7 ETM+ Band 7", QVariant(te::rp::srf::LANDSAT7ETMB7Sensor));
459  combo->addItem("LANDSAT 7 ETM+ Band 8 PAN", QVariant(te::rp::srf::LANDSAT7ETMB8PANSensor));
460 }
461 
463 {
464  m_ui->m_waveletComboBox->clear();
465 
466  m_ui->m_waveletComboBox->addItem(tr("Spline"), te::rp::B3SplineWAFilter);
467  m_ui->m_waveletComboBox->addItem(tr("Triangle"), te::rp::TriangleWAFilter);
468  m_ui->m_waveletComboBox->addItem(tr("Invalid"), te::rp::InvalidWAFilter);
469 }
470 
472 {
473  m_ui->m_ihsRComboBox->clear();
474  m_ui->m_ihsGComboBox->clear();
475  m_ui->m_ihsBComboBox->clear();
476  m_ui->m_listWidget->clear();
477  m_ui->m_wisperTableWidget->setRowCount(0);
478 
479  m_comboMap.clear();
480 
481  assert(m_layerLower.get());
482 
483  //get input raster
484  std::unique_ptr<te::da::DataSet> ds = m_layerLower->getData();
485 
486  if(ds.get())
487  {
488  std::size_t rpos = te::da::GetFirstPropertyPos(ds.get(), te::dt::RASTER_TYPE);
489 
490  std::unique_ptr<te::rst::Raster> inputRst = ds->getRaster(rpos);
491 
492  if(inputRst.get())
493  {
494  for(unsigned int i = 0; i < inputRst->getNumberOfBands(); ++i)
495  {
496  m_ui->m_ihsRComboBox->addItem(QString::number(i));
497  m_ui->m_ihsGComboBox->addItem(QString::number(i));
498  m_ui->m_ihsBComboBox->addItem(QString::number(i));
499  m_ui->m_listWidget->addItem(QString::number(i));
500 
501  //wisper table
502  int newrow = m_ui->m_wisperTableWidget->rowCount();
503  m_ui->m_wisperTableWidget->insertRow(newrow);
504 
505  QString bName(tr("Band "));
506  bName.append(QString::number(i));
507 
508  QTableWidgetItem* itemBand = new QTableWidgetItem(bName);
509  itemBand->setFlags(Qt::ItemIsEnabled | Qt::ItemIsUserCheckable);
510  itemBand->setCheckState(Qt::Checked);
511  m_ui->m_wisperTableWidget->setItem(newrow, 0, itemBand);
512 
513  //csv toolbutton
514  QToolButton* button = new QToolButton(this);
515  button->setText("...");
516  button->setToolTip(tr("Open Spectral Response Function File..."));
517  button->resize(16,16);
518 
519  m_ui->m_wisperTableWidget->setCellWidget(newrow, 1, button);
520 
521  connect(button, SIGNAL(clicked()), this, SLOT(onLowCsvToolButtonClicked()));
522 
523  m_buttonMap.insert(std::map<QToolButton*, int>::value_type(button, (int)i));
524 
525  //combo
526  QComboBox* cmbBox = new QComboBox(this);
527  fillSensorTypes(cmbBox);
528  m_ui->m_wisperTableWidget->setCellWidget(newrow, 2, cmbBox);
529 
530  connect(cmbBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onLowResSensorTypeActivated(int)));
531 
532  m_comboMap.insert(std::map<QComboBox*, int>::value_type(cmbBox, (int)i));
533  }
534 
535  m_scatterLowResVec.resize(inputRst->getNumberOfBands(), nullptr);
536  m_scatterChartLowResVec.resize(inputRst->getNumberOfBands(), nullptr);
537  }
538  }
539 
540  m_ui->m_wisperTableWidget->resizeColumnsToContents();
541 }
542 
544 {
545  m_ui->m_bandComboBox_IHS->clear();
546  m_ui->m_bandComboBox_PCA->clear();
547  m_ui->m_bandComboBox_Wisper->clear();
548 
549  assert(m_layerHigher.get());
550 
551  //get input raster
552  std::unique_ptr<te::da::DataSet> ds = m_layerHigher->getData();
553 
554  if(ds.get())
555  {
556  std::size_t rpos = te::da::GetFirstPropertyPos(ds.get(), te::dt::RASTER_TYPE);
557 
558  std::unique_ptr<te::rst::Raster> inputRst = ds->getRaster(rpos);
559 
560  if(inputRst.get())
561  {
562  for(unsigned int i = 0; i < inputRst->getNumberOfBands(); ++i)
563  {
564  m_ui->m_bandComboBox_IHS->addItem(QString::number(i));
565  m_ui->m_bandComboBox_PCA->addItem(QString::number(i));
566  m_ui->m_bandComboBox_Wisper->addItem(QString::number(i));
567  }
568  }
569  }
570 }
571 
572 std::map<double, double> te::qt::widgets::FusionWizardPage::getSRFMap(const int& st, std::string stName)
573 {
574  std::map<double, double> srfMap;
575 
576  if(st == -1) //from csv file
577  {
578  std::ifstream file(stName.c_str());
579 
580  if(file.is_open())
581  {
582  //create boost tokenizer
583  std::string buffer;
584 
585  //get header line (ignore)
586  std::getline(file, buffer);
587 
588  while(std::getline(file, buffer))
589  {
590  std::vector<std::string> line;
591 
592  te::common::Tokenize(buffer, line, ",");
593 
594  if(line.size() >=2)
595  {
596  double wavelength = atof(line[0].c_str());
597  double response = atof(line[1].c_str());
598 
599  srfMap.insert(std::map<double, double>::value_type(wavelength, response));
600  }
601  }
602  }
603  }
604  else if(st != te::rp::srf::InvalidSensor) //hardcode defined
605  {
607  }
608 
609  return srfMap;
610 }
bool m_enableProgress
Enable/Disable the progress interface (default:false).
Definition: PCAFusion.h:70
te::rp::IHSFusion::InputParameters getInputIHSParams()
te::rp::WisperFusion::OutputParameters getOutputWisperParams()
Near neighborhood interpolation method.
bool m_enableProgress
Enable/Disable the progress interface (default:false).
Definition: WisperFusion.h:87
void getSRF(const SensorType &sensor, ContainerT &container)
Returns a Spectral Response Function from the given sensor.
te::map::AbstractLayerPtr m_layerLower
te::qt::widgets::ChartDisplay * m_chartDisplay
std::unique_ptr< Ui::FusionWizardPageForm > m_ui
IHSFusion output parameters.
Definition: IHSFusion.h:108
IHSFusion input parameters.
Definition: IHSFusion.h:64
PCAFusion output parameters.
Definition: PCAFusion.h:96
unsigned int m_hiResRasterWaveletLevels
The number of wavelet decomposition levels to use (0-automatically found, default:0).
Definition: WisperFusion.h:85
unsigned int m_lowResRasterRedBandIndex
The low-resolution raster red band index (default:0).
Definition: IHSFusion.h:70
te::qt::widgets::ScatterChart * m_scatterChartHighRes
static te::dt::Date ds(2010, 01, 01)
std::map< QToolButton *, int > m_buttonMap
InterpolationMethod
Allowed interpolation methods.
InterpolationMethod Method
Allowed interpolation methods.
Definition: Interpolator.h:62
WisperFusion output parameters.
Definition: WisperFusion.h:117
te::rp::PCAFusion::OutputParameters getOutputPCAParams()
void setLower(te::map::AbstractLayerPtr layer)
This method is used to set the selected layer for classifier operation.
std::vector< te::qt::widgets::ScatterChart * > m_scatterChartLowResVec
te::rst::Interpolator::Method m_interpMethod
The raster interpolator method (default:NearestNeighbor).
Definition: PCAFusion.h:74
SensorType
Satellite sensors.
unsigned int line
void setYValues(std::vector< double > yValues)
It sets the values of the Y axis.
Definition: Scatter.cpp:157
unsigned int m_highResRasterBand
Band to process from the high-resolution raster.
Definition: IHSFusion.h:78
Q_DECLARE_METATYPE(te::map::AbstractLayerPtr) te
void Tokenize(const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters=" ")
It tokenizes a given string with a delimiter of your own choice.
Definition: StringUtils.h:221
This file defines a class for a Fusion Wizard page.
unsigned int m_highResRasterBand
Band to process from the high-resolution raster.
Definition: WisperFusion.h:79
A class to represent a scatter.
Definition: Scatter.h:51
te::rst::Interpolator::Method m_interpMethod
The raster interpolator method (default:NearestNeighbor).
Definition: WisperFusion.h:89
WisperFusion input parameters.
Definition: WisperFusion.h:65
te::rp::WisperFusion::InputParameters getInputWisperParams()
std::vector< te::qt::widgets::Scatter * > m_scatterLowResVec
WaveletAtrousFilterType
Wavelet Atrous Filter types.
URI C++ Library.
Definition: Attributes.h:37
std::vector< std::map< double, double > > m_lowResRasterBandsSRFs
An optional vector of user supplied Spectral Response Functions for each low resolution band (The wav...
Definition: WisperFusion.h:75
A class to represent a chart display.
Definition: ChartDisplay.h:65
std::vector< unsigned int > m_lowResRasterBands
Bands to processe from the low resolution raster.
Definition: WisperFusion.h:71
unsigned int m_lowResRasterBlueBandIndex
The low-resolution raster blue band index (default:2).
Definition: IHSFusion.h:74
te::rp::IHSFusion::OutputParameters getOutputIHSParams()
te::qt::widgets::Scatter * m_scatterHighRes
A class to represent a scatter chart.
Definition: ScatterChart.h:55
bool m_enableProgress
Enable/Disable the progress interface (default:false).
Definition: IHSFusion.h:80
Bicubic interpolation method.
std::vector< unsigned int > m_lowResRasterBands
The low-resolution raster band indexes.
Definition: PCAFusion.h:64
void fillSensorTypes(QComboBox *combo)
void setHigher(te::map::AbstractLayerPtr layer)
This method is used to set the selected layer for classifier operation.
void setXValues(std::vector< double > xValues)
It sets the values of the X axis.
Definition: Scatter.cpp:142
PCAFusion input parameters.
Definition: PCAFusion.h:58
std::map< double, double > m_hiResRasterBandsSRFs
An optional vector of user supplied Spectral Response Functions for the high resolution band (The wav...
Definition: WisperFusion.h:83
void calculateMinMaxValues()
Calculates the minimum and maximum values for both the X and Y axis.
Definition: Scatter.cpp:59
Bilinear interpolation method.
TESEEXPORT std::string GenerateRandomColor()
Creates a random RGB color encoded using two hexadecimal digits per primary-color component prefixed ...
TEDATAACCESSEXPORT std::size_t GetFirstPropertyPos(const te::da::DataSet *dataset, int datatype)
std::map< QComboBox *, int > m_comboMap
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
te::map::AbstractLayerPtr m_layerHigher
te::rst::Interpolator::Method m_interpMethod
The raster interpolator method (default:NearestNeighbor).
Definition: IHSFusion.h:82
unsigned int m_lowResRasterGreenBandIndex
The low-resolution raster green band index (default:1).
Definition: IHSFusion.h:72
unsigned int m_highResRasterBand
Band to process from the high-resolution raster.
Definition: PCAFusion.h:68
file(WRITE ${CMAKE_BINARY_DIR}/config_qhelp.cmake"configure_file (${TERRALIB_ABSOLUTE_ROOT_DIR}/doc/qhelp/help.qhcp.in ${CMAKE_BINARY_DIR}/share/terraview/help/help.qhcp @ONLY)") add_custom_command(OUTPUT del_dir COMMAND $
te::rp::PCAFusion::InputParameters getInputPCAParams()
te::rp::WaveletAtrousFilterType m_waveletFilterType
The wavelet filter type to use (default: TriangleWAFilter);.
Definition: WisperFusion.h:91
std::map< double, double > getSRFMap(const int &st, std::string stName)