All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TiePointsLocatorAdvancedDialog.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/widgets/rp/TiePointsLocatorAdvancedDialog.cpp
22 
23  \brief A dialog used to execute tie points location advanced options.
24 */
25 
26 
28 #include "../Exception.h"
29 #include "../../../geometry/GTFactory.h"
30 
31 #include <ui_TiePointsLocatorAdvancedForm.h>
32 
33 #include <QtCore/QString>
34 #include <QCheckBox>
35 #include <QComboBox>
36 
37 namespace te
38 {
39  namespace qt
40  {
41  namespace widgets
42  {
44  QWidget* parent, Qt::WindowFlags f )
45  : QDialog( parent, f )
46  {
47  m_uiPtr = new Ui::TiePointsLocatorAdvancedForm;
48  m_uiPtr->setupUi(this);
49 
50  // Signals & slots
51  connect(m_uiPtr->m_okPushButton, SIGNAL(clicked()), this, SLOT(on_okPushButton_clicked()));
52 
53  // fill form
54 
55 
56  }
57 
59  {
60  delete m_uiPtr;
61  }
62 
64  {
65  m_uiPtr->m_enableGeometryFilterCheckBox->setChecked(
67 
68  m_uiPtr->m_enableMultiThreadCheckBox->setChecked(
70 
72  {
74  {
75  m_uiPtr->m_interesPointsLocationStrategyComboBox->setCurrentIndex(
76  m_uiPtr->m_interesPointsLocationStrategyComboBox->findText( "Surf" ) );
77  break;
78  }
79  default:
80  {
81  m_uiPtr->m_interesPointsLocationStrategyComboBox->setCurrentIndex(
82  m_uiPtr->m_interesPointsLocationStrategyComboBox->findText( "Moravec" ) );
83  }
84  }
85 
90  while( gtItB != gtItE )
91  {
92  m_uiPtr->m_geomTransfNameComboBox->addItem( QString( gtItB->first.c_str() ) );
93  ++gtItB;
94  }
95  m_uiPtr->m_geomTransfNameComboBox->setCurrentIndex(
96  m_uiPtr->m_geomTransfNameComboBox->findText(
98 
99  m_uiPtr->m_geometryFilterAssuranceLineEdit->setText( QString::number(
101 
102  m_uiPtr->m_geomTransfMaxErrorLineEdit->setText( QString::number(
104 
106  {
107  case te::rst::Bilinear :
108  {
109  m_uiPtr->m_interpMethodComboBox->setCurrentIndex(
110  m_uiPtr->m_interpMethodComboBox->findText( "Bilinear" ) );
111  break;
112  }
113  case te::rst::Bicubic :
114  {
115  m_uiPtr->m_interpMethodComboBox->setCurrentIndex(
116  m_uiPtr->m_interpMethodComboBox->findText( "Bicubic" ) );
117  break;
118  }
119  default:
120  {
121  m_uiPtr->m_interpMethodComboBox->setCurrentIndex(
122  m_uiPtr->m_interpMethodComboBox->findText( "NearestNeighbor" ) );
123  }
124  }
125 
126  m_uiPtr->m_maxTiePointsLineEdit->setText( QString::number(
128 
129  m_uiPtr->m_correlationWindowWidthLineEdit->setText( QString::number(
131 
132  m_uiPtr->m_gaussianFilterIterationsLineEdit->setText( QString::number(
134 
135  m_uiPtr->m_minAbsCorrelationLineEdit->setText( QString::number(
137 
138  m_uiPtr->m_moravecWindowWidthLineEdit->setText( QString::number(
140 
141  m_uiPtr->m_maxNormEuclideanDistLineEdit->setText( QString::number(
143 
144  m_uiPtr->m_octavesNumberLineEdit->setText( QString::number(
146 
147  m_uiPtr->m_scalesNumberLineEdit->setText( QString::number(
149  }
150 
152  {
154  m_uiPtr->m_enableGeometryFilterCheckBox->isChecked();
155 
157  m_uiPtr->m_enableMultiThreadCheckBox->isChecked();
158 
159  if( m_uiPtr->m_interesPointsLocationStrategyComboBox->currentText() ==
160  "Surf" )
161  {
164  }
165  else
166  {
169  }
170 
172  m_uiPtr->m_geomTransfNameComboBox->currentText().toStdString();
173 
175  m_uiPtr->m_geometryFilterAssuranceLineEdit->text().toDouble();
176 
178  m_uiPtr->m_geomTransfMaxErrorLineEdit->text().toDouble();
179 
180  if( m_uiPtr->m_interpMethodComboBox->currentText() == "Bilinear" )
181  {
183  }
184  else if( m_uiPtr->m_interpMethodComboBox->currentText() == "Bicubic" )
185  {
187  }
188  else
189  {
191  }
192 
194  m_uiPtr->m_maxTiePointsLineEdit->text().toUInt();
195 
197  m_uiPtr->m_correlationWindowWidthLineEdit->text().toUInt();
198 
200  m_uiPtr->m_gaussianFilterIterationsLineEdit->text().toUInt();
201 
203  m_uiPtr->m_minAbsCorrelationLineEdit->text().toDouble();
204 
206  m_uiPtr->m_moravecWindowWidthLineEdit->text().toUInt();
207 
209  m_uiPtr->m_maxNormEuclideanDistLineEdit->text().toDouble();
210 
212  m_uiPtr->m_octavesNumberLineEdit->text().toUInt();
213 
215  m_uiPtr->m_scalesNumberLineEdit->text().toUInt();
216 
217  hide();
218  }
219  }
220  }
221 }
222 
Near neighborhood interpolation method.
Definition: Enums.h:95
double m_surfMaxNormEuclideanDist
The maximum acceptable euclidean distance when matching features (when applicable), default:0.75, valid range: [0,1].
unsigned int m_moravecWindowWidth
The Moravec window width used to locate canditate tie-points (minimum 3, default: 21 )...
te::rp::TiePointsLocator::InputParameters m_inputParameters
The current parameters.
unsigned int m_surfScalesNumber
The number of sub-sampling scales to generate, when applicable (default:3, minimum:3).
Ui::TiePointsLocatorAdvancedForm * m_uiPtr
User interface.
double m_geomTransfMaxError
The maximum allowed transformation error (pixel units, default:2).
static dictionary_type & getDictionary()
It returns a reference to the internal dictionary of concrete factories.
unsigned int m_moravecCorrelationWindowWidth
The correlation window width used to correlate points between the images (minimum 3...
unsigned int m_moravecNoiseFilterIterations
The number of noise filter iterations, when applicable (used to remove image noise, zero will disable the noise Filter, default:1).
unsigned int m_maxTiePoints
The maximum number of tie-points to generate (0:Automatically calculated, default:2500).
std::map< TFACTORYKEY, TFACTORY *, TKEYCOMPARE >::const_iterator const_iterator
A dialog used to execute tie points location advanced options.
double m_geometryFilterAssurance
Geometry assurance (the error-free selection percent assurance) - Use Lower values for good tie-point...
bool m_enableGeometryFilter
Enable/disable the geometry filter/outliers remotion (default:true).
TiePointsLocatorAdvancedDialog(QWidget *parent=0, Qt::WindowFlags f=0)
Constructs a basic dialog which is a child of parent, with widget flags set to f. ...
std::map< TFACTORYKEY, TFACTORY *, TKEYCOMPARE >::const_iterator end() const
It returns an iterator to the end of the container.
unsigned int m_surfOctavesNumber
The number of octaves to generate, when applicable (default: 2, minimum:2).
double m_moravecMinAbsCorrelation
The minimum acceptable absolute correlation value when matching features (when applicable), default:0.25, valid range: [0,1].
Bicubic interpolation method.
Definition: Enums.h:97
std::map< TFACTORYKEY, TFACTORY *, TKEYCOMPARE >::const_iterator begin() const
It returns an iterator to the first stored factory.
bool m_enableMultiThread
Enable/Disable the use of multi-threads (default:true).
Bilinear interpolation method.
Definition: Enums.h:96
std::string m_geomTransfName
The name of the geometric transformation used to ensure tie-points consistency (see each te::gm::GTFa...
te::rst::Interpolator::Method m_interpMethod
The raster interpolator method (default:NearestNeighbor).
InteresPointsLocationStrategyType m_interesPointsLocationStrategy
The strategy used to locate interest points (default:MoravecStrategyT).