All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
FusionWizard.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/FusionWizard.cpp
22 
23  \brief A Qt dialog that allows users to run a fusion operation defined by RP module.
24 */
25 
26 // TerraLib
27 #include "../../../common/progress/ProgressManager.h"
28 #include "../../../dataaccess/dataset/DataSet.h"
29 #include "../../../dataaccess/utils/Utils.h"
30 #include "../../../raster/Raster.h"
31 #include "../../../rp/IHSFusion.h"
32 #include "../../../rp/Module.h"
33 #include "../../../rp/PCAFusion.h"
34 #include "../../../rp/WisperFusion.h"
35 #include "../help/HelpPushButton.h"
36 #include "../layer/search/LayerSearchWidget.h"
37 #include "../layer/search/LayerSearchWizardPage.h"
38 #include "../progress/ProgressViewerDialog.h"
39 #include "FusionWizard.h"
40 #include "FusionWizardPage.h"
41 #include "RasterInfoWidget.h"
42 #include "RasterInfoWizardPage.h"
43 #include "Utils.h"
44 
45 // STL
46 #include <cassert>
47 
48 // Qt
49 #include <QMessageBox>
50 #include <QApplication>
51 
52 
54  : QWizard(parent)
55 {
56  //configure the wizard
57  this->setWizardStyle(QWizard::ModernStyle);
58  this->setWindowTitle(tr("Fusion"));
59  //this->setFixedSize(640, 480);
60 
61  this->setOption(QWizard::HaveHelpButton, true);
62  this->setOption(QWizard::HelpButtonOnRight, false);
63 
65 
66  this->setButton(QWizard::HelpButton, helpButton);
67 
68  helpButton->setPageReference("plugins/rp/rp_fusion.html");
69 
70  addPages();
71 }
72 
74 {
75 
76 }
77 
79 {
80  if(currentPage() == m_layerLowerSearchPage.get())
81  {
82  std::list<te::map::AbstractLayerPtr> list = m_layerLowerSearchPage->getSearchWidget()->getSelecteds();
83 
84  if(list.empty() == false)
85  {
86  te::map::AbstractLayerPtr l = *list.begin();
87 
88  m_fusionPage->setLower(l);
89  }
90 
91  return m_layerLowerSearchPage->isComplete();
92  }
93  else if(currentPage() == m_layerHigherSearchPage.get())
94  {
95  std::list<te::map::AbstractLayerPtr> list = m_layerHigherSearchPage->getSearchWidget()->getSelecteds();
96 
97  if(list.empty() == false)
98  {
99  te::map::AbstractLayerPtr l = *list.begin();
100 
101  m_fusionPage->setHigher(l);
102  }
103 
104  return m_layerHigherSearchPage->isComplete();
105  }
106  else if(currentPage() == m_fusionPage.get())
107  {
108  return m_fusionPage->isComplete();
109  }
110  else if(currentPage() == m_rasterInfoPage.get())
111  {
112  return execute();
113  }
114 
115  return true;
116 }
117 
118 void te::qt::widgets::FusionWizard::setList(std::list<te::map::AbstractLayerPtr>& layerList)
119 {
120  m_layerLowerSearchPage->getSearchWidget()->setList(layerList);
121  m_layerLowerSearchPage->getSearchWidget()->filterOnlyByRaster();
122 
123  m_layerHigherSearchPage->getSearchWidget()->setList(layerList);
124  m_layerHigherSearchPage->getSearchWidget()->filterOnlyByRaster();
125 }
126 
128 {
129  return m_outputLayer;
130 }
131 
133 {
134  m_layerLowerSearchPage.reset(new te::qt::widgets::LayerSearchWizardPage(this));
135  m_layerHigherSearchPage.reset(new te::qt::widgets::LayerSearchWizardPage(this));
136  m_fusionPage.reset(new te::qt::widgets::FusionWizardPage(this));
137  m_rasterInfoPage.reset(new te::qt::widgets::RasterInfoWizardPage(this));
138 
139  addPage(m_layerLowerSearchPage.get());
140  addPage(m_layerHigherSearchPage.get());
141  addPage(m_fusionPage.get());
142  addPage(m_rasterInfoPage.get());
143 
144  //for contrast only one layer can be selected
145  m_layerLowerSearchPage->setSubTitle(tr("Allows selection of layers using filters for selection. Select the layer with a LOWER raster resolution."));
146  m_layerLowerSearchPage->getSearchWidget()->enableMultiSelection(false);
147  m_layerHigherSearchPage->setSubTitle(tr("Allows selection of layers using filters for selection. Select the layer with a HIGHER raster resolution."));
148  m_layerHigherSearchPage->getSearchWidget()->enableMultiSelection(false);
149 }
150 
152 {
153  if(m_fusionPage->isIHSFusion())
154  return executeIHS();
155 
156  if(m_fusionPage->isPCAFusion())
157  return executePCA();
158 
159  if(m_fusionPage->isWisperFusion())
160  return executeWisper();
161 
162  return false;
163 }
164 
166 {
167  //get layer lower
168  std::list<te::map::AbstractLayerPtr> listLower = m_layerLowerSearchPage->getSearchWidget()->getSelecteds();
169  te::map::AbstractLayerPtr lLower = *listLower.begin();
170  std::auto_ptr<te::da::DataSet> dsLower = lLower->getData();
171 
172  std::size_t rpos = te::da::GetFirstPropertyPos(dsLower.get(), te::dt::RASTER_TYPE);
173 
174  te::rst::Raster* inputRstLower = dsLower->getRaster(rpos).release();
175 
176  //get layer higher
177  std::list<te::map::AbstractLayerPtr> listHigher = m_layerHigherSearchPage->getSearchWidget()->getSelecteds();
178  te::map::AbstractLayerPtr lHigher = *listHigher.begin();
179  std::auto_ptr<te::da::DataSet> dsHigher = lHigher->getData();
180 
181  rpos = te::da::GetFirstPropertyPos(dsHigher.get(), te::dt::RASTER_TYPE);
182 
183  te::rst::Raster* inputRstHigher = dsHigher->getRaster(rpos).release();
184 
185  te::rst::Raster* rasterLower = 0;
186  te::rst::Raster* rasterHigher = 0;
187 
188  adjustRasters(inputRstLower, inputRstHigher, rasterLower, rasterHigher);
189 
190  //run IHS Fusion
191  te::rp::IHSFusion algorithmInstance;
192 
193  te::rp::IHSFusion::InputParameters algoInputParams = m_fusionPage->getInputIHSParams();
194  algoInputParams.m_lowResRasterPtr = rasterLower;
195  algoInputParams.m_highResRasterPtr = rasterHigher;
196 
197  te::rp::IHSFusion::OutputParameters algoOutputParams = m_fusionPage->getOutputIHSParams();
198  algoOutputParams.m_rInfo = m_rasterInfoPage->getWidget()->getInfo();
199  algoOutputParams.m_rType = m_rasterInfoPage->getWidget()->getType();
200 
201  //progress
204 
205  QApplication::setOverrideCursor(Qt::WaitCursor);
206 
207  try
208  {
209  if(algorithmInstance.initialize(algoInputParams))
210  {
211  if(algorithmInstance.execute(algoOutputParams))
212  {
213  algoOutputParams.reset();
214 
215  //set output layer
216  m_outputLayer = te::qt::widgets::createLayer(m_rasterInfoPage->getWidget()->getType(),
217  m_rasterInfoPage->getWidget()->getInfo());
218 
219  QMessageBox::information(this, tr("Fusion"), tr("Fusion ended sucessfully"));
220  }
221  else
222  {
223  QMessageBox::critical(this, tr("Fusion"), tr("Fusion execution error.") +
224  ( " " + te::rp::Module::getLastLogStr() ).c_str());
225 
227 
228  QApplication::restoreOverrideCursor();
229 
230  delete rasterLower;
231  delete rasterHigher;
232 
233  return false;
234  }
235  }
236  else
237  {
238  QMessageBox::critical(this, tr("Fusion"), tr("Fusion initialization error.") +
239  ( " " + te::rp::Module::getLastLogStr() ).c_str() );
240 
242 
243  QApplication::restoreOverrideCursor();
244 
245  delete rasterLower;
246  delete rasterHigher;
247 
248  return false;
249  }
250  }
251  catch(const std::exception& e)
252  {
253  QMessageBox::warning(this, tr("Fusion"), e.what());
254 
256 
257  QApplication::restoreOverrideCursor();
258 
259  delete rasterLower;
260  delete rasterHigher;
261 
262  return false;
263  }
264  catch(...)
265  {
266  QMessageBox::warning(this, tr("Fusion"), tr("An exception has occurred!"));
267 
269 
270  QApplication::restoreOverrideCursor();
271 
272  delete rasterLower;
273  delete rasterHigher;
274 
275  return false;
276  }
277 
279 
280  QApplication::restoreOverrideCursor();
281 
282  delete rasterLower;
283  delete rasterHigher;
284 
285  return true;
286 }
287 
289 {
290 //get layer lower
291  std::list<te::map::AbstractLayerPtr> listLower = m_layerLowerSearchPage->getSearchWidget()->getSelecteds();
292  te::map::AbstractLayerPtr lLower = *listLower.begin();
293  std::auto_ptr<te::da::DataSet> dsLower = lLower->getData();
294 
295  std::size_t rpos = te::da::GetFirstPropertyPos(dsLower.get(), te::dt::RASTER_TYPE);
296 
297  te::rst::Raster* inputRstLower = dsLower->getRaster(rpos).release();
298 
299  //get layer higher
300  std::list<te::map::AbstractLayerPtr> listHigher = m_layerHigherSearchPage->getSearchWidget()->getSelecteds();
301  te::map::AbstractLayerPtr lHigher = *listHigher.begin();
302  std::auto_ptr<te::da::DataSet> dsHigher = lHigher->getData();
303 
304  rpos = te::da::GetFirstPropertyPos(dsHigher.get(), te::dt::RASTER_TYPE);
305 
306  te::rst::Raster* inputRstHigher = dsHigher->getRaster(rpos).release();
307 
308  te::rst::Raster* rasterLower = 0;
309  te::rst::Raster* rasterHigher = 0;
310 
311  adjustRasters(inputRstLower, inputRstHigher, rasterLower, rasterHigher);
312 
313 
314  //run PCA Fusion
315  te::rp::PCAFusion algorithmInstance;
316 
317  te::rp::PCAFusion::InputParameters algoInputParams = m_fusionPage->getInputPCAParams();
318  algoInputParams.m_lowResRasterPtr = rasterLower;
319  algoInputParams.m_highResRasterPtr = rasterHigher;
320 
321  te::rp::PCAFusion::OutputParameters algoOutputParams = m_fusionPage->getOutputPCAParams();
322  algoOutputParams.m_rInfo = m_rasterInfoPage->getWidget()->getInfo();
323  algoOutputParams.m_rType = m_rasterInfoPage->getWidget()->getType();
324 
325  //progress
328 
329  QApplication::setOverrideCursor(Qt::WaitCursor);
330 
331  try
332  {
333  if(algorithmInstance.initialize(algoInputParams))
334  {
335  if(algorithmInstance.execute(algoOutputParams))
336  {
337  algoOutputParams.reset();
338 
339  //set output layer
340  m_outputLayer = te::qt::widgets::createLayer(m_rasterInfoPage->getWidget()->getType(),
341  m_rasterInfoPage->getWidget()->getInfo());
342 
343  QMessageBox::information(this, tr("Fusion"), tr("Fusion ended sucessfully"));
344  }
345  else
346  {
347  QMessageBox::critical(this, tr("Fusion"), tr("Fusion execution error.") +
348  ( " " + te::rp::Module::getLastLogStr() ).c_str());
349 
351 
352  QApplication::restoreOverrideCursor();
353 
354  delete rasterLower;
355  delete rasterHigher;
356 
357  return false;
358  }
359  }
360  else
361  {
362  QMessageBox::critical(this, tr("Fusion"), tr("Fusion initialization error.") +
363  ( " " + te::rp::Module::getLastLogStr() ).c_str() );
364 
366 
367  QApplication::restoreOverrideCursor();
368 
369  delete rasterLower;
370  delete rasterHigher;
371 
372  return false;
373  }
374  }
375  catch(const std::exception& e)
376  {
377  QMessageBox::warning(this, tr("Fusion"), e.what());
378 
380 
381  QApplication::restoreOverrideCursor();
382 
383  delete rasterLower;
384  delete rasterHigher;
385 
386  return false;
387  }
388  catch(...)
389  {
390  QMessageBox::warning(this, tr("Fusion"), tr("An exception has occurred!"));
391 
393 
394  QApplication::restoreOverrideCursor();
395 
396  delete rasterLower;
397  delete rasterHigher;
398 
399  return false;
400  }
401 
403 
404  QApplication::restoreOverrideCursor();
405 
406  delete rasterLower;
407  delete rasterHigher;
408 
409  return true;
410 }
411 
413 {
414  //get layer lower
415  std::list<te::map::AbstractLayerPtr> listLower = m_layerLowerSearchPage->getSearchWidget()->getSelecteds();
416  te::map::AbstractLayerPtr lLower = *listLower.begin();
417  std::auto_ptr<te::da::DataSet> dsLower = lLower->getData();
418 
419  std::size_t rpos = te::da::GetFirstPropertyPos(dsLower.get(), te::dt::RASTER_TYPE);
420 
421  te::rst::Raster* inputRstLower = dsLower->getRaster(rpos).release();
422 
423  //get layer higher
424  std::list<te::map::AbstractLayerPtr> listHigher = m_layerHigherSearchPage->getSearchWidget()->getSelecteds();
425  te::map::AbstractLayerPtr lHigher = *listHigher.begin();
426  std::auto_ptr<te::da::DataSet> dsHigher = lHigher->getData();
427 
428  rpos = te::da::GetFirstPropertyPos(dsHigher.get(), te::dt::RASTER_TYPE);
429 
430  te::rst::Raster* inputRstHigher = dsHigher->getRaster(rpos).release();
431 
432  te::rst::Raster* rasterLower = 0;
433  te::rst::Raster* rasterHigher = 0;
434 
435  adjustRasters(inputRstLower, inputRstHigher, rasterLower, rasterHigher);
436 
437  //run Wisper Fusion
438  te::rp::WisperFusion algorithmInstance;
439 
440  te::rp::WisperFusion::InputParameters algoInputParams = m_fusionPage->getInputWisperParams();
441  algoInputParams.m_lowResRasterPtr = rasterLower;
442  algoInputParams.m_highResRasterPtr = rasterHigher;
443 
444  te::rp::WisperFusion::OutputParameters algoOutputParams = m_fusionPage->getOutputWisperParams();
445  algoOutputParams.m_rInfo = m_rasterInfoPage->getWidget()->getInfo();
446  algoOutputParams.m_rType = m_rasterInfoPage->getWidget()->getType();
447 
448  //progress
451 
452  QApplication::setOverrideCursor(Qt::WaitCursor);
453 
454  try
455  {
456  if(algorithmInstance.initialize(algoInputParams))
457  {
458  if(algorithmInstance.execute(algoOutputParams))
459  {
460  algoOutputParams.reset();
461 
462  //set output layer
463  m_outputLayer = te::qt::widgets::createLayer(m_rasterInfoPage->getWidget()->getType(),
464  m_rasterInfoPage->getWidget()->getInfo());
465 
466  QMessageBox::information(this, tr("Fusion"), tr("Fusion ended sucessfully"));
467  }
468  else
469  {
470  QMessageBox::critical(this, tr("Fusion"), tr("Fusion execution error.") +
471  ( " " + te::rp::Module::getLastLogStr() ).c_str());
472 
474 
475  QApplication::restoreOverrideCursor();
476 
477  delete rasterLower;
478  delete rasterHigher;
479 
480  return false;
481  }
482  }
483  else
484  {
485  QMessageBox::critical(this, tr("Fusion"), tr("Fusion initialization error.") +
486  ( " " + te::rp::Module::getLastLogStr() ).c_str() );
487 
489 
490  QApplication::restoreOverrideCursor();
491 
492  delete rasterLower;
493  delete rasterHigher;
494 
495  return false;
496  }
497  }
498  catch(const std::exception& e)
499  {
500  QMessageBox::warning(this, tr("Fusion"), e.what());
501 
503 
504  QApplication::restoreOverrideCursor();
505 
506  delete rasterLower;
507  delete rasterHigher;
508 
509  return false;
510  }
511  catch(...)
512  {
513  QMessageBox::warning(this, tr("Fusion"), tr("An exception has occurred!"));
514 
516 
517  QApplication::restoreOverrideCursor();
518 
519  delete rasterLower;
520  delete rasterHigher;
521 
522  return false;
523  }
524 
526 
527  QApplication::restoreOverrideCursor();
528 
529  delete rasterLower;
530  delete rasterHigher;
531 
532  return true;
533 }
534 
536 {
537  assert(rInLower);
538  assert(rInHigher);
539 
540  if(!m_fusionPage->cropRasters())
541  {
542  rOutLower = rInLower;
543  rOutHigher = rInHigher;
544 
545  return;
546  }
547 
548  //get box
549  te::gm::Envelope boxLower = *rInLower->getExtent();
550  te::gm::Envelope boxHigher = *rInHigher->getExtent();
551 
552  //check if the box is equal
553  if(boxLower.equals(boxHigher))
554  {
555  rOutLower = rInLower;
556  rOutHigher = rInHigher;
557 
558  return;
559  }
560 
561  //check if a reprojection is necessary
562  bool reproject = rInLower->getSRID() != rInHigher->getSRID();
563 
564  if(reproject)
565  boxHigher.transform(rInHigher->getSRID(), rInLower->getSRID());
566 
567  //check the intersection box
568  if(!boxLower.intersects(boxHigher))
569  return;
570 
571  te::gm::Envelope interBox = boxLower.intersection(boxHigher);
572 
573  //generate lower raster
574  std::map<std::string, std::string> rLowerInfo;
575  rLowerInfo["FORCE_MEM_DRIVER"] = "TRUE";
576 // rLowerInfo["MEM_RASTER_NROWS"] = boost::lexical_cast<std::string>(interBox.getHeight() / rInLower->getResolutionX());
577 // rLowerInfo["MEM_RASTER_NCOLS"] = boost::lexical_cast<std::string>(interBox.getWidth() / rInLower->getResolutionY());
578 // rLowerInfo["MEM_RASTER_DATATYPE"] = boost::lexical_cast<std::string>(rInLower->getBandDataType(0));
579 // rLowerInfo["MEM_RASTER_NBANDS"] = boost::lexical_cast<std::string>(rInLower->getNumberOfBands());
580 
581  rOutLower = rInLower->trim(&interBox, rLowerInfo);
582 
583  //generate higher raster
584  std::map<std::string, std::string> rHigherInfo;
585  rHigherInfo["FORCE_MEM_DRIVER"] = "TRUE";
586 // rHigherInfo["MEM_RASTER_NROWS"] = boost::lexical_cast<std::string>(interBox.getHeight() / rInHigher->getResolutionX());
587 // rHigherInfo["MEM_RASTER_NCOLS"] = boost::lexical_cast<std::string>(interBox.getWidth() / rInHigher->getResolutionY());
588 // rHigherInfo["MEM_RASTER_DATATYPE"] = boost::lexical_cast<std::string>(rInHigher->getBandDataType(0));
589 // rHigherInfo["MEM_RASTER_NBANDS"] = boost::lexical_cast<std::string>(rInHigher->getNumberOfBands());
590 
591  if(reproject)
592  {
593  boxHigher.transform(rInLower->getSRID(), rInHigher->getSRID());
594 
595  rOutHigher = rInHigher->transform(rInLower->getSRID(), boxHigher.getLowerLeftX(), boxHigher.getLowerLeftY(), boxHigher.getUpperRightX(), boxHigher.getUpperRightY(), rHigherInfo);
596  }
597  else
598  rOutHigher = rInHigher->trim(&interBox, rHigherInfo);
599 }
void adjustRasters(te::rst::Raster *rInLower, te::rst::Raster *rInHigher, te::rst::Raster *&rOutLower, te::rst::Raster *&rOutHigher)
bool execute(AlgorithmOutputParameters &outputParams)
Executes the algorithm using the supplied parameters.
Definition: PCAFusion.cpp:141
te::gm::Envelope * getExtent()
Returns the geographic extension of the raster data.
Definition: Raster.cpp:104
te::rst::Raster const * m_highResRasterPtr
Input high-resolution raster.
Definition: PCAFusion.h:66
std::map< std::string, std::string > m_rInfo
The necessary information to create the output rasters (as described in te::raster::RasterFactory).
Definition: IHSFusion.h:114
Utility functions for the data access module.
te::rst::Raster const * m_lowResRasterPtr
Input low-resolution multi-band raster.
Definition: WisperFusion.h:69
std::string m_rType
Output raster data source type (as described in te::raster::RasterFactory ).
Definition: IHSFusion.h:112
Fusion of a low-resolution multi-band image with a high resolution image using the WiSpeR method...
Definition: WisperFusion.h:57
Fusion of a low-resolution multi-band image with a high resolution image using the IHS method...
Definition: IHSFusion.h:56
bool intersects(const Envelope &rhs) const
It returns true if the envelopes "spatially intersects".
Definition: Envelope.h:493
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state...
Definition: PCAFusion.cpp:109
void setPageReference(const QString &ref)
Sets the documentation page reference.
IHSFusion output parameters.
Definition: IHSFusion.h:108
std::string m_rType
Output raster data source type (as described in te::raster::RasterFactory ).
Definition: PCAFusion.h:100
virtual Raster * trim(const te::gm::Envelope *env, const std::map< std::string, std::string > &rinfo) const
Subsetting operation for trimming (cropping) the raster.
Definition: Raster.cpp:422
const double & getUpperRightX() const
It returns a constant refernce to the x coordinate of the upper right corner.
Definition: Envelope.h:410
IHSFusion input parameters.
Definition: IHSFusion.h:64
bool initialize(const AlgorithmInputParameters &inputParams)
Initialize the algorithm instance making it ready for execution.
const double & getLowerLeftY() const
It returns a constant refernce to the y coordinate of the lower left corner.
Definition: Envelope.h:400
PCAFusion output parameters.
Definition: PCAFusion.h:96
const double & getUpperRightY() const
It returns a constant refernce to the x coordinate of the upper right corner.
Definition: Envelope.h:420
Fusion of a low-resolution multi-band image with a high resolution image using the PCA (Principal com...
Definition: PCAFusion.h:50
te::rst::Raster const * m_lowResRasterPtr
Input low-resolution multi-band raster.
Definition: PCAFusion.h:62
WisperFusion output parameters.
Definition: WisperFusion.h:117
This file defines a class for a Raster Info Wizard page.
bool execute(AlgorithmOutputParameters &outputParams)
Executes the algorithm using the supplied parameters.
This file defines a class for a Fusion Wizard page.
static const std::string & getLastLogStr()
Returns the last log string generated by this module.
Definition: Module.h:53
void removeViewer(int viewerId)
Dettach a progress viewer.
static ProgressManager & getInstance()
It returns a reference to the singleton instance.
bool execute(AlgorithmOutputParameters &outputParams)
Executes the algorithm using the supplied parameters.
Definition: IHSFusion.cpp:150
WisperFusion input parameters.
Definition: WisperFusion.h:65
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
An abstract class for raster data strucutures.
Definition: Raster.h:71
This class is GUI used to define the raster info parameters for raster factory.
te::map::AbstractLayerPtr getOutputLayer()
bool initialize(const AlgorithmInputParameters &inputParams)
Initialize the algorithm instance making it ready for execution.
Definition: PCAFusion.cpp:285
This file has the RasterInfoWidget class.
te::rst::Raster const * m_highResRasterPtr
Input high-resolution raster.
Definition: WisperFusion.h:77
This class is GUI used to define the fusion parameters for the RP fusion operation.
A Qt dialog that allows users to run a fusion operation defined by RP module.
bool equals(const Envelope &rhs) const
It returns true if the envelopes are "spatially equal".
Definition: Envelope.h:477
std::map< std::string, std::string > m_rInfo
The necessary information to create the output rasters (as described in te::raster::RasterFactory).
Definition: WisperFusion.h:123
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state...
virtual bool validateCurrentPage()
int addViewer(AbstractProgressViewer *apv)
Attach a progress viewer.
int getSRID() const
Returns the raster spatial reference system identifier.
Definition: Raster.cpp:203
virtual Raster * transform(int srid, const std::map< std::string, std::string > &rinfo, int m=1) const
Reprojects this raster to a distinct SRS. This method reprojects this raster to a distinct SRS...
Definition: Raster.cpp:646
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state...
Definition: IHSFusion.cpp:118
std::map< std::string, std::string > m_rInfo
The necessary information to create the output rasters (as described in te::raster::RasterFactory).
Definition: PCAFusion.h:102
Push button that uses te::qt::widgets::HelpManager on its mouse pressed implementation.
PCAFusion input parameters.
Definition: PCAFusion.h:58
const double & getLowerLeftX() const
It returns a constant reference to the x coordinate of the lower left corner.
Definition: Envelope.h:390
std::string m_rType
Output raster data source type (as described in te::raster::RasterFactory ).
Definition: WisperFusion.h:121
TEDATAACCESSEXPORT std::size_t GetFirstPropertyPos(const te::da::DataSet *dataset, int datatype)
Definition: Utils.cpp:481
te::rst::Raster const * m_highResRasterPtr
Input high-resolution raster.
Definition: IHSFusion.h:76
Envelope intersection(const Envelope &rhs) const
It returns an envelope that represents the point set intersection with another envelope.
Definition: Envelope.h:543
te::rst::Raster const * m_lowResRasterPtr
Input low-resolution multi-band raster.
Definition: IHSFusion.h:68
bool initialize(const AlgorithmInputParameters &inputParams)
Initialize the algorithm instance making it ready for execution.
Definition: IHSFusion.cpp:241
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
void transform(int oldsrid, int newsrid)
It will transform the coordinates of the Envelope from the old SRS to the new one.
Definition: Envelope.cpp:92
TEQTWIDGETSEXPORT te::map::AbstractLayerPtr createLayer(const std::string &driverName, const std::map< std::string, std::string > &connInfo)
Definition: Utils.cpp:40
void setList(std::list< te::map::AbstractLayerPtr > &layerList)