File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
ControlPointEditWidget.cpp
1 
7 /* SPDX-License-Identifier: CC0-1.0 */
8 
9 #include "IsisDebug.h"
10 
11 #include "ControlPointEditWidget.h"
12 
13 #include <iomanip>
14 #include <sstream>
15 #include <vector>
16 
17 #include <QAction>
18 #include <QCheckBox>
19 #include <QComboBox>
20 #include <QFileDialog>
21 #include <QFileInfo>
22 #include <QFormLayout>
23 #include <QGroupBox>
24 #include <QHBoxLayout>
25 #include <QLabel>
26 #include <QMainWindow>
27 #include <QMessageBox>
28 #include <QObject>
29 #include <QPushButton>
30 #include <QScrollBar>
31 #include <QShortcut>
32 #include <QSplitter>
33 #include <QTableWidget>
34 #include <QTextEdit>
35 #include <QVBoxLayout>
36 
37 #include "Application.h"
38 #include "Camera.h"
39 #include "Control.h"
40 #include "ControlMeasureEditWidget.h"
41 #include "ControlMeasure.h"
42 #include "ControlMeasureLogData.h"
43 #include "ControlNet.h"
44 #include "ControlPoint.h"
45 #include "DeleteControlPointDialog.h"
46 #include "Directory.h"
47 #include "FileName.h"
48 #include "IException.h"
49 #include "Latitude.h"
50 #include "Longitude.h"
51 #include "MainWindow.h"
52 #include "MdiCubeViewport.h"
53 #include "NewControlPointDialog.h"
54 #include "NewGroundSourceLocationDialog.h"
55 #include "Project.h"
56 #include "Pvl.h"
57 #include "PvlEditDialog.h"
58 #include "SerialNumber.h"
59 #include "SerialNumberList.h"
60 #include "Shape.h"
61 #include "ShapeList.h"
62 #include "SpecialPixel.h"
63 #include "Table.h"
64 #include "TemplateList.h"
65 #include "ToolPad.h"
66 #include "UniversalGroundMap.h"
67 #include "ViewportMainWindow.h"
68 #include "Workspace.h"
69 
70 using namespace std;
71 
72 namespace Isis {
80  ControlPointEditWidget::ControlPointEditWidget (Directory *directory, QWidget *parent,
81  bool addMeasures) : QWidget(parent) {
82 
83  m_directory = directory;
84  m_addMeasuresButton = addMeasures;
85  m_cnetModified = false;
86  m_templateModified = false;
87  m_serialNumberList = NULL;
88  m_editPoint = NULL;
89 
92  m_demOpen = false;
93 
94  m_parent = parent;
95 
97 
98  connect(this, SIGNAL(newControlNetwork(ControlNet *)),
99  m_measureEditor, SIGNAL(newControlNetwork(ControlNet *)));
100 
101  connect(m_directory->project(), SIGNAL(templatesAdded(TemplateList *)),
102  this, SLOT(addTemplates(TemplateList *)));
103  }
104 
105 
106  ControlPointEditWidget::~ControlPointEditWidget () {
107 
108  }
109 
110 
111  QString ControlPointEditWidget::editPointId() {
112 
113  QString result = "";
114  if (m_editPoint) {
115  result = m_editPoint->GetId();
116  }
117  return result;
118  }
119 
120 
121  ControlPoint *ControlPointEditWidget::editPoint() {
122 
123  ControlPoint *result = NULL;
124  if (m_editPoint) {
125  result = m_editPoint;
126  }
127  return result;
128  }
129 
130 
156  void ControlPointEditWidget::createPointEditor(QWidget *parent, bool addMeasures) {
157 
158  setWindowTitle("Control Point Editor");
159  setObjectName("ControlPointEditWidget");
160  connect(this, SIGNAL(destroyed(QObject *)), this, SLOT(clearEditPoint()));
161 
162  createActions();
163 
164  // create m_measureEditor first since we need to get its templateFileName
165  // later
166  m_measureEditor = new ControlMeasureEditWidget(parent, true, true);
167 
168  // TODO Does this need to be moved to ControlNetEditMainWindow???
169  connect(this, SIGNAL(newControlNetwork(ControlNet *)),
170  m_measureEditor, SIGNAL(newControlNetwork(ControlNet *)));
171 
172 
173  connect(this, SIGNAL(stretchChipViewport(Stretch *, CubeViewport *)),
174  m_measureEditor, SIGNAL(stretchChipViewport(Stretch *, CubeViewport *)));
175  connect(m_measureEditor, SIGNAL(measureSaved()), this, SLOT(measureSaved()));
176  connect(this, SIGNAL(cnetModified()), this, SLOT(colorizeSaveNetButton()));
177 
178  QPushButton *addMeasure = NULL;
179  if (m_addMeasuresButton) {
180  addMeasure = new QPushButton("Add Measure(s) to Point");
181  addMeasure->setToolTip("Add a new measure to the edit control point.");
182  addMeasure->setWhatsThis("This allows a new control measure to be added "
183  "to the currently edited control point. A selection "
184  "box with all cubes from the input list will be "
185  "displayed with those that intersect with the "
186  "control point highlighted.");
187  //TODO addMeasure() slot is not implemented ???
188  connect(addMeasure, SIGNAL(clicked()), this, SLOT(addMeasure()));
189  }
190 
191  m_reloadPoint = new QPushButton("Reload Point");
192  m_reloadPoint->setToolTip("Reload the control point.");
193  m_reloadPoint->setWhatsThis("Reload the measures for the control point"
194  " in the Chip Viewports to its saved values. ");
195  connect(m_reloadPoint, SIGNAL(clicked()), this, SLOT(reloadPoint()));
196 
197  m_savePoint = new QPushButton ("Save Point");
198  m_savePoint->setShortcut(Qt::Key_P);
199  m_savePoint->setToolTip("Save the edit control point to the control network. "
200  "<strong>Shortcut: P</strong>");
201  m_savePoint->setWhatsThis("Save the edit control point to the control "
202  "network which is loaded into memory in its entirety. "
203  "When a control point is selected for editing, "
204  "a copy of the point is made so that the original control "
205  "point remains in the network.");
206  m_saveDefaultPalette = m_savePoint->palette();
207  connect (m_savePoint, SIGNAL(clicked()), this, SLOT(savePoint()));
208 
209  m_saveNet = new QPushButton ("Save Control Net");
210  m_saveNet->setShortcut(Qt::Key_S);
211  m_saveNet->setToolTip("Save current control network. "
212  "<strong>Shortcut: S</strong>");
213  m_savePoint->setWhatsThis("Save the control network.");
214 // m_saveDefaultPalette = m_savePoint->palette();
215 // This slot is needed because we cannot directly emit a signal with a ControlNet
216 // argument after the "Save Net" push button is selected since the parameter list must match.
217 // The saveNet slot will simply emit a signal with the ControlNet as the argument.
218  connect (m_saveNet, SIGNAL(clicked()), this, SLOT(saveNet()));
219 
220  QHBoxLayout * saveMeasureLayout = new QHBoxLayout;
221  if (m_addMeasuresButton) {
222  saveMeasureLayout->addWidget(addMeasure);
223  }
224 
225  saveMeasureLayout->addWidget(m_reloadPoint);
226  saveMeasureLayout->addWidget(m_savePoint);
227  saveMeasureLayout->addWidget(m_saveNet);
228  saveMeasureLayout->insertStretch(-1);
229 
230  m_cnetFileNameLabel = new QLabel("Control Network: " + m_cnetFileName);
231 
232  // Create a combobox to allow user to select either the default registration file or one of the
233  // imported registration files.
235  m_templateComboBox->setToolTip("Choose a template file");
236  m_templateComboBox->setWhatsThis("FileName of the sub-pixel "
237  "registration template. Refer to $ISISROOT/doc/documents/"
238  "PatternMatch/PatternMatch.html for a description of the "
239  "contents of this file.");
240  m_templateComboBox->addItem(m_measureEditor->templateFileName());
241  QList <TemplateList *> regTemplates = m_directory->project()->regTemplates();
242  foreach(TemplateList *templateList, regTemplates) {
243  foreach(Template *templateFile, *templateList){
244  m_templateComboBox->addItem(templateFile->importName()
245  + "/" + FileName(templateFile->fileName()).name());
246  }
247  }
248  QFormLayout *templateFileLayout = new QFormLayout();
249  templateFileLayout->addRow("Template File:", m_templateComboBox);
250 
251  // Set-up connections to give registration combobox functionality
252  connect(m_templateComboBox, SIGNAL(activated(QString)),
253  this, SLOT(setTemplateFile(QString)));
254  connect(m_measureEditor, SIGNAL(setTemplateFailed(QString)),
255  this, SLOT(resetTemplateComboBox(QString)));
256 
257  QVBoxLayout * centralLayout = new QVBoxLayout;
258 
259  centralLayout->addWidget(m_cnetFileNameLabel);
260  centralLayout->addLayout(templateFileLayout);
261  centralLayout->addWidget(createTopSplitter());
262  centralLayout->addStretch();
263  centralLayout->addWidget(m_measureEditor);
264  centralLayout->addLayout(saveMeasureLayout);
265 
266  QWidget *centralWidget = new QWidget;
267  centralWidget->setLayout(centralLayout);
268 
269  QScrollArea *scrollArea = new QScrollArea();
270  scrollArea->setObjectName("ControlPointEditWidgetScroll");
271  scrollArea->setWidget(centralWidget);
272  scrollArea->setWidgetResizable(true);
273  centralWidget->adjustSize();
274 
275  QHBoxLayout *mainLayout = new QHBoxLayout;
276  mainLayout->addWidget(scrollArea);
277  setLayout(mainLayout);
278 
279 // connect(this, SIGNAL(controlPointChanged()), this, SLOT(paintAllViewports()));
280 
281 // readSettings();
282  }
283 
284 
291 
292  QHBoxLayout * measureLayout = new QHBoxLayout;
293  measureLayout->addWidget(createLeftMeasureGroupBox());
294  measureLayout->addWidget(createRightMeasureGroupBox());
295 
296  QVBoxLayout * groupBoxesLayout = new QVBoxLayout;
297  groupBoxesLayout->addWidget(createControlPointGroupBox());
298  groupBoxesLayout->addStretch();
299  groupBoxesLayout->addLayout(measureLayout);
300 
301  QWidget * groupBoxesWidget = new QWidget;
302  groupBoxesWidget->setLayout(groupBoxesLayout);
303 
305 
306  QSplitter * topSplitter = new QSplitter;
307  topSplitter->addWidget(groupBoxesWidget);
308  topSplitter->addWidget(m_templateEditorWidget);
309 // topSplitter->setStretchFactor(0, 4);
310 // topSplitter->setStretchFactor(1, 3);
311 
312  m_templateEditorWidget->hide();
313 
314  return topSplitter;
315  }
316 
317 
324 
325  // create left vertical layout
326  m_ptIdValue = new QLabel;
327 
328  m_numMeasures = new QLabel;
329 
330  m_aprioriLatitude = new QLabel;
331  m_aprioriLongitude = new QLabel;
332  m_aprioriRadius = new QLabel;
333 
334  // create right vertical layout's top layout
335  m_lockPoint = new QCheckBox("Edit Lock Point");
336  connect(m_lockPoint, SIGNAL(clicked(bool)), this, SLOT(setLockPoint(bool)));
337  m_ignorePoint = new QCheckBox("Ignore Point");
338  connect(m_ignorePoint, SIGNAL(clicked(bool)),
339  this, SLOT(setIgnorePoint(bool)));
340  connect(this, SIGNAL(ignorePointChanged()), m_ignorePoint, SLOT(toggle()));
341 
343  for (int i=0; i<ControlPoint::PointTypeCount; i++) {
346  }
347  QFormLayout *pointTypeLayout = new QFormLayout;
348  pointTypeLayout->addRow("PointType:", m_pointTypeCombo);
349  connect(m_pointTypeCombo, SIGNAL(activated(int)),
350  this, SLOT(setPointType(int)));
351 
354  connect(m_groundSourceCombo, SIGNAL(currentIndexChanged(int)),
355  this, SLOT(groundSourceFileSelectionChanged(int)));
356  QFormLayout *groundSourceLayout = new QFormLayout;
357  groundSourceLayout->addRow("Ground Source:", m_groundSourceCombo);
358  QFormLayout *radiusSourceLayout = new QFormLayout;
359  radiusSourceLayout->addRow("Radius Source:", m_radiusSourceCombo);
360 
361  QVBoxLayout * mainLayout = new QVBoxLayout;
362  mainLayout->addWidget(m_ptIdValue);
363  mainLayout->addWidget(m_numMeasures);
364  mainLayout->addLayout(groundSourceLayout);
365  mainLayout->addLayout(radiusSourceLayout);
366  mainLayout->addWidget(m_aprioriLatitude);
367  mainLayout->addWidget(m_aprioriLongitude);
368  mainLayout->addWidget(m_aprioriRadius);
369  mainLayout->addWidget(m_lockPoint);
370  mainLayout->addWidget(m_ignorePoint);
371  mainLayout->addLayout(pointTypeLayout);
372 
373  // create the groupbox
374  QGroupBox * groupBox = new QGroupBox("Control Point");
375  groupBox->setLayout(mainLayout);
376 
377  return groupBox;
378  }
379 
380 
387 
388  m_leftCombo = new QComboBox;
389  m_leftCombo->view()->installEventFilter(this);
390  m_leftCombo->setToolTip("Choose left control measure");
391  m_leftCombo->setWhatsThis("Choose left control measure identified by "
392  "cube filename.");
393  connect(m_leftCombo, SIGNAL(activated(int)),
394  this, SLOT(selectLeftMeasure(int)));
395  m_lockLeftMeasure = new QCheckBox("Edit Lock Measure");
396  connect(m_lockLeftMeasure, SIGNAL(clicked(bool)),
397  this, SLOT(setLockLeftMeasure(bool)));
398  m_ignoreLeftMeasure = new QCheckBox("Ignore Measure");
399  connect(m_ignoreLeftMeasure, SIGNAL(clicked(bool)),
400  this, SLOT(setIgnoreLeftMeasure(bool)));
401  connect(this, SIGNAL(ignoreLeftChanged()),
402  m_ignoreLeftMeasure, SLOT(toggle()));
403  m_leftReference = new QLabel();
404  m_leftMeasureType = new QLabel();
405  QVBoxLayout * leftLayout = new QVBoxLayout;
406  leftLayout->addWidget(m_leftCombo);
407  leftLayout->addWidget(m_lockLeftMeasure);
408  leftLayout->addWidget(m_ignoreLeftMeasure);
409  leftLayout->addWidget(m_leftReference);
410  leftLayout->addWidget(m_leftMeasureType);
411 
412  QGroupBox * leftGroupBox = new QGroupBox("Left Measure");
413  leftGroupBox->setLayout(leftLayout);
414 
415  return leftGroupBox;
416  }
417 
418 
429 
430  // create widgets for the right groupbox
431  m_rightCombo = new QComboBox;
432  m_model = new QStandardItemModel();
433  m_rightCombo->setModel(m_model);
434  m_rightCombo->view()->installEventFilter(this);
435  m_rightCombo->setToolTip("Choose right control measure. "
436  "<strong>Shortcuts: PageUp/PageDown</strong>");
437  m_rightCombo->setWhatsThis("Choose right control measure identified by "
438  "cube filename. "
439  "Note: PageUp selects previous measure; "
440  "PageDown selects next meausure.");
441 
442  m_rightCombo->view()->setSelectionMode(QAbstractItemView::SingleSelection);
443  m_rightCombo->view()->setDragEnabled(true);
444  m_rightCombo->view()->setAcceptDrops(true);
445  m_rightCombo->view()->setDropIndicatorShown(true);
446  m_rightCombo->view()->setDragDropMode(QAbstractItemView::InternalMove);
447 
448  // Attach shortcuts to this widget for selecting right measures
449  // Note: Qt handles this memory for us since ControlPointEditWidget is the parent of these shortcuts
450  QShortcut *nextMeasure = new QShortcut(Qt::Key_PageDown, this);
451  connect(nextMeasure, SIGNAL(activated()), this, SLOT(nextRightMeasure()));
452  QShortcut *prevMeasure = new QShortcut(Qt::Key_PageUp, this);
453  connect(prevMeasure, SIGNAL(activated()), this, SLOT(previousRightMeasure()));
454 
455  connect(m_rightCombo, SIGNAL(activated(int)),
456  this, SLOT(selectRightMeasure(int)));
457  m_lockRightMeasure = new QCheckBox("Edit Lock Measure");
458  connect(m_lockRightMeasure, SIGNAL(clicked(bool)),
459  this, SLOT(setLockRightMeasure(bool)));
460  m_ignoreRightMeasure = new QCheckBox("Ignore Measure");
461  connect(m_ignoreRightMeasure, SIGNAL(clicked(bool)),
462  this, SLOT(setIgnoreRightMeasure(bool)));
463  connect(this, SIGNAL(ignoreRightChanged()),
464  m_ignoreRightMeasure, SLOT(toggle()));
465  m_rightReference = new QLabel();
466  m_rightMeasureType = new QLabel();
467 
468  // create right groupbox
469  QVBoxLayout * rightLayout = new QVBoxLayout;
470  rightLayout->addWidget(m_rightCombo);
471  rightLayout->addWidget(m_lockRightMeasure);
472  rightLayout->addWidget(m_ignoreRightMeasure);
473  rightLayout->addWidget(m_rightReference);
474  rightLayout->addWidget(m_rightMeasureType);
475 
476  QGroupBox * rightGroupBox = new QGroupBox("Right Measure");
477  rightGroupBox->setLayout(rightLayout);
478 
479  return rightGroupBox;
480  }
481 
482 
487 
488  QToolBar *toolBar = new QToolBar("Template Editor ToolBar");
489 
490  toolBar->addAction(m_openTemplateFile);
491  toolBar->addSeparator();
492  toolBar->addAction(m_saveTemplateFile);
493  toolBar->addAction(m_saveTemplateFileAs);
494 
495  m_templateEditor = new QTextEdit;
496  connect(m_templateEditor, SIGNAL(textChanged()), this,
497  SLOT(setTemplateModified()));
498 
499  QVBoxLayout *mainLayout = new QVBoxLayout;
500  mainLayout->addWidget(toolBar);
501  mainLayout->addWidget(m_templateEditor);
502 
504  m_templateEditorWidget->setLayout(mainLayout);
505  }
506 
507 
512 
513  m_closePointEditor = new QAction(QIcon(FileName("base/icons/fileclose.png").expanded()),
514  "&Close", this);
515  m_closePointEditor->setToolTip("Close this window");
516  m_closePointEditor->setStatusTip("Close this window");
517  m_closePointEditor->setShortcut(Qt::ALT + Qt::Key_F4);
518  QString whatsThis = "<b>Function:</b> Closes the Match Tool window for this point "
519  "<p><b>Shortcut:</b> Alt+F4 </p>";
520  m_closePointEditor->setWhatsThis(whatsThis);
521  connect(m_closePointEditor, SIGNAL(triggered()), this, SLOT(close()));
522 
523  m_showHideTemplateEditor = new QAction(QIcon(FileName("base/icons/view_text.png").expanded()),
524  "&View/edit registration template", this);
525  m_showHideTemplateEditor->setCheckable(true);
526  m_showHideTemplateEditor->setToolTip("View and/or edit the registration template");
527  m_showHideTemplateEditor->setStatusTip("View and/or edit the registration template");
528  whatsThis = "<b>Function:</b> Displays the curent registration template. "
529  "The user may edit and save changes under a chosen filename.";
530  m_showHideTemplateEditor->setWhatsThis(whatsThis);
531  connect(m_showHideTemplateEditor, SIGNAL(triggered()), this,
532  SLOT(showHideTemplateEditor()));
533 
534  m_saveChips = new QAction(QIcon(FileName("base/icons/window_new.png").expanded()),
535  "Save registration chips", this);
536  m_saveChips->setToolTip("Save registration chips");
537  m_saveChips->setStatusTip("Save registration chips");
538  whatsThis = "<b>Function:</b> Save registration chips to file. "
539  "Each chip: pattern, search, fit will be saved to a separate file.";
540  m_saveChips->setWhatsThis(whatsThis);
541  connect(m_saveChips, SIGNAL(triggered()), this, SLOT(saveChips()));
542 
543  m_openTemplateFile = new QAction(QIcon(FileName("base/icons/fileopen.png").expanded()),
544  "&Open registration template", this);
545  m_openTemplateFile->setToolTip("Set registration template");
546  m_openTemplateFile->setStatusTip("Set registration template");
547  whatsThis = "<b>Function:</b> Allows user to select a new file to set as "
548  "the registration template";
549  m_openTemplateFile->setWhatsThis(whatsThis);
550  connect(m_openTemplateFile, SIGNAL(triggered()), this, SLOT(openTemplateFile()));
551 
552  m_saveTemplateFile = new QAction(QIcon(FileName("base/icons/mActionFileSave.png").expanded()),
553  "&Save template file", this);
554  m_saveTemplateFile->setToolTip("Save the template file");
555  m_saveTemplateFile->setStatusTip("Save the template file");
556  m_saveTemplateFile->setWhatsThis("Save the registration template file");
557  connect(m_saveTemplateFile, SIGNAL(triggered()), this,
558  SLOT(saveTemplateFile()));
559 
560  m_saveTemplateFileAs = new QAction(QIcon(FileName("base/icons/mActionFileSaveAs.png").expanded()),
561  "&Save template as...", this);
562  m_saveTemplateFileAs->setToolTip("Save the template file as");
563  m_saveTemplateFileAs->setStatusTip("Save the template file as");
564  m_saveTemplateFileAs->setWhatsThis("Save the registration template file as");
565  connect(m_saveTemplateFileAs, SIGNAL(triggered()), this,
566  SLOT(saveTemplateFileAs()));
567  }
568 
569 
584  void ControlPointEditWidget::setShapesForPoint(double latitude, double longitude) {
585 
586  if (latitude == Null || longitude == Null) {
587  // Use current editPoint to get latitude, longitude.
588  // Use apriori surface point to find location on ground source. If
589  // apriori surface point does not exist use reference measure
590  if (m_editPoint->HasAprioriCoordinates()) {
591  SurfacePoint sPt = m_editPoint->GetAprioriSurfacePoint();
592  latitude = sPt.GetLatitude().degrees();
593  longitude = sPt.GetLongitude().degrees();
594  }
595  else {
596  ControlMeasure m = *(m_editPoint->GetRefMeasure());
598  Camera *cam;
599  cam = m_controlNet->Camera(camIndex);
600  cam->SetImage(m.GetSample(),m.GetLine());
601  latitude = cam->UniversalLatitude();
602  longitude = cam->UniversalLongitude();
603  }
604  }
605 
607  m_projectShapeNames.clear();
608  m_nameToShapeMap.clear();
609 
610  // Get all shapes from project, putting shapes that contain the current m_editPoint at the
611  // top of the list.
612  QStringList shapeNamesNoPoint;
613  // Create map between the Shape file name & Shape
614  QList<ShapeList *> shapeLists = m_directory->project()->shapes();
615  foreach (ShapeList *shapeList, shapeLists) {
616  foreach (Shape *shape, *shapeList) {
617  UniversalGroundMap *gmap = new UniversalGroundMap(*(shape->cube()));
618  if (gmap->SetUniversalGround(latitude, longitude)) {
619  m_projectShapeNames<<shape->fileName();
620  }
621  else {
622  shapeNamesNoPoint<<shape->fileName();
623  }
624  m_nameToShapeMap[shape->fileName()] = shape;
625  delete gmap;
626  }
627  }
629  // Add shapes that do not contain point
630  if (shapeNamesNoPoint.count() > 0) {
631  m_projectShapeNames<<shapeNamesNoPoint;
632  }
633  }
634 
635 
643  m_measureEditor->setLeftMeasure(m_leftMeasure, m_leftCube.data(), m_editPoint->GetId());
644  m_measureEditor->setRightMeasure(m_rightMeasure, m_rightCube.data(), m_editPoint->GetId());
645  }
646 
647 
654 
655  // TODO If network & snList already exists do some error checking
656  // Make copy; we add ground source files to the list, and we don't want to cause problems for
657  // other ipce entities that are using
658 // if (m_serialNumberList) {
659 // delete m_serialNumberList;
660 // m_serialNumberList = NULL;
661 // }
662 // m_serialNumberList = new SerialNumberList(snList);
663  m_serialNumberList = snList;
664  }
665 
666 
675  // TODO more error checking
676  m_control = control;
677  m_controlNet = control->controlNet();
678  m_cnetFileName = control->fileName();
679 
680  QStringList cnetDirs = m_cnetFileName.split('/');
681  QString strippedCnetFilename = cnetDirs.value(cnetDirs.length() -1);
682  m_cnetFileNameLabel->setText("Control Network: " + strippedCnetFilename);
683  m_cnetFileNameLabel->setToolTip(m_cnetFileName);
684  m_cnetFileNameLabel->setWhatsThis(m_cnetFileName);
685  setWindowTitle("Control Point Editor- Control Network File: " + m_cnetFileName);
686 
687  emit newControlNetwork(m_controlNet);
688  }
689 
690 
698 
699  if (m_directory->project()->activeControl()) {
700  m_control = m_directory->project()->activeControl();
701  m_controlNet = m_control->controlNet();
702  m_cnetFileName = m_control->fileName();
703 
704  m_cnetFileNameLabel->setText("Control Network: " + m_cnetFileName);
705  setWindowTitle("Control Point Editor- Control Network File: " + m_cnetFileName);
706 
707  emit newControlNetwork(m_controlNet);
708  }
709  }
710 
711 
724 
725  ControlMeasure *groundMeasure = createTemporaryGroundMeasure();
726  if (groundMeasure) {
727  m_editPoint->Add(groundMeasure);
728 
729  // Add to measure combo boxes
730  QString groundFile = m_serialNumberList->fileName(groundMeasure->GetCubeSerialNumber());
731  QString tempFileName = FileName(groundFile).name();
732 
733  m_pointFiles<<groundFile;
734  m_leftCombo->addItem(tempFileName);
735  m_rightCombo->addItem(tempFileName);
736  int rightIndex = m_rightCombo->findText(tempFileName);
737  m_rightCombo->setCurrentIndex(rightIndex);
738  selectRightMeasure(rightIndex);
740  }
741  }
742 
743 
757 
758  ControlMeasure *groundMeasure = NULL;
759 
760  // Try to set ground source file information. If unsuccessful, return null ground measure
761  if (!setGroundSourceInfo()) {
762  return groundMeasure;
763  }
764 
765  // Use apriori surface point to find location on ground source. If
766  // apriori surface point does not exist use reference measure
767  double lat = 0.;
768  double lon = 0.;
769  if (m_editPoint->HasAprioriCoordinates()) {
770  SurfacePoint sPt = m_editPoint->GetAprioriSurfacePoint();
771  lat = sPt.GetLatitude().degrees();
772  lon = sPt.GetLongitude().degrees();
773  }
774  else {
775  ControlMeasure m = *(m_editPoint->GetRefMeasure());
777  Camera *cam;
778  cam = m_controlNet->Camera(camIndex);
779  cam->SetImage(m.GetSample(),m.GetLine());
780  lat = cam->UniversalLatitude();
781  lon = cam->UniversalLongitude();
782  }
783 
784  // Try to locate point position on current ground source,
785  if (!m_groundGmap->SetUniversalGround(lat,lon)) {
786  QString message = "This point does not exist on the ground source.\n";
787  message += "Latitude = " + QString::number(lat);
788  message += " Longitude = " + QString::number(lon);
789  message += "\n A ground measure will not be created.";
790  QMessageBox::warning(this, "Warning", message);
791  }
792  else {
793  groundMeasure = new ControlMeasure;
794  groundMeasure->SetCubeSerialNumber(m_groundSN);
795  groundMeasure->SetType(ControlMeasure::Candidate);
796  groundMeasure->SetCoordinate(m_groundGmap->Sample(), m_groundGmap->Line());
797  groundMeasure->SetChooserName("GroundMeasureTemporary");
798  }
799 
800  return groundMeasure;
801  }
802 
803 
814 
815  FileName groundFile;
816  ControlPoint::SurfacePointSource::Source groundSourceType =
817  ControlPoint::SurfacePointSource::None;
818 
819  bool success = false;
820 
821  // No ground source chosen, clear out any old info
822  if (m_groundSourceCombo->currentText().contains("NONE")) {
823  success = false;
824  }
825  else {
826  // Chosen ground source is an imported shape in project
827  if (m_groundSourceCombo->currentText().contains(".ecub")) {
828  Shape *shape = m_nameToShapeMap[m_groundSourceCombo->currentText()];
829  groundFile = FileName(shape->fileName());
830  //groundSourceType = shape->surfacePointSource();
831  success = true;
832  }
833  // Not imported shape, must be from m_editPoints AprioriXYZSource in the cnet
834  else if (m_editPoint->HasAprioriSurfacePointSourceFile()) {
835  groundFile = FileName(m_groundSourceCombo->currentText());
836  // Apriori ground source does not exist and user chose not to give new location so simply
837  // return unsuccessful
838  if (!groundFile.fileExists()) {
839  success = false;
840  }
841  else {
842  groundSourceType = m_editPoint->GetAprioriSurfacePointSource();
843  success = true;
844  }
845  }
846  }
847 
848  // If a new ground file was found set ground source information for later use, first clearing
849  // out the old ground source information. If new ground same as old ground, we will not change
850  // anything, simply return successful.
851  if (success && (groundFile.expanded() != m_groundFilename)) {
853  m_groundFilename = groundFile.expanded();
854 
855  // Get cube, then universal groundmap
856  QScopedPointer<Cube> groundCube(new Cube(groundFile, "r"));
857  m_groundGmap.reset(NULL);
858  QScopedPointer<UniversalGroundMap> newGroundGmap(new UniversalGroundMap(*groundCube));
859  m_groundGmap.reset(newGroundGmap.take());
860 
861  // Create new serial number for ground source and add to serial number list
862  m_groundSN = SerialNumber::Compose(groundFile.expanded(), true);
864 
865  m_groundSourceType = groundSourceType;
866  }
867  // Could not successfully find a ground source file, clear out any old info and return
868  // unsuccessful
869  else if (!success) {
871  }
872 
873  return success;
874  }
875 
876 
888 
889  FileName newGroundFile;
890 
891  if (!groundFile.fileExists()) {
892 
893  // If user previously chose to change all ground source locations, but didn't update the net
894  // fix this ground source to new location
895  // If all groundLocations are to be changed...
897  QFileInfo oldFile(groundFile.expanded());
898  QFileInfo newFile(m_newGroundDir, oldFile.fileName());
899 
900  newGroundFile = FileName(newFile.absoluteFilePath());
901  }
902 
903  // If can't find ground, re-prompt user for new location. Maybe it's a new ground source.
904  if (!newGroundFile.fileExists()) {
905  // Give options for finding ground source file location. A new location
906  // for new location or new source, either a Shape in the project, or import a new shape,
907  // or simplay choose file?
908  QString message = "Ground Source file " + groundFile.expanded();
909  message += " doesn't exist. Has the file moved? Would you like to enter a new location for"
910  " this ground source?";
911  int ret = QMessageBox::question(this, "Ground Source not found", message);
912  if (ret == QMessageBox::Yes) {
913  QString dir = m_directory->project()->shapeDataRoot();
915  "New Ground Source Location", dir);
916  if (dialog->exec() == QDialog::Accepted) {
917  m_newGroundDir = dialog->selectedFiles().value(0);
920  // Change all ground source locations to reflect new directory
923  }
924  // Change location of apriori for current edit point so combo boxes updated properly
925  QFileInfo oldFile(groundFile.expanded());
926  QFileInfo newFile(m_newGroundDir, oldFile.fileName());
927  newGroundFile = newFile.absoluteFilePath();
928  m_editPoint->SetAprioriSurfacePointSourceFile(newGroundFile.toString());
929  }
930  else {
931  // Either user does not want to change location of ground source or the new location
932  // Dialog was cancelled. Load point without the ground source.
933  newGroundFile = NULL;
934  }
935  }
936  else {
937  // Either user does not want to change location of ground source or the new location
938  // Dialog was cancelled. Load point without the ground source.
939  newGroundFile = NULL;
940  }
941  }
942  }
943  return newGroundFile;
944  }
945 
946 
953 
954  for (int i = 0; i < m_controlNet->GetNumPoints(); i++ ) {
955  ControlPoint *cp = m_controlNet->GetPoint(i);
957  FileName groundFile(cp->GetAprioriSurfacePointSourceFile());
958  QFileInfo oldFile(groundFile.expanded());
959  QFileInfo newFile(m_newGroundDir, oldFile.fileName());
960  groundFile = newFile.absoluteFilePath();
961  cp->SetAprioriSurfacePointSourceFile(groundFile.expanded());
962  }
963  }
964  emit cnetModified();
965  }
966 
967 
975 
976  //Get the reference image's shape model
977  QString referenceSN = m_editPoint->GetReferenceSN();
978  QString referenceFileName = m_serialNumberList->fileName(referenceSN);
979  QScopedPointer<Cube> referenceCube(new Cube(referenceFileName, "r"));
980  PvlGroup kernels = referenceCube->group("Kernels");
981  QString shapeFile = kernels["ShapeModel"];
982 
983  // If the reference measure has a shape model cube then set that as the radius
984  // This will NOT WORK for shape model files (not the default of Null or Ellipsoid)
985  // that are not cubes
986  if (shapeFile.contains(".cub")) {
987  if (shapeFile.contains("dem")) {
988  m_radiusSourceType = ControlPoint::RadiusSource::DEM;
989  }
990  else {
991  m_radiusSourceType = ControlPoint::RadiusSource::Ellipsoid;
992  }
993 
994  m_radiusFilename = shapeFile;
995  initDem(shapeFile);
996  }
997  // If no shape model then use the ABC of the target body
998  else {
999  m_radiusSourceType = ControlPoint::RadiusSource::Ellipsoid;
1000  Spice *refSpice = new Spice(*referenceCube);
1001  Distance refRadii[3];
1002  refSpice->radii(refRadii);
1003  m_demFile = QString::number(refRadii[0].meters()) + ", " +
1004  QString::number(refRadii[1].meters()) + ", " +
1005  QString::number(refRadii[2].meters());
1006 
1007  m_radiusFilename = "";
1008  }
1009  }
1010 
1011 
1019  void ControlPointEditWidget::initDem (QString demFile) {
1020 
1021  // If a DEM is already opened, check if new is same as old. If new,
1022  // close old, open new.
1023  if (m_demOpen) {
1024  if (m_demFile == demFile) {
1025  return;
1026  }
1027 
1028  m_demCube.reset(NULL);
1029  m_demFile.clear();
1030  }
1031 
1032  QApplication::setOverrideCursor(Qt::WaitCursor);
1033  try {
1034  QScopedPointer<Cube> newDemCube(new Cube(demFile, "r"));
1035 
1036  m_demFile = FileName(newDemCube->fileName()).name();
1037  m_demCube.reset(newDemCube.take());
1038  }
1039  catch (IException &e) {
1040  QMessageBox::critical(this, "Error", e.toString());
1041  QApplication::restoreOverrideCursor();
1042  return;
1043  }
1044  m_demOpen = true;
1045 
1046  // Make sure this is a dem
1047  if (!m_demCube->hasTable("ShapeModelStatistics")) {
1048  QString message = m_demFile + " is not a DEM.";
1049  QMessageBox::critical(this, "Error", message);
1050  m_demCube.reset(NULL);
1051  m_demOpen = false;
1052  m_demFile.clear();
1053  QApplication::restoreOverrideCursor();
1054  return;
1055  }
1056  m_radiusSourceType = ControlPoint::RadiusSource::DEM;
1057  m_radiusFilename = demFile;
1058 
1059  QApplication::restoreOverrideCursor();
1060  }
1061 
1062 
1070  double ControlPointEditWidget::demRadius(double latitude, double longitude) {
1071 
1072  if (!m_demOpen) return Null;
1073 
1074  UniversalGroundMap *demMap = new UniversalGroundMap(*m_demCube);
1075  if (!demMap->SetUniversalGround(latitude, longitude)) {
1076  delete demMap;
1077  demMap = NULL;
1078  return Null;
1079  }
1080 
1081  // Use bilinear interpolation to read radius from DEM
1082  // Use bilinear interpolation from dem
1083  Interpolator *interp = new Interpolator(Interpolator::BiLinearType);
1084 
1085  // Buffer used to read from the model
1086  Portal *portal = new Portal(interp->Samples(), interp->Lines(),
1087  m_demCube->pixelType(),
1088  interp->HotSample(), interp->HotLine());
1089  portal->SetPosition(demMap->Sample(), demMap->Line(), 1);
1090  m_demCube->read(*portal);
1091  double radius = interp->Interpolate(demMap->Sample(), demMap->Line(),
1092  portal->DoubleBuffer());
1093  delete demMap;
1094  demMap = NULL;
1095  delete interp;
1096  interp = NULL;
1097  delete portal;
1098  portal = NULL;
1099 
1100  return radius;
1101  }
1102 
1103 
1111 
1112  QString newChosenGroundFile = m_groundSourceCombo->currentText();
1113  if (newChosenGroundFile == m_groundFilename) {
1114  return;
1115  }
1117  }
1118 
1119 
1125 
1126  if (m_groundSN.isEmpty()) {
1127  return;
1128  }
1129 
1130  // If the loaded point is a fixed point, see if there is a temporary measure
1131  // holding the coordinate information for the current ground source. If so,
1132  // delete this measure and remove from the Chip viewport and measure selection combo.
1133  if (m_editPoint && m_editPoint->GetType() != ControlPoint::Free &&
1134  m_editPoint->HasSerialNumber(m_groundSN)) {
1135  m_editPoint->Delete(m_groundSN);
1136 
1137  if (m_leftCombo->findText(QFileInfo(m_groundFilename).fileName()) >= 0) {
1138  m_leftCombo->removeItem(m_leftCombo->findText(QFileInfo(m_groundFilename).fileName()));
1139  if (m_leftMeasure->GetCubeSerialNumber() == m_groundSN) {
1140  selectLeftMeasure(0);
1141  }
1142  }
1143  if (m_rightCombo->findText(QFileInfo(m_groundFilename).fileName())) {
1144  m_rightCombo->removeItem(m_rightCombo->findText(QFileInfo(m_groundFilename).fileName()));
1145  if (m_rightMeasure->GetCubeSerialNumber() == m_groundSN) {
1146  selectRightMeasure(0);
1147  }
1148  }
1149  m_pointFiles.removeAll(m_groundFilename);
1150  }
1151  // Remove from serial number list
1153 
1154  // Reset ground source variables
1155  m_groundFilename.clear();
1156  m_groundSN.clear();
1157  m_groundGmap.reset(NULL);
1158  m_groundSourceType = ControlPoint::SurfacePointSource::None;
1159  }
1160 
1161 
1169  void ControlPointEditWidget::setEditPoint(ControlPoint *controlPoint, QString serialNumber) {
1170 
1171  // If m_editPoint was never saved to control net (parent=NULL), delete
1172  if (m_editPoint != NULL && m_editPoint->Parent() == NULL) {
1173  delete m_editPoint;
1174  m_editPoint = NULL;
1175  }
1176 
1177  // If incoming control point is new point (has not been saved to control net, simply assign
1178  // to m_editPoint, otherwise create copy. It will not be saved to net until "Save Point"
1179  // is selected
1180  if (controlPoint->Parent() == NULL) {
1181  m_editPoint = controlPoint;
1182 
1183  // New point in editor, so colorize all save buttons
1184  colorizeAllSaveButtons("red");
1185  }
1186  else {
1187  m_editPoint = new ControlPoint;
1188  *m_editPoint = *controlPoint;
1189 
1190  // New point loaded, make sure all save button's text is default black color
1191  colorizeAllSaveButtons("black");
1192  }
1193  loadPoint(serialNumber);
1194  loadTemplateFile(m_measureEditor->templateFileName());
1195  }
1196 
1197 
1198  void ControlPointEditWidget::colorizeAllSaveButtons(QString color) {
1199 
1200  if (color == "black") {
1201  // Don't need to colorize save measure button, when loading new measure, the measure editor
1202  // will set back to default palette.
1203  m_savePoint->setPalette(m_saveDefaultPalette);
1204  m_saveNet->setPalette(m_saveDefaultPalette);
1205  }
1206  else if (color == "red") {
1207  m_measureEditor->colorizeSaveButton();
1210  }
1211  }
1212 
1213 
1234  void ControlPointEditWidget::loadPoint(QString serialNumber) {
1235 
1236  // Write pointId
1237  QString CPId = m_editPoint->GetId();
1238 
1239  QString ptId("Point ID: ");
1240  ptId += (QString) CPId;
1241  m_ptIdValue->setText(ptId);
1242 
1243  // Set shapes for this point. Shapes are what has been imported into project.
1245 
1246  // Write number of measures
1247  QString ptsize = "Number of Measures: " +
1248  QString::number(m_editPoint->GetNumMeasures());
1249  m_numMeasures->setText(ptsize);
1250 
1251  // Set EditLock box correctly
1252  m_lockPoint->setChecked(m_editPoint->IsEditLocked());
1253 
1254  // Set ignore box correctly
1255  m_ignorePoint->setChecked(m_editPoint->IsIgnored());
1256 
1257 
1258  // Refill combos since they are dependent on the current edit point
1259  // Turn off signals until filled since we don't want slot called.
1260  m_groundSourceCombo->blockSignals(true);
1261  m_radiusSourceCombo->blockSignals(true);
1262  m_groundSourceCombo->clear();
1263  m_radiusSourceCombo->clear();
1264  m_groundSourceCombo->addItem("NONE");
1265  m_groundSourceCombo->setCurrentText("NONE");
1266  m_radiusSourceCombo->addItem("NONE - Use reference measure's radius");
1267  m_radiusSourceCombo->setCurrentText("NONE - Use reference measure's radius");
1268 
1269  // Load any imported project shapes that contain m_editPoint into the ground and any Dem's into
1270  // radius source combo boxes. Only add Dems to radius combo.
1271  if (m_projectShapeNames.count() > 0) {
1272  for (int i=0; i<m_numberProjectShapesWithPoint; i++) {
1273  Shape *shape = m_nameToShapeMap[m_projectShapeNames.at(i)];
1274  if (shape->radiusSource() == ControlPoint::RadiusSource::DEM) {
1275  m_radiusSourceCombo->addItem(shape->fileName());
1276  }
1277  else {
1278  m_groundSourceCombo->addItem(shape->fileName());
1279  }
1280  }
1281  }
1282 
1283  // If available, add the CP AprioriSurfacePointSourceFile and AprioriRadiusSourceFile
1284  if (m_editPoint->HasAprioriSurfacePointSourceFile()) {
1285  FileName aprioriSurfacePointFile = FileName(m_editPoint->GetAprioriSurfacePointSourceFile());
1286  // If file doesn't exist, prompt user for changing location before adding to combo
1287  if (!aprioriSurfacePointFile.fileExists()) {
1288  aprioriSurfacePointFile = checkGroundFileLocation(aprioriSurfacePointFile);
1289  }
1290  if (!aprioriSurfacePointFile.toString().isEmpty()) {
1291  m_groundSourceCombo->addItem(aprioriSurfacePointFile.toString());
1292  m_groundSourceCombo->setCurrentText(aprioriSurfacePointFile.toString());
1293  m_groundSourceCombo->setItemData(m_groundSourceCombo->currentIndex(),
1294  QColor(Qt::darkGreen), Qt::ForegroundRole);
1295  m_groundSourceCombo->setItemData(m_groundSourceCombo->currentIndex(),
1296  QFont("DejaVu Sans", 10, QFont::Bold), Qt::FontRole);
1297  }
1298  }
1299 
1300  if (m_editPoint->HasAprioriRadiusSourceFile()) {
1301  //TODO check location of radius file
1302  m_radiusSourceCombo->addItem(m_editPoint->GetAprioriRadiusSourceFile());
1303  m_radiusSourceCombo->setCurrentText(m_editPoint->GetAprioriRadiusSourceFile());
1304  m_radiusSourceCombo->setItemData(m_radiusSourceCombo->currentIndex(),
1305  QColor(Qt::green), Qt::ForegroundRole);
1306  m_radiusSourceCombo->setItemData(m_groundSourceCombo->currentIndex(),
1307  QFont("DejaVu Sans", 10, QFont::Bold), Qt::FontRole);
1308  }
1309  if (m_editPoint->GetType() == ControlPoint::Free) {
1310  m_groundSourceCombo->setEnabled(false);
1311  m_radiusSourceCombo->setEnabled(false);
1312  }
1313  else {
1314  m_groundSourceCombo->setEnabled(true);
1315  m_radiusSourceCombo->setEnabled(true);
1316  }
1317  m_groundSourceCombo->blockSignals(false);
1318  m_radiusSourceCombo->blockSignals(false);
1319 
1320 
1321  // If constrained or fixed point, create a measure for
1322  // the ground source, load reference on left, ground source on right
1323  if (m_editPoint->GetType() != ControlPoint::Free) {
1324  // If m_editPoint already has a ground measure, delete
1325  for (int i=0; i<m_editPoint->GetNumMeasures(); i++) {
1326  ControlMeasure &m = *(*m_editPoint)[i];
1327  if (m.GetChooserName() == "GroundMeasureTemporary") {
1328  m_editPoint->Delete(&m);
1329  }
1330  }
1331  // Create a temporary measure to hold the ground point info for ground source
1332  // This measure will be deleted when the ControlPoint is saved to the
1333  // ControlNet.
1334  ControlMeasure *groundMeasure = createTemporaryGroundMeasure();
1335  if (groundMeasure) {
1336  m_editPoint->Add(groundMeasure);
1337  }
1338  }
1339 
1340 
1341 
1342  // Reset PointType combo box appropriately.
1343  m_pointTypeCombo->clear();
1344  for (int i=0; i<ControlPoint::PointTypeCount; i++) {
1347  }
1348  m_pointTypeCombo->setCurrentText(ControlPoint::PointTypeToString(m_editPoint->GetType()));
1349  m_pointTypeCombo->setToolTip("Change ControlPoint type");
1350 
1352 
1353 
1354 
1355  // Clear combo boxes
1356  m_leftCombo->clear();
1357  m_rightCombo->clear();
1358  m_pointFiles.clear();
1359 
1360 
1361  // Need all files for this point
1362  for (int i=0; i<m_editPoint->GetNumMeasures(); i++) {
1363  ControlMeasure &m = *(*m_editPoint)[i];
1364  QString file = m_serialNumberList->fileName(m.GetCubeSerialNumber());
1365  m_pointFiles<<file;
1366  QString tempFileName = FileName(file).name();
1367 
1368  // This actually fills the right combo box for selecting measures. A model was used to enable
1369  // drag & drop for ordering measures which will also set the blink order.
1370  QStandardItem *item = new QStandardItem(tempFileName);
1371  item->setFlags(item->flags() & ~Qt::ItemIsDropEnabled);
1372  m_model->appendRow(item);
1373 
1374  m_leftCombo->addItem(tempFileName);
1375 
1376  if (m_editPoint->IsReferenceExplicit() &&
1377  (QString)m.GetCubeSerialNumber() == m_editPoint->GetReferenceSN()) {
1378  m_leftCombo->setItemData(i,QFont("DejaVu Sans", 12, QFont::Bold), Qt::FontRole);
1379  m_rightCombo->setItemData(i,QFont("DejaVu Sans", 12, QFont::Bold), Qt::FontRole);
1380  }
1381  }
1382 
1384 
1385  int leftIndex = -1;
1386  int rightIndex = -1;
1387 
1388  QString referenceSerialNumber;
1389  // Check for reference
1390  if (m_editPoint->IsReferenceExplicit()) {
1391  referenceSerialNumber = m_editPoint->GetReferenceSN();
1392  leftIndex = m_editPoint->IndexOfRefMeasure();
1393  }
1394 
1395  if (!serialNumber.isEmpty() && serialNumber != referenceSerialNumber) {
1396  QString file = m_serialNumberList->fileName(serialNumber);
1397  rightIndex = m_rightCombo->findText(FileName(file).name());
1398  if (leftIndex == -1) {
1399  if (rightIndex == 0) {
1400  leftIndex = 1;
1401  }
1402  else {
1403  leftIndex = 0;
1404  }
1405  }
1406  }
1407 
1408  if (leftIndex == -1) {
1409  if (rightIndex == 0) {
1410  leftIndex = 1;
1411  }
1412  else {
1413  leftIndex = 0;
1414  }
1415  }
1416 
1417  // If ground measure exists, load in right viewport
1418  if (m_editPoint->HasSerialNumber(m_groundSN)) {
1419  rightIndex = m_rightCombo->findText(m_groundSN);
1420  }
1421  if (rightIndex <= 0) {
1422  if (leftIndex == 0) {
1423  rightIndex = 1;
1424  }
1425  else {
1426  rightIndex = 0;
1427  }
1428  }
1429  // Handle pts with a single measure, for now simply put measure on left/right
1430  // Evenutally put on left with black on right??
1431  if (rightIndex > m_editPoint->GetNumMeasures()-1) rightIndex = 0;
1432 
1433  m_rightCombo->setCurrentIndex(rightIndex);
1434  m_leftCombo->setCurrentIndex(leftIndex);
1435 
1436  // Initialize pointEditor with measures
1437  selectLeftMeasure(leftIndex);
1438  selectRightMeasure(rightIndex);
1439 
1440  this->setVisible(true);
1441  this->raise();
1442  }
1443 
1444 
1455  void ControlPointEditWidget::createControlPoint(double latitude, double longitude, Cube *cube,
1456  bool isGroundSource) {
1457 
1458  // TODO: CHECK SUBPIXEL REGISTER RADIO BUTTON OPTION (CHECKBOX?)
1459 
1460  // Create list box of all files highlighting those that
1461  // contain the point.
1462  QStringList pointFiles;
1463 
1464  Camera *cam;
1465  for (int i = 0; i < m_serialNumberList->size(); i++) {
1466  if (m_serialNumberList->serialNumber(i) == m_groundSN) continue;
1467  cam = m_controlNet->Camera(i);
1468  if (cam->SetUniversalGround(latitude, longitude)) {
1469  // Make sure point is within image boundary
1470  double samp = cam->Sample();
1471  double line = cam->Line();
1472  if (samp >= 1 && samp <= cam->Samples() &&
1473  line >= 1 && line <= cam->Lines()) {
1474  pointFiles<<m_serialNumberList->fileName(i);
1475  }
1476  }
1477  }
1478 
1479  // Set shapes from project to fill dialog, indicating number of shapes that contain the CP.
1480  // The shapes which contain the CP will be at the front of the QStringList.
1481  setShapesForPoint(latitude, longitude);
1482 
1484  m_serialNumberList, m_lastUsedPointId, this, true, true, true);
1485  newPointDialog->setFiles(pointFiles);
1486  newPointDialog->setGroundSource(m_projectShapeNames, m_numberProjectShapesWithPoint);
1487 
1488  // Load imported project shapes that are Dems and contain point location into the radius combo.
1489  if (m_projectShapeNames.count() > 0) {
1490  QStringList radiusSourceFiles;
1491  for (int i=0; i<m_numberProjectShapesWithPoint; i++) {
1492  Shape *shape = m_nameToShapeMap[m_projectShapeNames.at(i)];
1493  if (shape->radiusSource() == ControlPoint::RadiusSource::DEM) {
1494  radiusSourceFiles<<shape->fileName();
1495  }
1496  }
1497  newPointDialog->setRadiusSource(radiusSourceFiles);
1498  }
1499 
1500 
1501 
1502  if (newPointDialog->exec() == QDialog::Accepted) {
1503  m_lastUsedPointId = newPointDialog->pointId();
1504  ControlPoint *newPoint =
1506 
1507  // If this ControlPointId already exists, message box pops up and user is
1508  // asked to enter a new value.
1509  if (m_controlNet->ContainsPoint(newPoint->GetId())) {
1510  QString message = "A ControlPoint with Point Id = [" + newPoint->GetId();
1511  message += "] already exists. Re-enter Point Id for this ControlPoint.";
1512  QMessageBox::warning(this, "New Point Id", message);
1513  pointFiles.clear();
1514  delete newPoint;
1515  newPoint = NULL;
1516  createControlPoint(latitude, longitude);
1517  return;
1518  }
1519 
1521 
1522  QStringList selectedFiles = newPointDialog->selectedFiles();
1523  foreach (QString selectedFile, selectedFiles) {
1524  // Create measure for any file selected
1525  ControlMeasure *m = new ControlMeasure;
1526  // Find serial number for this file
1527  QString sn = m_serialNumberList->serialNumber(selectedFile);
1528  m->SetCubeSerialNumber(sn);
1529  int camIndex = m_serialNumberList->fileNameIndex(selectedFile);
1530  cam = m_controlNet->Camera(camIndex);
1531  cam->SetUniversalGround(latitude, longitude);
1532  m->SetCoordinate(cam->Sample(),cam->Line());
1533  m->SetAprioriSample(cam->Sample());
1534  m->SetAprioriLine(cam->Line());
1537  m->SetCamera(cam);
1538  newPoint->Add(m);
1539  }
1540 
1541  // Get point type from dialog
1542  bool isGroundPoint = (newPointDialog->pointType() != ControlPoint::Free);
1543  newPoint->SetType((ControlPoint::PointType) newPointDialog->pointType());
1544 
1545  if (isGroundPoint) {
1546  Shape *shape = m_nameToShapeMap[newPointDialog->groundSource()];
1547  // Save ground source information in control point
1548  if (shape) {
1549  newPoint->SetAprioriSurfacePointSource(shape->surfacePointSource());
1550  }
1551  else {
1552  newPoint->SetAprioriSurfacePointSource(ControlPoint::SurfacePointSource::None);
1553  }
1555  }
1556 
1557  setEditPoint(newPoint);
1558  emit controlPointAdded(newPoint->GetId());
1559  }
1560  }
1561 
1562 
1569 
1570  // Make a copy and make sure editPoint is a copy (which means it does not
1571  // have a parent network.
1572  if (m_editPoint != NULL && m_editPoint->Parent() == NULL) {
1573  delete m_editPoint;
1574  m_editPoint = NULL;
1575  }
1576  m_editPoint = new ControlPoint;
1577  *m_editPoint = *controlPoint;
1578  loadPoint();
1579 
1580  DeleteControlPointDialog *deletePointDialog = new DeleteControlPointDialog;
1581  QString CPId = m_editPoint->GetId();
1582  deletePointDialog->pointIdValue->setText(CPId);
1583 
1584  // Need all files for this point
1585  for (int i=0; i<m_editPoint->GetNumMeasures(); i++) {
1586  ControlMeasure &m = *(*m_editPoint)[i];
1587  QString file = m_serialNumberList->fileName(m.GetCubeSerialNumber());
1588  deletePointDialog->fileList->addItem(file);
1589  }
1590 
1591  if (deletePointDialog->exec()) {
1592 
1593  int numDeleted = deletePointDialog->fileList->selectedItems().count();
1594 
1595  // Delete entire control point, either through deleteAllCheckBox or all measures selected
1596  if (deletePointDialog->deleteAllCheckBox->isChecked() ||
1597  numDeleted == m_editPoint->GetNumMeasures()) {
1598 
1599  // If all measures being deleted, let user know and give them the option to quit operation
1600  if (!deletePointDialog->deleteAllCheckBox->isChecked()) {
1601  QString message = "You have selected all measures in this point to be deleted. This "
1602  "control point will be deleted. Do you want to delete this control point?";
1603  int response = QMessageBox::question(this,
1604  "Delete control point", message,
1605  QMessageBox::Yes | QMessageBox::No,
1606  QMessageBox::Yes);
1607  // If No, do nothing
1608  if (response == QMessageBox::No) {
1609  return;
1610  }
1611  }
1612 
1613  //this->setVisible(false);
1614  // remove this point from the control network
1615  if (m_controlNet->DeletePoint(m_editPoint->GetId()) ==
1617  QMessageBox::information(this, "EditLocked Point",
1618  "This point is EditLocked and cannot be deleted.");
1619  return;
1620  }
1621  if (m_editPoint != NULL && m_editPoint->Parent() == NULL) {
1622 // delete m_editPoint;
1623 // m_editPoint = NULL;
1624  }
1625  }
1626 
1627  // Delete specific measures from control point
1628  else {
1629  // Keep track of editLocked measures for reporting
1630  int lockedMeasures = 0;
1631  for (int i=0; i<deletePointDialog->fileList->count(); i++) {
1632  QListWidgetItem *item = deletePointDialog->fileList->item(i);
1633  if (!deletePointDialog->fileList->isItemSelected(item)) continue;
1634 
1635  // Do not delete reference without asking user
1636  if (m_editPoint->IsReferenceExplicit() &&
1637  (m_editPoint->GetRefMeasure()->GetCubeSerialNumber() ==
1638  (*m_editPoint)[i]->GetCubeSerialNumber())) {
1639  QString message = "You are trying to delete the Reference measure."
1640  " Do you really want to delete the Reference measure?";
1641  switch (QMessageBox::question(this,
1642  "Delete Reference measure?", message,
1643  "&Yes", "&No", 0, 0)) {
1644  // Yes: skip to end of switch todelete the measure
1645  case 0:
1646  break;
1647  // No: continue to next measure in the loop
1648  case 1:
1649  // if only a single measure and it's reference and user chooses not to delete,
1650  // simply return. The point has not changed.
1651  if (numDeleted == 1) {
1652  return;
1653  }
1654  continue;
1655  }
1656  }
1657 
1658  if (m_editPoint->Delete(i) == ControlMeasure::MeasureLocked) {
1659  lockedMeasures++;
1660  }
1661  }
1662 
1663  if (lockedMeasures > 0) {
1664  QMessageBox::information(this,"EditLocked Measures",
1665  QString::number(lockedMeasures) + " / "
1666  + QString::number(
1667  deletePointDialog->fileList->selectedItems().size()) +
1668  " measures are EditLocked and were not deleted.");
1669  }
1670 
1671  loadPoint();
1672 
1673 // loadTemplateFile(m_pointEditor->templateFileName());
1674  }
1675 
1676  // emit a signal to alert user to save when exiting
1677  m_control->setModified(true);
1678  emit cnetModified();
1679 
1680  if (m_editPoint != NULL) {
1681  // Change Save Point button text to red
1683  }
1684  }
1685  }
1686 
1687 
1751 
1752  // Read original measures from the network for comparison with measures
1753  // that have been edited
1754  ControlMeasure *origLeftMeasure =
1755  m_editPoint->GetMeasure(m_leftMeasure->GetCubeSerialNumber());
1756  ControlMeasure *origRightMeasure =
1757  m_editPoint->GetMeasure(m_rightMeasure->GetCubeSerialNumber());
1758  // Neither measure has changed, return
1759  if (*origLeftMeasure == *m_leftMeasure && *origRightMeasure == *m_rightMeasure) {
1760  return;
1761  }
1762 
1763  if (m_editPoint->IsIgnored()) {
1764  QString message = "You are saving changes to a measure on an ignored ";
1765  message += "point. Do you want to set Ignore = False on the point and ";
1766  message += "both measures?";
1767  switch (QMessageBox::question(this, "Save Measure", message, "&Yes", "&No", 0, 0)) {
1768  // Yes: set Ignore=false for the point and measures and save point
1769  case 0:
1770  m_editPoint->SetIgnored(false);
1771  emit ignorePointChanged();
1772  if (m_leftMeasure->IsIgnored()) {
1773  m_leftMeasure->SetIgnored(false);
1774  emit ignoreLeftChanged();
1775  }
1776  if (m_rightMeasure->IsIgnored()) {
1777  m_rightMeasure->SetIgnored(false);
1778  emit ignoreRightChanged();
1779  }
1780  // No: keep Ignore=true and save measure
1781  case 1:
1782  break;
1783  }
1784  }
1785 
1786  bool savedAMeasure = false;
1787  // Error check both measures for edit lock, ignore status and reference
1788  bool leftChangeOk = validateMeasureChange(m_leftMeasure);
1789  if (leftChangeOk) {
1790  m_leftMeasure->SetChooserName(Application::UserName());
1791  *origLeftMeasure = *m_leftMeasure;
1792  savedAMeasure = true;
1793  }
1794  bool rightChangeOk = validateMeasureChange(m_rightMeasure);
1795  if (rightChangeOk) {
1796  m_rightMeasure->SetChooserName(Application::UserName());
1797  *origRightMeasure = *m_rightMeasure;
1798  savedAMeasure = true;
1799  }
1800 
1801  // If this is a fixed or constrained point, and either the left or right measure is the ground
1802  // source, update the lat,lon,radius.
1803  //
1804  if (m_editPoint->GetType() != ControlPoint::Free &&
1805  (m_leftMeasure->GetCubeSerialNumber() == m_groundSN ||
1806  m_rightMeasure->GetCubeSerialNumber() == m_groundSN)) {
1807  // If point is locked and it is not a new point, print error
1808  if (m_editPoint->IsEditLocked() && m_controlNet->ContainsPoint(m_editPoint->GetId())) {
1809  QString message = "This control point is edit locked. The Apriori latitude, longitude and ";
1810  message += "radius cannot be updated. You must first unlock the point by clicking the ";
1811  message += "check box above labeled \"Edit Lock Point\".";
1812  QMessageBox::warning(this, "Point Locked", message);
1813  return;
1814  }
1815  if (m_leftMeasure->IsIgnored()) {
1816  QString message = "This is a Constrained or Fixed point and the reference measure is ";
1817  message += "Ignored. Unset the Ignore flag on the reference measure before saving.";
1818  QMessageBox::warning(this, "Point Locked", message);
1819  return;
1820  }
1821  updateGroundPosition();
1822  }
1823 
1824  // If left measure == right measure, update left
1825  if (m_leftMeasure->GetCubeSerialNumber() == m_rightMeasure->GetCubeSerialNumber()) {
1827  // Update left measure of measureEditor
1828  m_measureEditor->setLeftMeasure (m_leftMeasure, m_leftCube.data(),
1829  m_editPoint->GetId());
1830  }
1831 
1832  // Change Save Point button text to red
1833  if (savedAMeasure) {
1835  }
1836 
1837  // Update measure info
1840  }
1841 
1842 
1851 
1852  // Read original measures from the network for comparison with measures
1853  // that have been edited
1854  ControlMeasure *origMeasure =
1855  m_editPoint->GetMeasure(m->GetCubeSerialNumber());
1856 
1857  // If measure hasn't changed, return false, to keep original
1858  if (*m == *origMeasure) return false;
1859 
1860  // Is measure on Left or Right? This is needed to print correct information
1861  // to users in identifying the measure and for updating information widgets.
1862  QString side = "right";
1863  if (m->GetCubeSerialNumber() == m_leftMeasure->GetCubeSerialNumber()) {
1864  side = "left";
1865  }
1866 
1867  // Only print error if both original measure in network and the current
1868  // edit measure are both editLocked and measure has changed. If only the edit measure is
1869  // locked, then user just locked and it needs to be saved.
1870  // Do not use this classes IsMeasureLocked since we actually want to
1871  // check the original againsted the edit measure and we don't care
1872  // if this is a reference measure. The check for moving a reference is
1873  // done below.
1874  if (origMeasure->IsEditLocked() && m->IsEditLocked()) {
1875  QString message = "The " + side + " measure is editLocked ";
1876  message += "for editing. Do you want to set EditLock = False for this ";
1877  message += "measure?";
1878  int response = QMessageBox::question(this, "Save Measure",
1879  message, QMessageBox::Yes | QMessageBox::No);
1880  // Yes: set EditLock=false for the right measure
1881  if (response == QMessageBox::Yes) {
1882  m->SetEditLock(false);
1883  if (side == "left") {
1884  m_lockLeftMeasure->setChecked(false);
1885  }
1886  else {
1887  m_lockRightMeasure->setChecked(false);
1888  }
1889  }
1890  // No: keep EditLock=true and do NOT save measure
1891  else {
1892  return false;
1893  }
1894  }
1895 
1896  if (origMeasure->IsIgnored() && m->IsIgnored()) {
1897  QString message = "The " + side + "measure is ignored. ";
1898  message += "Do you want to set Ignore = False on the measure?";
1899  switch (QMessageBox::question(this, "Save Measure", message, "&Yes", "&No", 0, 0)) {
1900  // Yes: set Ignore=false for the right measure and save point
1901  case 0:
1902  m->SetIgnored(false);
1903  if (side == "left") {
1904  emit ignoreLeftChanged();
1905  }
1906  else {
1907  emit ignoreRightChanged();
1908  }
1909  // No: keep Ignore=true and save point
1910  case 1:
1911  break;;
1912  }
1913  }
1914 
1915  // If measure is explicit reference and it has moved,warn user
1916  ControlMeasure *refMeasure = m_editPoint->GetRefMeasure();
1917  if (m_editPoint->IsReferenceExplicit()) {
1918  if (refMeasure->GetCubeSerialNumber() == m->GetCubeSerialNumber()) {
1919  if (m->GetSample() != origMeasure->GetSample() || m->GetLine() != origMeasure->GetLine()) {
1920  QString message = "You are making a change to the reference measure. You ";
1921  message += "may need to move all of the other measures to match the new ";
1922  message += " coordinate of the reference measure. Do you really want to ";
1923  message += " change the reference measure's location? ";
1924  switch(QMessageBox::question(this, "Save Measure",
1925  message, "&Yes", "&No", 0, 0)){
1926  // Yes: Save measure
1927  case 0:
1928  break;
1929  // No: keep original reference, return without saving
1930  case 1:
1931  ControlMeasure *origLeftMeasure =
1932  m_editPoint->GetMeasure(m_leftMeasure->GetCubeSerialNumber());
1933  m_measureEditor->setLeftPosition(origLeftMeasure->GetSample(),
1934  origLeftMeasure->GetLine());
1935  return false;
1936  }
1937  }
1938  }
1939  // New reference measure
1940  else if (side == "left" && (refMeasure->GetCubeSerialNumber() != m->GetCubeSerialNumber())) {
1941  QString message = "This point already contains a reference measure. ";
1942  message += "Would you like to replace it with the measure on the left?";
1943  int response = QMessageBox::question(this,
1944  "Save Measure", message,
1945  QMessageBox::Yes | QMessageBox::No,
1946  QMessageBox::Yes);
1947  // Replace reference measure
1948  if (response == QMessageBox::Yes) {
1949  // Update measure file combo boxes: old reference normal font,
1950  // new reference bold font
1951  QString file = m_serialNumberList->fileName(m_leftMeasure->GetCubeSerialNumber());
1952  QString fname = FileName(file).name();
1953  int iref = m_leftCombo->findText(fname);
1954 
1955  // Save normal font from new reference measure
1956  QVariant font = m_leftCombo->itemData(iref,Qt::FontRole);
1957  m_leftCombo->setItemData(iref,QFont("DejaVu Sans", 12, QFont::Bold), Qt::FontRole);
1958  iref = m_rightCombo->findText(fname);
1959  m_rightCombo->setItemData(iref,QFont("DejaVu Sans", 12, QFont::Bold), Qt::FontRole);
1960 
1961  file = m_serialNumberList->fileName(refMeasure->GetCubeSerialNumber());
1962  fname = FileName(file).name();
1963  iref = m_leftCombo->findText(fname);
1964  m_leftCombo->setItemData(iref,font,Qt::FontRole);
1965  iref = m_rightCombo->findText(fname);
1966  m_rightCombo->setItemData(iref,font,Qt::FontRole);
1967 
1968  m_editPoint->SetRefMeasure(m->GetCubeSerialNumber());
1969  }
1970  }
1971  }
1972  else {
1973  // No explicit reference, If left, set explicit reference
1974  if (side == "left") {
1975  m_editPoint->SetRefMeasure(m->GetCubeSerialNumber());
1976  }
1977  }
1978 
1979  // All test pass, return true (ok to change measure)
1980  return true;
1981 
1982 
1983  }
1984 
1985 
1996 
1997  // Check if ControlPoint has reference measure, if reference Measure is
1998  // not the same measure that is on the left chip viewport, set left
1999  // measure as reference.
2000  ControlMeasure *refMeasure = m_editPoint->GetRefMeasure();
2001  if (refMeasure->GetCubeSerialNumber() != m_leftMeasure->GetCubeSerialNumber()) {
2002  QString message = "This point already contains a reference measure. ";
2003  message += "Would you like to replace it with the measure on the left?";
2004  int response = QMessageBox::question(this,
2005  "Match Tool Save Measure", message,
2006  QMessageBox::Yes | QMessageBox::No,
2007  QMessageBox::Yes);
2008  // Replace reference measure
2009  if (response == QMessageBox::Yes) {
2010  // Update measure file combo boxes: old reference normal font,
2011  // new reference bold font
2012  QString file = m_serialNumberList->fileName(m_leftMeasure->GetCubeSerialNumber());
2013  QString fname = FileName(file).name();
2014  int iref = m_leftCombo->findText(fname);
2015 
2016  // Save normal font from new reference measure
2017  QVariant font = m_leftCombo->itemData(iref,Qt::FontRole);
2018  m_leftCombo->setItemData(iref,QFont("DejaVu Sans", 12, QFont::Bold), Qt::FontRole);
2019  iref = m_rightCombo->findText(fname);
2020  m_rightCombo->setItemData(iref,QFont("DejaVu Sans", 12, QFont::Bold), Qt::FontRole);
2021 
2022  file = m_serialNumberList->fileName(refMeasure->GetCubeSerialNumber());
2023  fname = FileName(file).name();
2024  iref = m_leftCombo->findText(fname);
2025  m_leftCombo->setItemData(iref,font,Qt::FontRole);
2026  iref = m_rightCombo->findText(fname);
2027  m_rightCombo->setItemData(iref,font,Qt::FontRole);
2028 
2029  m_editPoint->SetRefMeasure(m_leftMeasure->GetCubeSerialNumber());
2030  }
2031 
2032  // ??? Need to set rest of measures to Candiate and add more warning. ???//
2033  }
2034  }
2035 
2036 
2037  /*
2038  * Update the position of ground point
2039  *
2040  * @author 2012-04-26 Tracie Sucharski - moved functionality from measureSaved
2041  *
2042  * @internal
2043  *
2044  */
2045  void ControlPointEditWidget::updateGroundPosition() {
2046 
2047  // Determine if the left or right measure is the ground. Use ground measure to update
2048  // apriori surface point.
2049  ControlMeasure *groundMeasure;
2050  if (m_leftMeasure->GetCubeSerialNumber() == m_groundSN) {
2051  groundMeasure = m_leftMeasure;
2052  }
2053  else {
2054  groundMeasure = m_rightMeasure;
2055  }
2056  m_groundGmap->SetImage(groundMeasure->GetSample(), groundMeasure->GetLine());
2057 
2058  double lat = m_groundGmap->UniversalLatitude();
2059  double lon = m_groundGmap->UniversalLongitude();
2060 
2061  // Find radius source file
2062  // If nothing has been selected from the Radius source combo, use the Reference measure
2063  if (m_radiusSourceCombo->currentText().contains("NONE")) {
2064  m_radiusFilename.clear();
2065  m_demOpen = false;
2066  m_demFile.clear();
2067  m_demCube.reset(NULL);
2069  }
2070  else {
2071  Shape *shape = m_nameToShapeMap[m_radiusSourceCombo->currentText()];
2072  if (shape) {
2073  m_radiusFilename = shape->cube()->externalCubeFileName().toString();
2074  //m_radiusSourceType = shape->radiusSource();
2075  }
2076  // Radius source comes from what is already saved in the cnet as AprioriRadiusSourceFile
2077  // This will contain the path
2078  else {
2079  m_radiusFilename = m_radiusSourceCombo->currentText();
2080  m_radiusSourceType = m_editPoint->GetAprioriRadiusSource();
2081  }
2082  initDem(m_radiusFilename);
2083  }
2084 
2085 
2086  double radius;
2087  // Update radius, order of precedence
2088  // 1. If a dem has been opened, read radius from dem.
2089  // 2. Get radius from reference measure
2090  // If image has shape model, radius will come from shape model
2091  //
2092  if (m_demOpen) {
2093  radius = demRadius(lat,lon);
2094  if (radius == Null) {
2095  QString msg = "Could not read radius from DEM, will default to "
2096  "local radius of reference measure.";
2097  QMessageBox::warning(this, "Warning", msg);
2098  if (m_editPoint->GetRefMeasure()->Camera()->SetGround(Latitude(lat, Angle::Degrees),
2099  Longitude(lon, Angle::Degrees))) {
2100  radius = m_editPoint->GetRefMeasure()->Camera()->LocalRadius().meters();
2101  // TODO Should this be set here, this is probably not working as intended since it is
2102  // overwritten below outside of if (radius == Null)
2103  m_editPoint->SetAprioriRadiusSource(ControlPoint::RadiusSource::None);
2104  }
2105  else {
2106  QString message = "Error trying to get radius at this pt. "
2107  "Lat/Lon does not fall on the reference measure. "
2108  "Cannot save this measure.";
2109  QMessageBox::critical(this,"Error",message);
2110  return;
2111  }
2112  }
2113  m_editPoint->SetAprioriRadiusSource(m_radiusSourceType);
2114  m_editPoint->SetAprioriRadiusSourceFile(m_radiusFilename);
2115  }
2116  else {
2117  // Get radius from reference image
2118  if (m_editPoint->GetRefMeasure()->Camera()->SetGround(Latitude(lat, Angle::Degrees),
2119  Longitude(lon, Angle::Degrees))) {
2120  radius = m_editPoint->GetRefMeasure()->Camera()->LocalRadius().meters();
2121  }
2122  else {
2123  QString message = "Error trying to get radius at this pt. "
2124  "Lat/Lon does not fall on the reference measure. "
2125  "Cannot save this measure.";
2126  QMessageBox::critical(this,"Error",message);
2127  return;
2128  }
2129  }
2130 
2131  try {
2132  // Read apriori surface point if it exists so that point is
2133  // replaced, but sigmas are retained. Save sigmas because the
2134  // SurfacePoint class will change them if the coordinates change.
2135  if (m_editPoint->HasAprioriCoordinates()) {
2136  SurfacePoint aprioriPt = m_editPoint->GetAprioriSurfacePoint();
2137  Distance latSigma = aprioriPt.GetLatSigmaDistance();
2138  Distance lonSigma = aprioriPt.GetLonSigmaDistance();
2139  Distance radiusSigma = aprioriPt.GetLocalRadiusSigma();
2140  aprioriPt.SetSphericalCoordinates(Latitude(lat, Angle::Degrees),
2141  Longitude(lon, Angle::Degrees),
2142  Distance(radius, Distance::Meters));
2143  aprioriPt.SetSphericalSigmasDistance(latSigma, lonSigma, radiusSigma);
2144  m_editPoint->SetAprioriSurfacePoint(aprioriPt);
2145  }
2146  else {
2147  m_editPoint->SetAprioriSurfacePoint(SurfacePoint(
2148  Latitude(lat, Angle::Degrees),
2149  Longitude(lon, Angle::Degrees),
2150  Distance(radius, Distance::Meters)));
2151  }
2152  }
2153  catch (IException &e) {
2154  QString message = "Unable to set Apriori Surface Point.\n";
2155  message += "Latitude = " + QString::number(lat);
2156  message += " Longitude = " + QString::number(lon);
2157  message += " Radius = " + QString::number(radius) + "\n";
2158  message += e.toString();
2159  QMessageBox::critical(this,"Error",message);
2160  return;
2161  }
2162 
2163  m_editPoint->SetAprioriSurfacePointSource(m_groundSourceType);
2164  QString fullGroundFilename;
2165  if (m_groundFilename.contains(".ecub")) {
2166  // Find shape to get external cube filename
2167  fullGroundFilename = m_nameToShapeMap[m_groundFilename]->cube()->externalCubeFileName().expanded();
2168  }
2169  else {
2170  fullGroundFilename = m_groundFilename;
2171  }
2172  m_editPoint->SetAprioriSurfacePointSourceFile(fullGroundFilename);
2173 
2175  }
2176 
2177 
2193 
2194  // Make a copy of edit point for updating the control net since the edit
2195  // point is still loaded in the point editor.
2196  ControlPoint *updatePoint = new ControlPoint;
2197  *updatePoint = *m_editPoint;
2198 
2199  // If this is a fixed or constrained point, see if there is a temporary
2200  // measure holding the coordinate information from the ground source.
2201  // If so, delete this measure before saving point. Clear out the
2202  // fixed Measure variable (memory deleted in ControlPoint::Delete).
2203  if (updatePoint->GetType() != ControlPoint::Free && updatePoint->HasSerialNumber(m_groundSN)) {
2204  // Delete measure with m_groundSN
2205  updatePoint->Delete(m_groundSN);
2206  }
2207 
2208  // If edit point exists in the network, save the updated point. If it
2209  // does not exist, add it.
2210  if (m_controlNet->ContainsPoint(updatePoint->GetId())) {
2211  ControlPoint *p;
2212  p = m_controlNet->GetPoint(QString(updatePoint->GetId()));
2213  *p = *updatePoint;
2214  delete updatePoint;
2215  updatePoint = NULL;
2216  emit controlPointChanged(m_editPoint->GetId());
2217  }
2218  else {
2219  m_controlNet->AddPoint(updatePoint);
2220  emit controlPointAdded(m_editPoint->GetId());
2221  }
2222 
2223  // Change Save Measure button text back to default
2224  m_savePoint->setPalette(m_saveDefaultPalette);
2225 
2226  // At exit, or when opening new net, use for prompting user for a save
2227  m_cnetModified = true;
2228  m_control->setModified(true);
2229  emit cnetModified();
2230  // Refresh chipViewports to show new positions of controlPoints
2231  m_measureEditor->refreshChips();
2232  }
2233 
2234 
2251 
2252  if (m_editPoint == NULL) return;
2253 
2254  // If pointType is equal to current type, nothing to do
2255  if (m_editPoint->GetType() == pointType) return;
2256  int oldType = m_editPoint->GetType();
2257 
2258  // Error check ignored and locked status
2259  if (pointType != ControlPoint::Free && m_leftMeasure->IsIgnored()) {
2260  m_pointTypeCombo->setCurrentIndex((int) m_editPoint->GetType());
2261  QString message = "The reference measure is Ignored. Unset the Ignore flag on the ";
2262  message += "reference measure before setting the point type to Constrained or Fixed.";
2263  QMessageBox::warning(m_parent, "Ignored Reference Measure", message);
2264  return;
2265  }
2266  ControlPoint::Status status = m_editPoint->SetType((ControlPoint::PointType) pointType);
2267  if (status == ControlPoint::PointLocked) {
2268  m_pointTypeCombo->setCurrentIndex((int) m_editPoint->GetType());
2269  QString message = "This control point is edit locked. The point type cannot be changed. You ";
2270  message += "must first unlock the point by clicking the check box above labeled ";
2271  message += "\"Edit Lock Point\".";
2272  QMessageBox::warning(m_parent, "Point Locked", message);
2273  return;
2274  }
2275 
2276  // Changing type between Contrained and Fixed, simply colorize Save CP button and return. Do
2277  // not re-load CP or re-create ground CM.
2278  if (oldType != ControlPoint::Free && m_editPoint->GetType() != ControlPoint::Free) {
2280  }
2281  // If changing from Constrained or Fixed to Free, remove ground CM, disable ground/radius source
2282  // combos, re-load CP, colorize Save CP.
2283  else if (oldType != ControlPoint::Free && m_editPoint->GetType() == ControlPoint::Free) {
2284  // Find temporary measure holding the coordinate information from the ground source and
2285  // delete from CP. This CM has a chooser name = GroundMeasureTemporary.
2286  // Clear out the fixed Measure variable (memory deleted in ControlPoint::Delete).
2287  for (int i=0; i<m_editPoint->GetNumMeasures(); i++) {
2288  ControlMeasure &m = *(*m_editPoint)[i];
2289  if (m.GetChooserName() == "GroundMeasureTemporary") {
2290  m_editPoint->Delete(&m);
2291  }
2292  }
2293  loadPoint();
2294  m_groundSourceCombo->setEnabled(false);
2295  m_radiusSourceCombo->setEnabled(false);
2297  }
2298  // Changing from Free to Constrained or Fixed, loadGroundMeasure,which will create temporary
2299  // gound measure, load into the measure combo boxes and colorize Save CP button.
2300  else if (oldType == ControlPoint::Free && m_editPoint->GetType() != ControlPoint::Free) {
2302  m_groundSourceCombo->setEnabled(true);
2303  m_radiusSourceCombo->setEnabled(true);
2305  }
2306  }
2307 
2308 
2319 
2320  if (m_editPoint == NULL) return;
2321 
2322  m_editPoint->SetEditLock(lock);
2324  }
2325 
2326 
2338 
2339  if (m_editPoint == NULL) return;
2340 
2341  ControlPoint::Status status = m_editPoint->SetIgnored(ignore);
2342  if (status == ControlPoint::PointLocked) {
2343  m_ignorePoint->setChecked(m_editPoint->IsIgnored());
2344  QString message = "Unable to change Ignored on point. Set EditLock ";
2345  message += " to False.";
2346  QMessageBox::critical(this, "Error", message);
2347  return;
2348  }
2350  }
2351 
2352 
2368 
2369  if (m_editPoint->IsEditLocked()) {
2370  m_lockLeftMeasure->setChecked(m_leftMeasure->IsEditLocked());
2371  QMessageBox::warning(this, "Point Locked","Point is Edit Locked. You must un-lock point"
2372  " before changing a measure.");
2373  m_lockLeftMeasure->setChecked(m_leftMeasure->IsEditLocked());
2374  return;
2375  }
2376 
2377  if (m_leftMeasure != NULL) m_leftMeasure->SetEditLock(lock);
2378 
2379  // If the right chip is the same as the left chip , update the right editLock
2380  // box.
2381  if (m_rightMeasure != NULL) {
2382  if (m_rightMeasure->GetCubeSerialNumber() == m_leftMeasure->GetCubeSerialNumber()) {
2383  m_rightMeasure->SetEditLock(lock);
2384  m_lockRightMeasure->setChecked(lock);
2385  }
2386  }
2387  emit measureChanged();
2388  }
2389 
2390 
2408 
2409  if (m_leftMeasure != NULL) m_leftMeasure->SetIgnored(ignore);
2410 
2411  // If the right chip is the same as the left chip , update the right
2412  // ignore box.
2413  if (m_rightMeasure != NULL) {
2414  if (m_rightMeasure->GetCubeSerialNumber() == m_leftMeasure->GetCubeSerialNumber()) {
2415  m_rightMeasure->SetIgnored(ignore);
2416  m_ignoreRightMeasure->setChecked(ignore);
2417  }
2418  }
2419  emit measureChanged();
2420  }
2421 
2422 
2438 
2439  if (m_editPoint->IsEditLocked()) {
2440  m_lockRightMeasure->setChecked(m_rightMeasure->IsEditLocked());
2441  QMessageBox::warning(this, "Point Locked","Point is Edit Locked. You must un-lock point"
2442  " before changing a measure.");
2443  m_lockRightMeasure->setChecked(m_rightMeasure->IsEditLocked());
2444  return;
2445  }
2446 
2447  if (m_rightMeasure != NULL) m_rightMeasure->SetEditLock(lock);
2448 
2449  // If the left chip is the same as the right chip , update the left editLock box.
2450  if (m_leftMeasure != NULL) {
2451  if (m_leftMeasure->GetCubeSerialNumber() == m_rightMeasure->GetCubeSerialNumber()) {
2452  m_leftMeasure->SetEditLock(lock);
2453  m_lockLeftMeasure->setChecked(lock);
2454  }
2455  }
2456  emit measureChanged();
2457  }
2458 
2459 
2478 
2479  if (m_rightMeasure != NULL) m_rightMeasure->SetIgnored(ignore);
2480 
2481  // If the right chip is the same as the left chip , update the right
2482  // ignore blox.
2483  if (m_leftMeasure != NULL) {
2484  if (m_rightMeasure->GetCubeSerialNumber() == m_leftMeasure->GetCubeSerialNumber()) {
2485  m_leftMeasure->SetIgnored(ignore);
2486  m_ignoreLeftMeasure->setChecked(ignore);
2487  }
2488  }
2489  emit measureChanged();
2490  }
2491 
2492 
2503 
2504  int curIndex = m_rightCombo->currentIndex();
2505  if (curIndex < m_rightCombo->count() - 1) {
2506  // update the right measure list index and select that measure
2507  m_rightCombo->setCurrentIndex(curIndex + 1);
2508  selectRightMeasure(curIndex+1);
2509  }
2510  }
2511 
2512 
2523 
2524  int curIndex = m_rightCombo->currentIndex();
2525  if (curIndex > 0) {
2526  // update the right measure list index and select that measure
2527  m_rightCombo->setCurrentIndex(curIndex - 1);
2528  selectRightMeasure(curIndex-1);
2529  }
2530  }
2531 
2532 
2533 
2547 
2548  QString file = m_pointFiles[index];
2549  QString serial;
2550  try {
2551  serial = m_serialNumberList->serialNumber(file);
2552  }
2553  catch (IException &e) {
2554  QString message = "Make sure the correct cube is opened.\n\n";
2555  message += e.toString();
2556  QMessageBox::critical(this, "Error", message);
2557 
2558  // Set index of combo back to what it was before user selected new. Find the index
2559  // of current left measure.
2560  QString file = m_serialNumberList->fileName(m_leftMeasure->GetCubeSerialNumber());
2561  int i = m_leftCombo->findText(FileName(file).name());
2562  if (i < 0) i = 0;
2563  m_leftCombo->setCurrentIndex(i);
2564  return;
2565  }
2566 
2567  if (m_leftMeasure != NULL) {
2568  delete m_leftMeasure;
2569  m_leftMeasure = NULL;
2570  }
2571 
2573  *m_leftMeasure = *((*m_editPoint)[serial]);
2574 
2575  // If m_leftCube is not null, delete before creating new one
2576  m_leftCube.reset(new Cube(file, "r"));
2577 
2578  // Update left measure of pointEditor
2579  m_measureEditor->setLeftMeasure (m_leftMeasure, m_leftCube.data(), m_editPoint->GetId());
2581  }
2582 
2583 
2595 
2596  QString file = m_pointFiles[index];
2597 
2598  QString serial;
2599  try {
2600  serial = m_serialNumberList->serialNumber(file);
2601  }
2602  catch (IException &e) {
2603  QString message = "Make sure the correct cube is opened.\n\n";
2604  message += e.toString();
2605  QMessageBox::critical(this, "Error", message);
2606 
2607  // Set index of combo back to what it was before user selected new. Find the index
2608  // of current left measure.
2609  QString file = m_serialNumberList->fileName(m_rightMeasure->GetCubeSerialNumber());
2610  int i = m_rightCombo->findText(FileName(file).name());
2611  if (i < 0) i = 0;
2612  m_rightCombo->setCurrentIndex(i);
2613  return;
2614  }
2615 
2616  if (m_rightMeasure != NULL) {
2617  delete m_rightMeasure;
2618  m_rightMeasure = NULL;
2619  }
2620 
2622  *m_rightMeasure = *((*m_editPoint)[serial]);
2623 
2624  // If m_rightCube is not null, delete before creating new one
2625  m_rightCube.reset(new Cube(file, "r"));
2626 
2627  // Update left measure of pointEditor
2628  m_measureEditor->setRightMeasure (m_rightMeasure, m_rightCube.data(), m_editPoint->GetId());
2630  }
2631 
2632 
2651 
2652  // Set editLock measure box correctly
2653  m_lockLeftMeasure->setChecked(IsMeasureLocked(
2654  m_leftMeasure->GetCubeSerialNumber()));
2655  // Set ignore measure box correctly
2656  m_ignoreLeftMeasure->setChecked(m_leftMeasure->IsIgnored());
2657 
2658  QString s = "Reference: ";
2659  if (m_editPoint->IsReferenceExplicit() &&
2660  (QString(m_leftMeasure->GetCubeSerialNumber()) == m_editPoint->GetReferenceSN())) {
2661  s += "True";
2662  }
2663  else {
2664  s += "False";
2665  }
2666  m_leftReference->setText(s);
2667 
2668  s = "Measure Type: ";
2669  if (m_leftMeasure->GetType() == ControlMeasure::Candidate) s += "Candidate";
2670  if (m_leftMeasure->GetType() == ControlMeasure::Manual) s += "Manual";
2671  if (m_leftMeasure->GetType() == ControlMeasure::RegisteredPixel) s += "RegisteredPixel";
2672  if (m_leftMeasure->GetType() == ControlMeasure::RegisteredSubPixel) s += "RegisteredSubPixel";
2673  m_leftMeasureType->setText(s);
2674  }
2675 
2676 
2697 
2698  // Set editLock measure box correctly
2699  m_lockRightMeasure->setChecked(IsMeasureLocked(
2700  m_rightMeasure->GetCubeSerialNumber()));
2701  // Set ignore measure box correctly
2702  m_ignoreRightMeasure->setChecked(m_rightMeasure->IsIgnored());
2703 
2704  QString s = "Reference: ";
2705  if (m_editPoint->IsReferenceExplicit() &&
2706  (QString(m_rightMeasure->GetCubeSerialNumber()) == m_editPoint->GetReferenceSN())) {
2707  s += "True";
2708  }
2709  else {
2710  s += "False";
2711  }
2712 
2713  m_rightReference->setText(s);
2714 
2715  s = "Measure Type: ";
2716  if (m_rightMeasure->GetType() == ControlMeasure::Candidate) s+= "Candidate";
2717  if (m_rightMeasure->GetType() == ControlMeasure::Manual) s+= "Manual";
2718  if (m_rightMeasure->GetType() == ControlMeasure::RegisteredPixel) s+= "RegisteredPixel";
2719  if (m_rightMeasure->GetType() == ControlMeasure::RegisteredSubPixel) s+= "RegisteredSubPixel";
2720  m_rightMeasureType->setText(s);
2721  }
2722 
2723 
2724 
2736 
2737  if(e->type() != QEvent::Leave) return false;
2738  if(o == m_leftCombo->view()) {
2740  m_leftCombo->hidePopup();
2741  }
2742  if (o == m_rightCombo->view()) {
2744  m_rightCombo->hidePopup();
2745  }
2746  return true;
2747  }
2748 
2749 
2757 
2758  if (m_templateModified) {
2759  int r = QMessageBox::warning(this, tr("OK to continue?"),
2760  tr("The currently opened registration template has been modified.\n"
2761  "Save changes?"),
2762  QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,
2763  QMessageBox::Yes);
2764 
2765  if (r == QMessageBox::Yes)
2767  else if (r == QMessageBox::Cancel)
2768  return false;
2769  }
2770 
2771  return true;
2772  }
2773 
2774 
2781 
2782  if (!okToContinue())
2783  return;
2784 
2785  QString filename = QFileDialog::getOpenFileName(this,
2786  "Select a registration template", ".",
2787  "Registration template files (*.def *.pvl);;All files (*)");
2788 
2789  if (filename.isEmpty())
2790  return;
2791 
2792  if (m_measureEditor->setTemplateFile(filename)) {
2793  loadTemplateFile(filename);
2794  }
2795  }
2796 
2797 
2804 
2805  QFile file(FileName((QString) fn).expanded());
2806  if (!file.open(QIODevice::ReadOnly)) {
2807  QString msg = "Failed to open template file \"" + fn + "\"";
2808  QMessageBox::warning(this, "IO Error", msg);
2809  return;
2810  }
2811 
2812  QTextStream stream(&file);
2813  m_templateEditor->setText(stream.readAll());
2814  file.close();
2815 
2816  QScrollBar * sb = m_templateEditor->verticalScrollBar();
2817  sb->setValue(sb->minimum());
2818 
2819  m_templateModified = false;
2820  m_saveTemplateFile->setEnabled(false);
2821  }
2822 
2823 
2828 
2829  m_templateModified = true;
2830  m_saveTemplateFile->setEnabled(true);
2831  }
2832 
2833 
2838 
2839  if (!m_templateModified)
2840  return;
2841 
2842  QString filename =
2843  m_measureEditor->templateFileName();
2844 
2845  writeTemplateFile(filename);
2846  }
2847 
2848 
2853 
2854  QString filename = QFileDialog::getSaveFileName(this,
2855  "Save registration template", ".",
2856  "Registration template files (*.def *.pvl);;All files (*)");
2857 
2858  if (filename.isEmpty())
2859  return;
2860 
2861  writeTemplateFile(filename);
2862  }
2863 
2864 
2871 
2872  QString contents = m_templateEditor->toPlainText();
2873 
2874  // catch errors in Pvl format when populating pvl object
2875  stringstream ss;
2876  ss << contents;
2877  try {
2878  Pvl pvl;
2879  ss >> pvl;
2880  }
2881  catch(IException &e) {
2882  QString message = e.toString();
2883  QMessageBox::warning(this, "Error", message);
2884  return;
2885  }
2886 
2887  QString expandedFileName(FileName((QString) fn).expanded());
2888 
2889  QFile file(expandedFileName);
2890 
2891  if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
2892  QString msg = "Failed to save template file to \"" + fn + "\"\nDo you "
2893  "have permission?";
2894  QMessageBox::warning(this, "IO Error", msg);
2895  return;
2896  }
2897 
2898  // now save contents
2899  QTextStream stream(&file);
2900  stream << contents;
2901  file.close();
2902 
2903  if (m_measureEditor->setTemplateFile(fn)) {
2904  m_templateModified = false;
2905  m_saveTemplateFile->setEnabled(false);
2906  }
2907  }
2908 
2909 
2923 
2924  try{
2925  // Get the template file from the ControlPointEditWidget object
2926  Pvl templatePvl(m_measureEditor->templateFileName());
2927  // Create registration dialog window using PvlEditDialog class
2928  // to view and/or edit the template
2929  PvlEditDialog registrationDialog(templatePvl);
2930  registrationDialog.setWindowTitle("View or Edit Template File: "
2931  + templatePvl.fileName());
2932  registrationDialog.resize(550,360);
2933  registrationDialog.exec();
2934  }
2935  catch (IException &e) {
2936  QString message = e.toString();
2937  QMessageBox::information(this, "Error", message);
2938  }
2939  }
2940 
2941 
2949 
2950  m_measureEditor->saveChips();
2951  }
2952 
2953 
2958 
2960  return;
2961 
2962  m_templateEditorWidget->setVisible(!m_templateEditorWidget->isVisible());
2963  }
2964 
2965 
2972  if(templateList->type() == "registrations") {
2973  for(int i = 0; i < templateList->size(); i++) {
2974  m_templateComboBox->addItem(templateList->at(i)->importName()
2975  + "/" + FileName(templateList->at(i)->fileName()).name());
2976  }
2977  }
2978  }
2979 
2980 
2989  QString expandedFileName = filename;
2990  if(!filename.startsWith("$base")){
2991  expandedFileName = m_directory->project()->templateRoot()
2992  + "/registrations/" + filename;
2993  }
2994  if (m_measureEditor->setTemplateFile(expandedFileName)) {
2995  loadTemplateFile(expandedFileName);
2996  }
2997  }
2998 
2999 
3007  if(fileName.startsWith("$base")) {
3008  m_templateComboBox->setCurrentIndex(0);
3009  }
3010  QList<QString> components = fileName.split("/");
3011  int size = components.size();
3012  int index = m_templateComboBox->findText(components[size - 2] + "/" + components[size - 1]);
3013  if (index != -1) {
3014  m_templateComboBox->setCurrentIndex(index);
3015  }
3016  }
3017 
3018 
3031 
3032  QString s;
3033 
3034  SurfacePoint aprioriPoint = m_editPoint->GetAprioriSurfacePoint();
3035  if (aprioriPoint.GetLatitude().degrees() == Null) {
3036  s = "Apriori Latitude: Null";
3037  }
3038  else {
3039  s = "Apriori Latitude: " +
3040  QString::number(aprioriPoint.GetLatitude().degrees());
3041  }
3042  m_aprioriLatitude->setText(s);
3043  if (aprioriPoint.GetLongitude().degrees() == Null) {
3044  s = "Apriori Longitude: Null";
3045  }
3046  else {
3047  s = "Apriori Longitude: " +
3048  QString::number(aprioriPoint.GetLongitude().degrees());
3049  }
3050  m_aprioriLongitude->setText(s);
3051  if (aprioriPoint.GetLocalRadius().meters() == Null) {
3052  s = "Apriori Radius: Null";
3053  }
3054  else {
3055  s = "Apriori Radius: " +
3056  QString::number(aprioriPoint.GetLocalRadius().meters(),'f',2) +
3057  " <meters>";
3058  }
3059  m_aprioriRadius->setText(s);
3060  }
3061 
3062 
3078 // TODO Is this needed?
3079 //
3080 // void ControlPointEditWidget::refresh() {
3081 //
3082 // // Check point being edited, make sure it still exists, if not ???
3083 // // Update ignored checkbox??
3084 // if (m_editPoint != NULL) {
3085 // try {
3086 // QString id = m_ptIdValue->text().remove("Point ID: ");
3087 // m_controlNet->GetPoint(id);
3088 // }
3089 // catch (IException &) {
3090 // delete m_editPoint;
3091 // m_editPoint = NULL;
3092 // emit controlPointChanged();
3095 // }
3096 // }
3097 // }
3098 
3099 
3106 
3107  QColor qc = Qt::red;
3108  QPalette p = m_savePoint->palette();
3109  p.setColor(QPalette::ButtonText,qc);
3110  m_savePoint->setPalette(p);
3111  }
3112 
3113 
3123 
3124  if (reset) {
3125  // Change Save Net button text back to default black
3126  m_saveNet->setPalette(m_saveDefaultPalette);
3127  }
3128  else {
3129  QColor qc = Qt::red;
3130  QPalette p = m_savePoint->palette();
3131  p.setColor(QPalette::ButtonText,qc);
3132  m_saveNet->setPalette(p);
3133  }
3134 
3135  }
3136 
3137 
3149  bool ControlPointEditWidget::IsMeasureLocked (QString serialNumber) {
3150 
3151  if (m_editPoint == NULL) return false;
3152 
3153  // Reference implicitly editLocked
3154  if (m_editPoint->IsEditLocked() && m_editPoint->IsReferenceExplicit() &&
3155  (m_editPoint->GetReferenceSN() == serialNumber)) {
3156  return true;
3157  }
3158  // Return measures explicit editLocked value
3159  else {
3160  return m_editPoint->GetMeasure(serialNumber)->IsEditLocked();
3161  }
3162 
3163  }
3164 
3165 
3174 
3175  m_control->write();
3176 
3177  // Change Save Measure button text back to default
3178  m_saveNet->setPalette(m_saveDefaultPalette);
3179  }
3180 
3181 
3186  delete m_editPoint;
3187  m_editPoint = NULL;
3188  }
3189 
3190 
3191  // 2014-07-21 TLS Ipce This needs to be changed to return the help information or
3192  // widget?? to the calling program, so that it can be added to a menu or toolbar.
3193 #if 0
3194  void ControlPointEditWidget::showHelp() {
3195 
3196  QDialog *helpDialog = new QDialog(this);
3197  helpDialog->setWindowTitle("Match Tool Help");
3198 
3199  QVBoxLayout *mainLayout = new QVBoxLayout;
3200  helpDialog->setLayout(mainLayout);
3201 
3202  QLabel *matchTitle = new QLabel("<h2>Match Tool</h2>");
3203  mainLayout->addWidget(matchTitle);
3204 
3205  QLabel *matchSubtitle = new QLabel("A tool for interactively measuring and editing sample/line "
3206  "registration points between cubes. These "
3207  "points contain sample, line postions only, no latitude or "
3208  "longitude values are used or recorded.");
3209  matchSubtitle->setWordWrap(true);
3210  mainLayout->addWidget(matchSubtitle);
3211 
3212  QTabWidget *tabArea = new QTabWidget;
3213  tabArea->setDocumentMode(true);
3214  mainLayout->addWidget(tabArea);
3215 
3216  // TAB 1 - Overview
3217  QScrollArea *overviewTab = new QScrollArea;
3218  overviewTab->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
3219  overviewTab->setWidgetResizable(true);
3220  QWidget *overviewContainer = new QWidget;
3221  QVBoxLayout *overviewLayout = new QVBoxLayout;
3222  overviewContainer->setLayout(overviewLayout);
3223 
3224  QLabel *purposeTitle = new QLabel("<h2>Purpose</h2>");
3225  overviewLayout->addWidget(purposeTitle);
3226 
3227  QLabel *purposeText = new QLabel("<p>This tool is for recording and editing registration "
3228  "points measured between cubes displayed in the <i>qview</i> main window.</p> <p>The "
3229  "recorded registration points are sample and line pixel coordinates only. Therefore, this "
3230  "tool can be used on any images including ones that do not contain a camera model "
3231  "(i.e, The existence of the Isis Instrument Group on the image labels is not required). "
3232  "This also means that the tool differs from the <i>qnet</i> control point network "
3233  "application in that no latitude or longitude values are ever used or recorded "
3234  "(regardless if the image has a camera model in Isis).</p>"
3235  "<p>The output control point network that this tool generates is primarily used 1) as "
3236  "input for an image-wide sample/line translation to register one image to another by "
3237  "'moving' pixel locations - refer to the documentation for applications such as "
3238  "<i>translate</i> and <i>warp</i>, or 2) to export the file and use the recorded "
3239  "measurements in other spreadsheet or plotting packages to visualize magnitude "
3240  "and direction of varying translations of the images relative to one another.</p> "
3241  "<p>An automated version of this match tool is the <i>coreg</i> application. This tool "
3242  "can be used to visually evaluate and edit the control point network created by "
3243  "<i>coreg</i>.</p> "
3244  "<p>The format of the output point network file is binary. This tool uses the Isis control "
3245  " network framework to create, co-register and save all control points and pixel "
3246  "measurements. The application <i>cnetbin2pvl</i> can be used to convert from binary to "
3247  "a readable PVL format."
3248  "<p>The Mouse Button functions are: (same as <i>qnet</i>)<ul><li>Modify Point=Left</li> "
3249  "<li>Delete Point=Middle</li><li>Create New Point=Right</li></ul></p>"
3250  "<p>Control Points are drawn on the associated displayed cubes with the following colors: "
3251  "Green=Valid registration point; Yellow=Ignored point; Red=Active point being edited");
3252  purposeText->setWordWrap(true);
3253  overviewLayout->addWidget(purposeText);
3254 
3255  overviewTab->setWidget(overviewContainer);
3256 
3257  // TAB 2 - Quick Start
3258  QScrollArea *quickTab = new QScrollArea;
3259  quickTab->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
3260  quickTab->setWidgetResizable(true);
3261  QWidget *quickContainer = new QWidget;
3262  QVBoxLayout *quickLayout = new QVBoxLayout;
3263  quickContainer->setLayout(quickLayout);
3264 
3265  QLabel *quickTitle = new QLabel("<h2>Quick Start</h2>");
3266  quickLayout->addWidget(quickTitle);
3267 
3268  QLabel *quickSubTitle = new QLabel("<h3>Preparation:</h3>");
3269  quickLayout->addWidget(quickSubTitle);
3270 
3271  QString toolIconDir = FileName("$base/icons").expanded();
3272 
3273  QLabel *quickPrep = new QLabel("<p><ul>"
3274  "<li>Open the cubes with overlapping areas for choosing control points</li>"
3275  "<li>Choose the match tool <img src=\"" + toolIconDir +
3276  "/stock_draw-connector-with-arrows.png\" width=22 height=22> "
3277  "from the toolpad on the right side of the <i>qview</i> main window</li>");
3278  quickPrep->setWordWrap(true);
3279  quickLayout->addWidget(quickPrep);
3280 
3281  QLabel *morePrep = new QLabel("<p>Once the Match tool is activated the tool bar at the top "
3282  "of the main window contains file action buttons and a help button:");
3283  morePrep->setWordWrap(true);
3284  quickLayout->addWidget(morePrep);
3285 
3286  QLabel *fileButtons = new QLabel("<p><ul>"
3287  "<li><img src=\"" + toolIconDir + "/fileopen.png\" width=22 height=22> Open an existing "
3288  "control network <b>Note:</b> If you do not open an existing network, a new one will "
3289  "be created</li>"
3290  "<li><img src=\"" + toolIconDir + "/mActionFileSaveAs.png\" width=22 height=22> Save "
3291  "control network as ...</li>"
3292  "<li><img src=\"" + toolIconDir + "/mActionFileSave.png\" width=22 height=22> Save "
3293  "control network to current file</li>"
3294  "<li><img src=\"" + toolIconDir + "/help-contents.png\" width=22 height=22> Show Help "
3295  "</li></ul></p>");
3296  fileButtons->setWordWrap(true);
3297  quickLayout->addWidget(fileButtons);
3298 
3299  QLabel *quickFunctionTitle = new QLabel("<h3>Cube Viewport Functions:</h3>");
3300  quickLayout->addWidget(quickFunctionTitle);
3301 
3302  QLabel *quickFunction = new QLabel(
3303  "The match tool window will be shown once "
3304  "you click in a cube viewport window using one of the following "
3305  "mouse functions. <b>Note:</b> Existing control points are drawn on the cube viewports");
3306  quickFunction->setWordWrap(true);
3307  quickLayout->addWidget(quickFunction);
3308 
3309  QLabel *quickDesc = new QLabel("<p><ul>"
3310  "<li>Left Click - Modify the control point closest to the click <b>Note:</b> "
3311  "All cubes in the control point must be displayed before loading the point</li>"
3312  "<li>Middle Click - Delete the control point closest to the click</li>"
3313  "<li>Right Click - Create a new control point at the click location</li></ul></p>");
3314  quickDesc->setWordWrap(true);
3315  quickDesc->setOpenExternalLinks(true);
3316  quickLayout->addWidget(quickDesc);
3317 
3318  quickTab->setWidget(quickContainer);
3319 
3320  // TAB 3 - Control Point Editing
3321  QScrollArea *controlPointTab = new QScrollArea;
3322  controlPointTab->setWidgetResizable(true);
3323  controlPointTab->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
3324  QWidget *controlPointContainer = new QWidget;
3325  QVBoxLayout *controlPointLayout = new QVBoxLayout;
3326  controlPointContainer->setLayout(controlPointLayout);
3327 
3328  QLabel *controlPointTitle = new QLabel("<h2>Control Point Editing</h2>");
3329  controlPointLayout->addWidget(controlPointTitle);
3330 
3331  QLabel *mouseLabel = new QLabel("<p><h3>When the \"Match\" tool "
3332  "is activated, the mouse buttons have the following function in the "
3333  "cube viewports of the main qview window:</h3>");
3334  mouseLabel->setWordWrap(true);
3335  mouseLabel->setScaledContents(true);
3336  controlPointLayout->addWidget(mouseLabel);
3337 
3338  QLabel *controlPointDesc = new QLabel("<ul>"
3339  "<li>Left click - Edit the closest control point <b>Note:</b> "
3340  "All cubes in the control point must be displayed before loading the point</li>"
3341  "<li>Middle click - Delete the closest control point</li>"
3342  "<li>Right click - Create new control point at cursor location. This will bring up a new "
3343  "point dialog which allows you to enter a point id and will list all cube viewports, "
3344  "highlighting cubes where the point has been chosen by clicking on the cube's viewport. "
3345  "When the desired cubes have been chosen, select the \"Done\" button which will load the "
3346  "control point into the control point editor window which will allow the control measure "
3347  "positions to be refined.</li>");
3348  controlPointDesc->setWordWrap(true);
3349  controlPointLayout->addWidget(controlPointDesc);
3350 
3351  QLabel *controlPointEditing = new QLabel(
3352  "<h4>Changing Control Measure Locations</h4>"
3353  "<p>Both the left and right control measure positions can be adjusted by:"
3354  "<ul>"
3355  "<li>Move the cursor location under the crosshair by clicking the left mouse "
3356  "button</li>"
3357  "<li>Move 1 pixel at a time by using arrow keys on the keyboard</li>"
3358  "<li>Move 1 pixel at a time by using arrow buttons above the right and left views</li>"
3359  "</ul></p>"
3360  "<h4>Other Point Editor Functions</h4>"
3361  "<p>Along the right border of the window:</p>"
3362  "<ul>"
3363  "<li><strong>Link Zoom</strong> This will link the two small viewports together when "
3364  "zooming (ie. If this is checked, if the left view is zoomed, the right view will "
3365  "match the left view's zoom factor. "
3366  "<b>Note:</b> Zooming is controlled from the left view.</li>"
3367  "<li><strong>No Rotate:</strong> Turn off the rotation and bring right view back to "
3368  "its original orientation</li>"
3369  "<li><strong>Rotate:</strong> Rotate the right view using either the dial "
3370  "or entering degrees </li>"
3371  "<li><strong>Show control points:</strong> Draw crosshairs at all control "
3372  "point locations visible within the view</li>"
3373  "<li><strong>Show crosshair:</strong> Show a red crosshair across the entire "
3374  "view</li>"
3375  "<li><strong>Circle:</strong> Draw circle which may help center measure "
3376  "on a crater</li></ul"
3377  "<p>Below the left view:</p>"
3378  "<ul><li><strong>Blink controls:</strong> Blink the left and right view in the "
3379  "left view window using the \"Blink Start\" button <img src=\"" + toolIconDir +
3380  "/blinkStart.png\" width=22 height=22> and \"Blink Stop\" button <img src=\"" +
3381  toolIconDir + "/blinkStop.png\" width=22 height=22>. The arrow keys above the left "
3382  "and right views and the keyboard arrow keys may be used to move the both views while "
3383  "blinking.</li>"
3384  "<li><strong>Register:</strong> Sub-pixel register the right view to "
3385  "the left view. A default registration template is used for setting parameters "
3386  "passed to the sub-pixel registration tool. The user may load in a predefined "
3387  "template or edit the current loaded template to influence successful "
3388  "co-registration results. For more information regarding the pattern matching "
3389  "functionlity or how to create a parameter template, refer to the Isis PatternMatch "
3390  "document and the <i>autoregtemplate</i> application.</li>"
3391  "<li><strong>Save Measures:</strong> Save the two control measures using the sample, "
3392  "line positions under the crosshairs.</li>"
3393  "<li><strong>Save Point:</strong> Save the control point to the control network.</li>"
3394  "</ul>");
3395  controlPointEditing->setWordWrap(true);
3396  controlPointLayout->addWidget(controlPointEditing);
3397 
3398  controlPointTab->setWidget(controlPointContainer);
3399 
3400  tabArea->addTab(overviewTab, "&Overview");
3401  tabArea->addTab(quickTab, "&Quick Start");
3402  tabArea->addTab(controlPointTab, "&Control Point Editing");
3403 
3404  QHBoxLayout *buttonsLayout = new QHBoxLayout;
3405  // Flush the buttons to the right
3406  buttonsLayout->addStretch();
3407 
3408  QPushButton *closeButton = new QPushButton("&Close");
3409  closeButton->setIcon(QIcon(FileName("$base/icons/guiStop.png").expanded()));
3410  closeButton->setDefault(true);
3411  connect(closeButton, SIGNAL(clicked()),
3412  helpDialog, SLOT(close()));
3413  buttonsLayout->addWidget(closeButton);
3414 
3415  mainLayout->addLayout(buttonsLayout);
3416 
3417  helpDialog->show();
3418  }
3419 #endif
3420 }
Isis::Spice::radii
void radii(Distance r[3]) const
Returns the radii of the body in km.
Definition: Spice.cpp:930
Isis::Angle::Degrees
@ Degrees
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Definition: Angle.h:56
Isis::ControlPointEditWidget::m_groundFilename
QString m_groundFilename
File name of ground source.
Definition: ControlPointEditWidget.h:317
Isis::ControlPointEditWidget::setLockRightMeasure
void setLockRightMeasure(bool ignore)
Set the "EditLock" keyword of the measure shown in the right viewport to the value of the input param...
Definition: ControlPointEditWidget.cpp:2437
Isis::ControlPointEditWidget::m_groundSourceCombo
QPointer< QComboBox > m_groundSourceCombo
ComboBox for selecting ground source.
Definition: ControlPointEditWidget.h:270
Isis::ControlPointEditWidget::setControlFromActive
void setControlFromActive()
New active control was set from ipce.
Definition: ControlPointEditWidget.cpp:697
Isis::ControlPointEditWidget::writeTemplateFile
void writeTemplateFile(QString)
Write the contents of the template editor to the file provided.
Definition: ControlPointEditWidget.cpp:2870
Isis::ControlPointEditWidget::m_pointTypeCombo
QPointer< QComboBox > m_pointTypeCombo
Combobox to change the type of the current point.
Definition: ControlPointEditWidget.h:273
Isis::ControlPointEditWidget::m_leftCube
QScopedPointer< Cube > m_leftCube
Left cube.
Definition: ControlPointEditWidget.h:310
Isis::Project::templateRoot
static QString templateRoot(QString projectRoot)
Appends the root directory name 'templates' to the project .
Definition: Project.cpp:2125
QWidget
Isis::ControlMeasure::RegisteredPixel
@ RegisteredPixel
Registered to whole pixel (e.g.,pointreg)
Definition: ControlMeasure.h:212
Isis::ControlPointEditWidget::updateSurfacePointInfo
void updateSurfacePointInfo()
Update the Surface Point Information in the ControlPointEditWidget.
Definition: ControlPointEditWidget.cpp:3030
Isis::ControlPointEditWidget::setIgnoreRightMeasure
void setIgnoreRightMeasure(bool ignore)
Set the "Ignore" keyword of the measure shown in the right viewport to the value of the input paramet...
Definition: ControlPointEditWidget.cpp:2477
Isis::ControlMeasure::RegisteredSubPixel
@ RegisteredSubPixel
Registered to sub-pixel (e.g., pointreg)
Definition: ControlMeasure.h:214
Isis::ControlPointEditWidget::m_rightReference
QPointer< QLabel > m_rightReference
Label indicating if right measure is the reference.
Definition: ControlPointEditWidget.h:283
Isis::ControlPointEditWidget::m_saveDefaultPalette
QPalette m_saveDefaultPalette
Default color pallet of the "Save Point" button.
Definition: ControlPointEditWidget.h:261
Isis::ControlPointEditWidget::colorizeSavePointButton
void colorizeSavePointButton()
Refresh all necessary widgets in ControlPointEditWidget including the PointEditor and CubeViewports.
Definition: ControlPointEditWidget.cpp:3105
Isis::UniversalGroundMap
Universal Ground Map.
Definition: UniversalGroundMap.h:69
Isis::ControlPoint::PointTypeToString
static QString PointTypeToString(PointType type)
Obtain a string representation of a given PointType.
Definition: ControlPoint.cpp:1333
Isis::UniversalGroundMap::Sample
double Sample() const
Returns the current line value of the camera model or projection.
Definition: UniversalGroundMap.cpp:200
Isis::ControlPointEditWidget::m_addMeasuresButton
bool m_addMeasuresButton
Indicates whether or not to add "Add Measures(s) to Point".
Definition: ControlPointEditWidget.h:240
Isis::Directory
Definition: Directory.h:271
Isis::Portal
Buffer for containing a two dimensional section of an image.
Definition: Portal.h:36
Isis::ControlPointEditWidget::checkGroundFileLocation
FileName checkGroundFileLocation(FileName groundFile)
Ground source file from control net cannot be found, give user option to give new location.
Definition: ControlPointEditWidget.cpp:887
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::ControlPointEditWidget::setIgnorePoint
void setIgnorePoint(bool ignore)
Set point's "Ignore" keyword to the value of the input parameter.
Definition: ControlPointEditWidget.cpp:2337
Project.h
Isis::ControlPointEditWidget::m_savePoint
QPointer< QPushButton > m_savePoint
Button to save current point being edited.
Definition: ControlPointEditWidget.h:260
Isis::ControlMeasure::SetCubeSerialNumber
Status SetCubeSerialNumber(QString newSerialNumber)
Set cube serial number.
Definition: ControlMeasure.cpp:187
Isis::ControlPointEditWidget::setGroundSourceInfo
bool setGroundSourceInfo()
Find the ground source location: First look at current edit point for parameter, AprioriXYZSourceFile...
Definition: ControlPointEditWidget.cpp:813
Isis::ControlPointEditWidget::setTemplateFile
void setTemplateFile(QString)
Appends the filename to the registrations path (unless this is the default template) and calls setTem...
Definition: ControlPointEditWidget.cpp:2988
Isis::ControlPointEditWidget::selectLeftMeasure
void selectLeftMeasure(int index)
Select left measure.
Definition: ControlPointEditWidget.cpp:2546
Isis::ControlPoint::SetChooserName
Status SetChooserName(QString name)
Set the point's chooser name.
Definition: ControlPoint.cpp:487
Isis::SerialNumberList::size
int size() const
How many serial number / filename combos are in the list.
Definition: SerialNumberList.cpp:384
Isis::Camera::SetImage
virtual bool SetImage(const double sample, const double line)
Sets the sample/line values of the image to get the lat/lon values.
Definition: Camera.cpp:154
Isis::FileName::name
QString name() const
Returns the name of the file excluding the path and the attributes in the file name.
Definition: FileName.cpp:162
Isis::ControlPoint::PointLocked
@ PointLocked
This is returned when the operation requires Edit Lock to be false but it is currently true.
Definition: ControlPoint.h:408
Isis::ControlPointEditWidget::validateMeasureChange
bool validateMeasureChange(ControlMeasure *m)
Validates a change to a control measure.
Definition: ControlPointEditWidget.cpp:1850
Isis::SerialNumberList::serialNumberIndex
int serialNumberIndex(const QString &sn)
Return a list index given a serial number.
Definition: SerialNumberList.cpp:490
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::ControlPointEditWidget::nextRightMeasure
void nextRightMeasure()
Selects the next right measure when activated by key shortcut.
Definition: ControlPointEditWidget.cpp:2502
Isis::Camera::Sample
virtual double Sample() const
Returns the current sample number.
Definition: Camera.cpp:2690
Isis::ControlPointEditWidget::checkReference
void checkReference()
Change which measure is the reference.
Definition: ControlPointEditWidget.cpp:1995
Isis::ControlPointEditWidget::m_newGroundDir
QString m_newGroundDir
Contains the ground source location.
Definition: ControlPointEditWidget.h:325
Isis::Buffer::DoubleBuffer
double * DoubleBuffer() const
Returns the value of the shape buffer.
Definition: Buffer.h:138
Isis::ControlPointEditWidget::updateLeftMeasureInfo
void updateLeftMeasureInfo()
Update the left measure information.
Definition: ControlPointEditWidget.cpp:2650
Isis::Stretch
Pixel value mapper.
Definition: Stretch.h:58
Isis::ControlPointEditWidget::viewTemplateFile
void viewTemplateFile()
Allows the user to view the template file that is currently set.
Definition: ControlPointEditWidget.cpp:2922
Isis::FileName::fileExists
bool fileExists() const
Returns true if the file exists; false otherwise.
Definition: FileName.cpp:449
Isis::ControlPointEditWidget::reloadPoint
void reloadPoint()
Set both chip viewports to their original measures for the control point.
Definition: ControlPointEditWidget.cpp:642
Isis::SerialNumber::Compose
static QString Compose(Pvl &label, bool def2filename=false)
Compose a SerialNumber from a PVL.
Definition: SerialNumber.cpp:38
Isis::ControlPointEditWidget::saveChips
void saveChips()
Slot which calls ControlPointEditWidget slot to save chips.
Definition: ControlPointEditWidget.cpp:2948
Isis::ControlPointEditWidget::m_ignoreRightMeasure
QPointer< QCheckBox > m_ignoreRightMeasure
Checkbox to ignore the right measure.
Definition: ControlPointEditWidget.h:288
Isis::TemplateList
Definition: TemplateList.h:35
Isis::Project::shapeDataRoot
static QString shapeDataRoot(QString projectRoot)
Appends the root directory name 'shapes' to the project .
Definition: Project.cpp:2087
Isis::ControlPointEditWidget::createControlPoint
void createControlPoint(double latitude, double longitude, Cube *cube=0, bool isGroundSource=false)
Create a new control point at the given latitude, longitude.
Definition: ControlPointEditWidget.cpp:1455
Isis::ControlPointEditWidget::m_templateEditorWidget
QPointer< QWidget > m_templateEditorWidget
Template editor widget.
Definition: ControlPointEditWidget.h:266
Isis::ControlPointEditWidget::eventFilter
bool eventFilter(QObject *o, QEvent *e)
Event filter for ControlPointEditWidget.
Definition: ControlPointEditWidget.cpp:2735
Isis::ControlPointEditWidget::m_rightCombo
QPointer< QComboBox > m_rightCombo
Combobox to load right measure into right chip viewport.
Definition: ControlPointEditWidget.h:291
Isis::ControlPointEditWidget::m_editPoint
QPointer< ControlPoint > m_editPoint
The control point being edited.
Definition: ControlPointEditWidget.h:297
Isis::ControlPointEditWidget::m_groundSN
QString m_groundSN
Serial number of ground source file.
Definition: ControlPointEditWidget.h:318
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::ControlPoint::PointType
PointType
These are the valid 'types' of point.
Definition: ControlPoint.h:364
Isis::Project::activeControl
Control * activeControl()
Return the Active Control (control network)
Definition: Project.cpp:1903
Isis::Template::importName
QString importName() const
Get the name of the TemplateList this file was imported under.
Definition: Template.cpp:68
Isis::Interpolator::Lines
int Lines()
Returns the number of lines needed by the interpolator.
Definition: Interpolator.cpp:236
Isis::ControlPointEditWidget::resetTemplateComboBox
void resetTemplateComboBox(QString fileName)
Reset the selected template in the template combobox if the template selected by the user does not sa...
Definition: ControlPointEditWidget.cpp:3006
Isis::ControlPointEditWidget::openReferenceRadius
void openReferenceRadius()
Open a radius source using the shape model of the reference measure of m_editPoint.
Definition: ControlPointEditWidget.cpp:974
Isis::ControlPoint::HasAprioriSurfacePointSourceFile
bool HasAprioriSurfacePointSourceFile() const
Checks to see if the surface point source file has been set.
Definition: ControlPoint.cpp:1692
Isis::SurfacePoint::GetLatitude
Latitude GetLatitude() const
Return the body-fixed latitude for the surface point.
Definition: SurfacePoint.cpp:1665
Isis::ControlPointEditWidget::updateRightMeasureInfo
void updateRightMeasureInfo()
Update the right measure information.
Definition: ControlPointEditWidget.cpp:2696
Isis::Directory::project
Project * project() const
Gets the Project for this directory.
Definition: Directory.cpp:1311
Isis::Project::regTemplates
QList< TemplateList * > regTemplates()
Return registration template FileNames.
Definition: Project.cpp:2166
Isis::ControlPointEditWidget::saveTemplateFile
void saveTemplateFile()
Save the file opened in the template editor.
Definition: ControlPointEditWidget.cpp:2837
Isis::ControlPointEditWidget::m_leftMeasure
QPointer< ControlMeasure > m_leftMeasure
Left control measure.
Definition: ControlPointEditWidget.h:308
Isis::ControlPoint::GetId
QString GetId() const
Return the Id of the control point.
Definition: ControlPoint.cpp:1306
Isis::Control
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:66
Isis::ControlPointEditWidget::changeGroundLocationsInNet
void changeGroundLocationsInNet()
Change the location of all ground source locations in the ControlNet.
Definition: ControlPointEditWidget.cpp:952
Isis::ControlPointEditWidget::loadTemplateFile
void loadTemplateFile(QString)
Updates the current template file being used.
Definition: ControlPointEditWidget.cpp:2803
Isis::ControlPointEditWidget::clearGroundSource
void clearGroundSource()
Clear out the ground source used for Constrained or Fixed control points.
Definition: ControlPointEditWidget.cpp:1124
Isis::NewGroundSourceLocationDialog::changeControlNet
bool changeControlNet()
Indicates whether the control network should be changed to reflect new ground source location.
Definition: NewGroundSourceLocationDialog.cpp:86
Isis::ControlPointEditWidget::m_templateModified
bool m_templateModified
Indicates if the registration template was edited.
Definition: ControlPointEditWidget.h:267
Isis::ControlMeasure::Candidate
@ Candidate
(e.g., autoseed, interest) AKA predicted, unmeasured, unverified
Definition: ControlMeasure.h:208
Isis::Camera
Definition: Camera.h:236
Isis::Shape::cube
Cube * cube()
Get the Cube * associated with this display property.
Definition: Shape.cpp:324
Isis::ControlPointEditWidget::m_closePointEditor
QPointer< QAction > m_closePointEditor
Action to close the point editor.
Definition: ControlPointEditWidget.h:246
Isis::ControlPointEditWidget::showHideTemplateEditor
void showHideTemplateEditor()
Toggles the visibility of the template editor widget.
Definition: ControlPointEditWidget.cpp:2957
QToolBar
QStringList
Isis::ControlPointEditWidget::m_lockLeftMeasure
QPointer< QCheckBox > m_lockLeftMeasure
Checkbox to edit lock/unlock the left measure.
Definition: ControlPointEditWidget.h:285
Isis::ControlPoint::SetAprioriSurfacePointSourceFile
Status SetAprioriSurfacePointSourceFile(QString sourceFile)
This updates the filename of where the apriori surface point came from.
Definition: ControlPoint.cpp:839
Isis::ControlMeasureEditWidget
Point Editor Widget.
Definition: ControlMeasureEditWidget.h:174
Isis::SerialNumberList
Serial Number list generator.
Definition: SerialNumberList.h:64
Isis::ControlPointEditWidget::m_groundSourceType
ControlPoint::SurfacePointSource::Source m_groundSourceType
SurfacePoint type of ground source.
Definition: ControlPointEditWidget.h:319
Isis::Interpolator::HotSample
double HotSample()
Returns the sample coordinate of the center pixel in the buffer for the interpolator.
Definition: Interpolator.cpp:265
QComboBox
Isis::SerialNumberList::serialNumber
QString serialNumber(const QString &filename)
Return a serial number given a filename.
Definition: SerialNumberList.cpp:426
Isis::Distance
Distance measurement, usually in meters.
Definition: Distance.h:34
Isis::ControlPointEditWidget::createTopSplitter
QSplitter * createTopSplitter()
Creates everything above the ControlPointEdit.
Definition: ControlPointEditWidget.cpp:290
Isis::ControlPointEditWidget::m_controlNet
QPointer< ControlNet > m_controlNet
Current control net.
Definition: ControlPointEditWidget.h:299
Isis::ControlPointEditWidget::setShapesForPoint
void setShapesForPoint(double latitude=Null, double longitude=Null)
Fill m_projectShapeNames with ALL shapes currently in project.
Definition: ControlPointEditWidget.cpp:584
Isis::NewGroundSourceLocationDialog
Dialog used by ControlPointEditWidget to select a new location for ground source files.
Definition: NewGroundSourceLocationDialog.h:34
Isis::ControlPointEditWidget::m_ignoreLeftMeasure
QPointer< QCheckBox > m_ignoreLeftMeasure
Checkbox to ignore the left measure.
Definition: ControlPointEditWidget.h:286
Isis::SerialNumberList::remove
void remove(const QString &sn)
Remove the specified serial number from the list.
Definition: SerialNumberList.cpp:88
Isis::ControlPointEditWidget::m_reloadPoint
QPointer< QPushButton > m_reloadPoint
Button to reload current point to saved measures.
Definition: ControlPointEditWidget.h:259
Isis::Shape::fileName
QString fileName() const
Get the file name of the cube that this shape represents.
Definition: Shape.cpp:376
Isis::ControlPointEditWidget::loadGroundMeasure
void loadGroundMeasure()
Load ground measure into right side and add to file combo boxes.
Definition: ControlPointEditWidget.cpp:723
Isis::ControlPointEditWidget::m_projectShapeNames
QStringList m_projectShapeNames
List of Shapes imported into project, at time of loaded CP.
Definition: ControlPointEditWidget.h:313
Isis::Cube::externalCubeFileName
FileName externalCubeFileName() const
If this is an external cube label file, this will give you the cube dn file that this label reference...
Definition: Cube.cpp:1535
Isis::ControlPointEditWidget::deletePoint
void deletePoint(ControlPoint *controlPoint)
Gives user options for deleting a control point from the control network.
Definition: ControlPointEditWidget.cpp:1568
Isis::ControlMeasure::GetCubeSerialNumber
QString GetCubeSerialNumber() const
Return the serial number of the cube containing the coordinate.
Definition: ControlMeasure.cpp:557
Isis::ControlPointEditWidget::okToContinue
bool okToContinue()
Checks the state of the template registration file and determines if it is safe to continue opening a...
Definition: ControlPointEditWidget.cpp:2756
Isis::ControlPointEditWidget::createTemporaryGroundMeasure
ControlMeasure * createTemporaryGroundMeasure()
Create a temporary measure to hold the ground point info for ground source.
Definition: ControlPointEditWidget.cpp:756
Isis::ControlPoint
A single control point.
Definition: ControlPoint.h:354
Isis::ControlPointEditWidget::loadPoint
void loadPoint(QString serialNumber="")
Load point into ControlPointEditWidget.
Definition: ControlPointEditWidget.cpp:1234
Isis::ControlPointEditWidget::previousRightMeasure
void previousRightMeasure()
Selects the previous right measure when activated by key shortcut.
Definition: ControlPointEditWidget.cpp:2522
Isis::Distance::Meters
@ Meters
The distance is being specified in meters.
Definition: Distance.h:43
Isis::FileName::expanded
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
Isis::Control::controlNet
ControlNet * controlNet()
Open and return a pointer to the ControlNet for this Control.
Definition: Control.cpp:150
Isis::ControlPointEditWidget::groundSourceFileSelectionChanged
void groundSourceFileSelectionChanged(int index)
Slot called when user changes selection in m_groundSourceCombo.
Definition: ControlPointEditWidget.cpp:1110
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::ControlPointEditWidget::m_templateEditor
QPointer< QTextEdit > m_templateEditor
Text editor for editing the registration template.
Definition: ControlPointEditWidget.h:265
Isis::Sensor::UniversalLongitude
virtual double UniversalLongitude() const
Returns the positive east, 0-360 domain longitude, in degrees, at the surface intersection point in t...
Definition: Sensor.cpp:233
Isis::ControlPointEditWidget::colorizeSaveNetButton
void colorizeSaveNetButton(bool reset=false)
Turn "Save Net" button text to red.
Definition: ControlPointEditWidget.cpp:3122
Isis::ControlPointEditWidget::IsMeasureLocked
bool IsMeasureLocked(QString serialNumber)
Check for implicitly locked measure in m_editPoint.
Definition: ControlPointEditWidget.cpp:3149
Isis::Template::fileName
QString fileName() const
Get the file name that this Template represents.
Definition: Template.cpp:50
Isis::ControlPointEditWidget::setSerialNumberList
void setSerialNumberList(SerialNumberList *snList)
Set the serial number list.
Definition: ControlPointEditWidget.cpp:653
Isis::ControlPoint::SetType
Status SetType(PointType newType)
Updates the control point's type.
Definition: ControlPoint.cpp:709
Isis::ControlPointEditWidget::setControl
void setControl(Control *control)
New control network being edited.
Definition: ControlPointEditWidget.cpp:674
Isis::IException::toString
QString toString() const
Returns a string representation of this exception.
Definition: IException.cpp:537
Isis::ControlMeasure::SetCamera
Status SetCamera(Isis::Camera *camera)
Set pointer to camera associated with a measure.
Definition: ControlMeasure.cpp:169
Isis::SerialNumberList::fileNameIndex
int fileNameIndex(const QString &filename)
Return a list index given a filename.
Definition: SerialNumberList.cpp:517
Isis::ControlMeasure::Manual
@ Manual
Hand Measured (e.g., qnet)
Definition: ControlMeasure.h:210
Isis::ControlPointEditWidget::createPointEditor
void createPointEditor(QWidget *parent, bool addMeasures)
Create the widget for editing control points.
Definition: ControlPointEditWidget.cpp:156
Isis::ControlPointEditWidget::m_demOpen
bool m_demOpen
Has a radius source been opened?
Definition: ControlPointEditWidget.h:332
Isis::ControlPointEditWidget::m_openTemplateFile
QPointer< QAction > m_openTemplateFile
Action to open a registration template file to disk.
Definition: ControlPointEditWidget.h:251
Isis::ControlPointEditWidget::initDem
void initDem(QString demFile)
Initialize the given Dem and appropriate member variables for later use editing Fixed or Constrained ...
Definition: ControlPointEditWidget.cpp:1019
Isis::ControlPointEditWidget::saveTemplateFileAs
void saveTemplateFileAs()
Save the contents of template editor to a file chosen by the user.
Definition: ControlPointEditWidget.cpp:2852
Isis::ControlPointEditWidget::m_radiusSourceCombo
QPointer< QComboBox > m_radiusSourceCombo
ComboBox for selecting ground source.
Definition: ControlPointEditWidget.h:271
Isis::ControlMeasure::SetChooserName
Status SetChooserName()
Set chooser name to a user who last changed the coordinate.
Definition: ControlMeasure.cpp:196
Isis::Template
Definition: Template.h:30
Isis::Camera::SetUniversalGround
virtual bool SetUniversalGround(const double latitude, const double longitude)
Sets the lat/lon values to get the sample/line values.
Definition: Camera.cpp:380
Isis::ControlPointEditWidget::m_control
QPointer< Control > m_control
Current Control.
Definition: ControlPointEditWidget.h:300
Isis::SerialNumberList::add
void add(const QString &filename, bool def2filename=false)
Adds a new filename / serial number pair to the SerialNumberList.
Definition: SerialNumberList.cpp:121
Isis::ControlMeasure::IsEditLocked
bool IsEditLocked() const
Return value for p_editLock or implicit lock on reference measure.
Definition: ControlMeasure.cpp:601
Isis::ControlPointEditWidget::m_saveTemplateFileAs
QPointer< QAction > m_saveTemplateFileAs
Action to save a new registration template.
Definition: ControlPointEditWidget.h:253
Isis::Shape
This represents a shape in a project-based GUI interface.
Definition: Shape.h:68
Isis::PvlContainer::fileName
QString fileName() const
Returns the filename used to initialise the Pvl object.
Definition: PvlContainer.h:232
Isis::ControlPointEditWidget::selectRightMeasure
void selectRightMeasure(int index)
Select right measure.
Definition: ControlPointEditWidget.cpp:2594
QStandardItemModel
Isis::ControlNet
a control network
Definition: ControlNet.h:257
Isis::NewControlPointDialog
Definition: NewControlPointDialog.h:49
Isis::ShapeList
Internalizes a list of shapes and allows for operations on the entire list.
Definition: ShapeList.h:33
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::Interpolator
Pixel interpolator.
Definition: Interpolator.h:34
Isis::ControlPointEditWidget::setLockLeftMeasure
void setLockLeftMeasure(bool ignore)
Set the "EditLock" keyword of the measure shown in the left viewport to the value of the input parame...
Definition: ControlPointEditWidget.cpp:2367
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::CubeViewport
Widget to display Isis cubes for qt apps.
Definition: CubeViewport.h:122
Isis::ControlPointEditWidget::m_saveNet
QPointer< QPushButton > m_saveNet
Button to save the current control network.
Definition: ControlPointEditWidget.h:263
Isis::ControlPointEditWidget::m_ptIdValue
QPointer< QLabel > m_ptIdValue
Label for the point id of the current point.
Definition: ControlPointEditWidget.h:272
Isis::ControlPointEditWidget::createRightMeasureGroupBox
QGroupBox * createRightMeasureGroupBox()
Create the "Right Measure" groupbox.
Definition: ControlPointEditWidget.cpp:428
Isis::ControlPointEditWidget::createControlPointGroupBox
QGroupBox * createControlPointGroupBox()
Creates the "Control Point" groupbox.
Definition: ControlPointEditWidget.cpp:323
Isis::FileName::toString
QString toString() const
Returns a QString of the full file name including the file path, excluding the attributes with any Is...
Definition: FileName.cpp:515
Isis::Spice
Obtain SPICE information for a spacecraft.
Definition: Spice.h:283
Isis::SurfacePoint::GetLongitude
Longitude GetLongitude() const
Return the body-fixed longitude for the surface point.
Definition: SurfacePoint.cpp:1685
Isis::ControlPointEditWidget::m_nameToShapeMap
QMap< QString, Shape * > m_nameToShapeMap
Map between Shape display name and object.
Definition: ControlPointEditWidget.h:315
Isis::Null
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
Isis::ControlPointEditWidget::setPointType
void setPointType(int pointType)
Set the point type.
Definition: ControlPointEditWidget.cpp:2250
Isis::ControlPointEditWidget::m_rightMeasureType
QPointer< QLabel > m_rightMeasureType
Label for the right measure's adjustment type.
Definition: ControlPointEditWidget.h:284
Isis::ControlPointEditWidget::m_cnetModified
bool m_cnetModified
Indicates if the control network has been modified.
Definition: ControlPointEditWidget.h:244
Isis::ControlPointEditWidget::m_cnetFileNameLabel
QPointer< QLabel > m_cnetFileNameLabel
Label with name of the control network file.
Definition: ControlPointEditWidget.h:243
Isis::SurfacePoint::GetLocalRadius
Distance GetLocalRadius() const
Return the radius of the surface point.
Definition: SurfacePoint.cpp:1732
std
Namespace for the standard library.
Isis::NewGroundSourceLocationDialog::changeAllGroundSourceLocation
bool changeAllGroundSourceLocation()
Indicates whether all subsequent ground source files should be found in new source directory.
Definition: NewGroundSourceLocationDialog.cpp:76
Isis::TemplateList::type
QString type() const
Get the type of template in this TemplateList.
Definition: TemplateList.cpp:91
Isis::Interpolator::Interpolate
double Interpolate(const double isamp, const double iline, const double buf[])
Performs an interpolation on the data according to the parameters set in the constructor.
Definition: Interpolator.cpp:56
Isis::ControlPointEditWidget::createTemplateEditorWidget
void createTemplateEditorWidget()
Creates the Widget which contains the template editor and its toolbar.
Definition: ControlPointEditWidget.cpp:486
Isis::ControlPointEditWidget::addTemplates
void addTemplates(TemplateList *templateList)
Add registration TemplateList to combobox when imported to project.
Definition: ControlPointEditWidget.cpp:2971
Isis::NewControlPointDialog::setFiles
void setFiles(QStringList pointFiles)
Definition: NewControlPointDialog.cpp:252
Isis::ControlPointEditWidget::savePoint
void savePoint()
Save edit point to the Control Network.
Definition: ControlPointEditWidget.cpp:2192
Isis::ControlPointEditWidget::saveNet
void saveNet()
This slot is needed because we cannot directly emit a signal with a ControlNet argument after the "Sa...
Definition: ControlPointEditWidget.cpp:3173
Isis::ControlPointEditWidget::setLockPoint
void setLockPoint(bool ignore)
Set point's "EditLock" keyword to the value of the input parameter.
Definition: ControlPointEditWidget.cpp:2318
Isis::ControlPointEditWidget::setTemplateModified
void setTemplateModified()
Called when the template file is modified by the template editor.
Definition: ControlPointEditWidget.cpp:2827
Isis::ControlPointEditWidget::m_changeGroundLocationInNet
bool m_changeGroundLocationInNet
Change the ground source location.
Definition: ControlPointEditWidget.h:324
Isis::ControlPoint::Free
@ Free
A Free point is a Control Point that identifies common measurements between two or more cubes.
Definition: ControlPoint.h:384
Isis::ControlPointEditWidget::openTemplateFile
void openTemplateFile()
Prompt user for a registration template file to open.
Definition: ControlPointEditWidget.cpp:2780
Isis::ControlPoint::Delete
int Delete(ControlMeasure *measure)
Remove a measurement from the control point, deleting reference measure is allowed.
Definition: ControlPoint.cpp:354
Isis::ControlPointEditWidget::setIgnoreLeftMeasure
void setIgnoreLeftMeasure(bool ignore)
Set the "Ignore" keyword of the measure shown in the left viewport to the value of the input paramete...
Definition: ControlPointEditWidget.cpp:2407
Isis::Distance::meters
double meters() const
Get the distance in meters.
Definition: Distance.cpp:85
Isis::ControlPointEditWidget::m_lastUsedPointId
QString m_lastUsedPointId
Point id of the last used control point.
Definition: ControlPointEditWidget.h:303
Isis::ControlPointEditWidget::m_changeAllGroundLocation
bool m_changeAllGroundLocation
Change the ground source location of all fixed, constrained points in the network.
Definition: ControlPointEditWidget.h:322
Isis::ControlPointEditWidget::m_lockRightMeasure
QPointer< QCheckBox > m_lockRightMeasure
Checkbox to edit lock/unlock the right measure.
Definition: ControlPointEditWidget.h:287
Isis::Angle::degrees
double degrees() const
Get the angle in units of Degrees.
Definition: Angle.h:232
Isis::ControlPointEditWidget::m_saveChips
QPointer< QAction > m_saveChips
Action to save the registration chips Action to toggle visibility of the registration template editor...
Definition: ControlPointEditWidget.h:248
Isis::ControlPoint::GetType
PointType GetType() const
Definition: ControlPoint.cpp:1401
Isis::UniversalGroundMap::SetUniversalGround
bool SetUniversalGround(double lat, double lon)
Returns whether the lat/lon position was set successfully in the camera model or projection.
Definition: UniversalGroundMap.cpp:102
Isis::ControlPointEditWidget::m_leftCombo
QPointer< QComboBox > m_leftCombo
Combobox to load left measure into left chip viewport.
Definition: ControlPointEditWidget.h:290
Isis::ControlPointEditWidget::m_numberProjectShapesWithPoint
int m_numberProjectShapesWithPoint
Number of shapes containing control point.
Definition: ControlPointEditWidget.h:314
Isis::ControlPointEditWidget::demRadius
double demRadius(double latitude, double longitude)
Return a radius values from the dem using bilinear interpolation.
Definition: ControlPointEditWidget.cpp:1070
QDialog
Isis::Interpolator::Samples
int Samples()
Returns the number of samples needed by the interpolator.
Definition: Interpolator.cpp:208
Isis::ControlMeasure::SetType
Status SetType(MeasureType type)
Set how the coordinate was obtained.
Definition: ControlMeasure.cpp:420
Isis::ControlPointEditWidget::m_templateComboBox
QPointer< QComboBox > m_templateComboBox
ComboBox of imported registration templates.
Definition: ControlPointEditWidget.h:269
Isis::ControlPoint::SetAprioriSurfacePointSource
Status SetAprioriSurfacePointSource(SurfacePointSource::Source source)
This updates the source of the surface point.
Definition: ControlPoint.cpp:821
Isis::PvlEditDialog
PvlEditDialog creates a QDialog window in which a QTextEdit box displays the contents of a pvl file.
Definition: PvlEditDialog.h:45
Isis::ControlPointEditWidget::m_saveTemplateFile
QPointer< QAction > m_saveTemplateFile
Action to save a registration template file to disk.
Definition: ControlPointEditWidget.h:252
Isis::ControlPoint::Status
Status
This is a return status for many of the mutating (setter) method calls.
Definition: ControlPoint.h:393
Isis::SerialNumberList::fileName
QString fileName(const QString &sn)
Return a filename given a serial number.
Definition: SerialNumberList.cpp:399
Isis::Camera::Line
virtual double Line() const
Returns the current line number.
Definition: Camera.cpp:2710
Isis::ControlPointEditWidget::m_rightCube
QScopedPointer< Cube > m_rightCube
Right cube.
Definition: ControlPointEditWidget.h:311
Isis::ControlPoint::HasSerialNumber
bool HasSerialNumber(QString serialNumber) const
Return true if given serial number exists in point.
Definition: ControlPoint.cpp:1746
QObject
Isis::Application::UserName
static QString UserName()
Returns the user name.
Definition: Application.cpp:816
Isis::ControlPointEditWidget::createLeftMeasureGroupBox
QGroupBox * createLeftMeasureGroupBox()
Creates the "Left Measure" groupbox.
Definition: ControlPointEditWidget.cpp:386
Isis::ControlPointEditWidget::clearEditPoint
void clearEditPoint()
Cleans up the edit point memory.
Definition: ControlPointEditWidget.cpp:3185
Isis::ControlPointEditWidget::setEditPoint
void setEditPoint(ControlPoint *controlPoint, QString serialNumber="")
Slot called by Directory to set the control point for editing.
Definition: ControlPointEditWidget.cpp:1169
Isis::ControlPointEditWidget::m_measureEditor
QPointer< ControlMeasureEditWidget > m_measureEditor
Pointer to control measure editor widget.
Definition: ControlPointEditWidget.h:257
Isis::ControlMeasure::GetChooserName
QString GetChooserName() const
Return the chooser name.
Definition: ControlMeasure.cpp:542
Isis::ControlPointEditWidget::m_parent
QPointer< QWidget > m_parent
Parent widget.
Definition: ControlPointEditWidget.h:238
Isis::ControlPointEditWidget::m_serialNumberList
SerialNumberList * m_serialNumberList
Serial number list for the loaded cubes.
Definition: ControlPointEditWidget.h:298
Isis::Interpolator::HotLine
double HotLine()
Returns the line coordinate of the center pixel in the buffer for the interpolator.
Definition: Interpolator.cpp:297
QAction
Isis::UniversalGroundMap::Line
double Line() const
Returns the current line value of the camera model or projection.
Definition: UniversalGroundMap.cpp:214
Isis::ControlPointEditWidget::m_rightMeasure
QPointer< ControlMeasure > m_rightMeasure
Right control measure.
Definition: ControlPointEditWidget.h:309
Isis::Portal::SetPosition
void SetPosition(const double sample, const double line, const int band)
Sets the line and sample position of the buffer.
Definition: Portal.h:93
QStandardItem
Isis::ControlPoint::Add
void Add(ControlMeasure *measure)
Add a measurement to the control point, taking ownership of the measure in the process.
Definition: ControlPoint.cpp:223
Isis::ControlPointEditWidget::m_leftReference
QPointer< QLabel > m_leftReference
Label indicating if left measure is the reference.
Definition: ControlPointEditWidget.h:281
Isis::ControlPointEditWidget::measureSaved
void measureSaved()
This method is connected with the measureSaved() signal from ControlMeasureEditWidget.
Definition: ControlPointEditWidget.cpp:1750
Isis::ControlPointEditWidget::m_lockPoint
QPointer< QCheckBox > m_lockPoint
Checkbox that locks/unlocks the current point.
Definition: ControlPointEditWidget.h:279
Isis::ControlPointEditWidget::m_ignorePoint
QPointer< QCheckBox > m_ignorePoint
Checkbox to ignore the current point.
Definition: ControlPointEditWidget.h:280
Isis::SurfacePoint
This class defines a body-fixed surface point.
Definition: SurfacePoint.h:132
Isis::ControlPointEditWidget::m_leftMeasureType
QPointer< QLabel > m_leftMeasureType
Label for the left measure's adjustment type.
Definition: ControlPointEditWidget.h:282
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::ControlPointEditWidget::m_cnetFileName
QString m_cnetFileName
Filename of the control network that is being modified.
Definition: ControlPointEditWidget.h:242
Isis::ControlPointEditWidget::createActions
void createActions()
Creates the actions for the widget.
Definition: ControlPointEditWidget.cpp:511
Isis::ControlPointEditWidget::m_pointFiles
QStringList m_pointFiles
Associated files for current control point.
Definition: ControlPointEditWidget.h:305
Isis::ControlMeasure::SetCoordinate
Status SetCoordinate(double sample, double line)
Set the coordinate of the measurement.
Definition: ControlMeasure.cpp:219
Isis::Sensor::UniversalLatitude
virtual double UniversalLatitude() const
Returns the planetocentric latitude, in degrees, at the surface intersection point in the body fixed ...
Definition: Sensor.cpp:210
Isis::ControlMeasure
a control measurement
Definition: ControlMeasure.h:175
Isis::Control::fileName
QString fileName() const
Access the name of the control network file associated with this Control.
Definition: Control.cpp:272

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:16:20