Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Isis 3 Programmer Reference
FindTool.cpp
1#include "FindTool.h"
2
3#include <QApplication>
4#include <QCheckBox>
5#include <QComboBox>
6#include <QDialog>
7#include <QHBoxLayout>
8#include <QLabel>
9#include <QLineEdit>
10#include <QMenu>
11#include <QMenuBar>
12#include <QMessageBox>
13#include <QPushButton>
14#include <QToolButton>
15#include <QValidator>
16
17#include <float.h>
18
19#include "Camera.h"
20#include "Distance.h"
21#include "Latitude.h"
22#include "Longitude.h"
23#include "MainWindow.h"
24#include "MdiCubeViewport.h"
25#include "Projection.h"
26#include "SurfacePoint.h"
27#include "Target.h"
28#include "ToolPad.h"
29#include "UniversalGroundMap.h"
30#include "Workspace.h"
31
32
33namespace Isis {
39 FindTool::FindTool(QWidget *parent) : Tool(parent) {
40 p_dialog = NULL;
41 p_findPoint = NULL;
42 p_showDialogButton = NULL;
43 p_linkViewportsButton = NULL;
44 p_syncScale = NULL;
45 p_statusEdit = NULL;
46 p_tabWidget = NULL;
47 p_groundTab = NULL;
48 p_imageTab = NULL;
49
50 p_lat = DBL_MAX;
51 p_lon = DBL_MAX;
52 p_samp = DBL_MAX;
53 p_line = DBL_MAX;
54 p_pointVisible = true;
55
56 //Set up dialog box
57 createDialog(parent);
58
59 // Set up find point action
60 p_findPoint = new QAction(parent);
61 p_findPoint->setShortcut(Qt::CTRL + Qt::Key_F);
62 p_findPoint->setText("&Find Point");
63 p_findPoint->setIcon( QPixmap(toolIconDir() + "/find.png") );
64 QString text =
65 "<b>Function:</b> Centers all linked viewports to the selected lat/lon. \
66 The user can click anywhere on the image to have that point centered, or \
67 they can use the shortcut or button to bring up a window that they can \
68 enter a specific lat/lon position into. \
69 <p><b>Shortcut: </b> Ctrl+F </p> \
70 <p><b>Hint: </b> This option will only work if the image has a camera \
71 model or is projected, and will only center the point on images \
72 where the selected lat/lon position exists.</p>";
73 p_findPoint->setWhatsThis(text);
74 p_findPoint->setEnabled(false);
75 connect( p_findPoint, SIGNAL( triggered() ),
76 p_dialog, SLOT( show() ) );
77 }
78
79 FindTool::~FindTool() {
80 delete p_groundTab->p_latLineEdit->validator();
81 delete p_groundTab->p_lonLineEdit->validator();
82 }
83
84
91 p_dialog = new QDialog(parent);
92 p_tabWidget = new QTabWidget(p_dialog);
93 p_dialog->setWindowTitle("Find Latitude/Longitude Coordinate");
94
95 p_groundTab = new GroundTab();
96 p_imageTab = new ImageTab();
97 p_tabWidget->addTab(p_imageTab, "Image");
98 p_tabWidget->addTab(p_groundTab, "Ground");
99
100 // Create the action buttons
101 QPushButton *okButton = new QPushButton("Ok");
102 connect( okButton, SIGNAL( clicked() ),
103 this, SLOT( handleOkClicked() ) );
104
105 QPushButton *recordButton = new QPushButton("Record Point");
106 connect( recordButton, SIGNAL( clicked() ),
107 this, SLOT( handleRecordClicked() ) );
108
109 QPushButton *closeButton = new QPushButton("Close");
110 connect( closeButton, SIGNAL( clicked() ),
111 p_dialog, SLOT( hide() ) );
112
113 // Put the buttons in a horizontal orientation
114 QHBoxLayout *actionLayout = new QHBoxLayout();
115 actionLayout->addWidget(okButton);
116 actionLayout->addWidget(recordButton);
117 actionLayout->addWidget(closeButton);
118
119 QVBoxLayout *dialogLayout = new QVBoxLayout;
120 dialogLayout->addWidget(p_tabWidget);
121 dialogLayout->addLayout(actionLayout);
122 p_dialog->setLayout(dialogLayout);
123 }
124
125
132 p_latLineEdit = new QLineEdit();
133 p_latLineEdit->setText("");
134 p_latLineEdit->setValidator( new QDoubleValidator(-90.0, 90.0, 99, parent) );
135 p_lonLineEdit = new QLineEdit();
136 p_lonLineEdit->setText("");
137 p_lonLineEdit->setValidator( new QDoubleValidator(parent) );
138 QLabel *latLabel = new QLabel("Latitude");
139 QLabel *lonLabel = new QLabel("Longitude");
140
141 // Put the buttons and text field in a gridlayout
142 QGridLayout *gridLayout = new QGridLayout();
143 gridLayout->addWidget(latLabel, 0, 0);
144 gridLayout->addWidget(p_latLineEdit, 0, 1);
145 gridLayout->addWidget(lonLabel, 1, 0);
146 gridLayout->addWidget(p_lonLineEdit, 1, 1);
147 setLayout(gridLayout);
148 }
149
150
156 ImageTab::ImageTab(QWidget *parent) : QWidget(parent) {
157 p_sampLineEdit = new QLineEdit();
158 p_sampLineEdit->setText("");
159 p_lineLineEdit = new QLineEdit();
160 p_lineLineEdit->setText("");
161 QLabel *sampleLabel = new QLabel("Sample");
162 QLabel *lineLabel = new QLabel("Line");
163
164 // Put the buttons and text field in a gridlayout
165 QGridLayout *gridLayout = new QGridLayout();
166 gridLayout->addWidget(sampleLabel, 0, 0);
167 gridLayout->addWidget(p_sampLineEdit, 0, 1);
168 gridLayout->addWidget(lineLabel, 1, 0);
169 gridLayout->addWidget(p_lineLineEdit, 1, 1);
170 setLayout(gridLayout);
171 }
172
173
182 QAction *action = new QAction(toolpad);
183 action->setIcon( QPixmap(toolIconDir() + "/find.png") );
184 action->setToolTip("Find (F)");
185 action->setShortcut(Qt::Key_F);
186 QString text =
187 "<b>Function:</b> Find a lat/lon or line/sample coordinate in this cube. \
188 <p><b>Shortcut:</b>F</p> ";
189 action->setWhatsThis(text);
190 return action;
191 }
192
193
199 void FindTool::addTo(QMenu *menu) {
200 menu->addAction(p_findPoint);
201 }
202
203
211 QWidget *FindTool::createToolBarWidget(QStackedWidget *parent) {
212 QWidget *hbox = new QWidget;
213
214 p_showDialogButton = new QToolButton(hbox);
215 p_showDialogButton->setIcon( QPixmap(toolIconDir() + "/find.png") );
216 p_showDialogButton->setToolTip("Find Point");
217 QString text =
218 "<b>Function:</b> Centers all linked viewports to the selected lat/lon. \
219 The user can click anywhere on the image to have that point centered, or \
220 they can use the shortcut or button to bring up a window that they can \
221 enter a specific lat/lon position into. \
222 <p><b>Shortcut: </b> Ctrl+F </p> \
223 <p><b>Hint: </b> This option will only work if the image has a camera \
224 model or is projected, and will only center the point on images \
225 where the selected lat/lon position exists.</p>";
226 p_showDialogButton->setWhatsThis(text);
227 connect( p_showDialogButton, SIGNAL( clicked() ),
228 p_dialog, SLOT( show() ) );
229 p_showDialogButton->setAutoRaise(true);
230 p_showDialogButton->setIconSize( QSize(22, 22) );
231
232 p_syncScale = new QCheckBox("Sync Scale");
233 p_syncScale->setChecked(true);
234 p_syncScale->setToolTip("Synchronize Scale");
235 text = "<b>Function:</b> Syncronizes the scale of all linked viewports.";
236 p_syncScale->setWhatsThis(text);
237
238 p_linkViewportsButton = new QToolButton(hbox);
239 p_linkViewportsButton->setIcon( QPixmap(toolIconDir() + "/link_valid.png") );
240 p_linkViewportsButton->setToolTip("Link Georeferenced Images");
241 p_linkViewportsButton->setWhatsThis("<b>Function: </b> Links all open images that have\
242 a camera model or are map projections");
243 connect( p_linkViewportsButton, SIGNAL( clicked() ),
244 this, SLOT( handleLinkClicked() ) );
245 p_linkViewportsButton->setAutoRaise(true);
246 p_linkViewportsButton->setIconSize( QSize(22, 22) );
247
248 p_togglePointVisibleButton = new QToolButton(hbox);
249 p_togglePointVisibleButton->setIcon( QPixmap(toolIconDir() + "/redDot.png") );
250 p_togglePointVisibleButton->setToolTip("Hide red dot");
251 p_togglePointVisibleButton->setCheckable(true);
252 p_togglePointVisibleButton->setChecked(true);
253 connect( p_togglePointVisibleButton, SIGNAL( clicked() ),
254 this, SLOT( togglePointVisible() ) );
255
256 p_statusEdit = new QLineEdit();
257 p_statusEdit->setReadOnly(true);
258 p_statusEdit->setToolTip("Cube Type");
259 p_statusEdit->setWhatsThis("<b>Function: </b> Displays whether the active cube \
260 is a camera model, projection, both, or none. <p> \
261 <b>Hint: </b> If the cube is 'None' the find tool \
262 will not be active</p>");
263
264 p_groundEngine = new QComboBox();
265 p_groundEngine->setEditable(true);
266 p_groundEngine->setToolTip("Ground Engine Priority");
267 p_groundEngine->setWhatsThis("<b>Function: </b> Set priority use of the projection \
268 or the camera to determine ground coordinates. If both are available, \
269 the selected option takes priority. If only one is available, it will \
270 be used by default.");
271 p_groundEngine->insertItem(0, "Camera");
272 p_groundEngine->insertItem(1, "Projection");
273 p_groundEngine->setCurrentIndex(0);
274 connect( p_groundEngine, SIGNAL( currentIndexChanged(int) ),
275 this, SLOT( setProjectionEngine(int) ) );
276
277 QHBoxLayout *layout = new QHBoxLayout(hbox);
278 layout->setContentsMargins(0, 0, 0, 0);
279 layout->addWidget(p_statusEdit);
280 layout->addWidget(p_groundEngine);
281 layout->addWidget(p_showDialogButton);
282 layout->addWidget(p_linkViewportsButton);
283 layout->addWidget(p_togglePointVisibleButton);
284 layout->addWidget(p_syncScale);
285 layout->addStretch(1);
286 hbox->setLayout(layout);
287
288 return hbox;
289 }
290
291
304 MdiCubeViewport *activeViewport = cubeViewport();
305
306 if (activeViewport == NULL) {
307 p_linkViewportsButton->setEnabled(false);
308 p_findPoint->setEnabled(false);
309 p_showDialogButton->setEnabled(false);
310 p_syncScale->setEnabled(false);
311 p_statusEdit->setText("None");
312 if ( p_dialog->isVisible() ) {
313 p_dialog->close();
314 }
315 }
316 else {
317 p_findPoint->setEnabled(true);
318 p_showDialogButton->setEnabled(true);
319 p_statusEdit->setText("None");
320
321 if (cubeViewportList()->size() > 1) {
322 p_linkViewportsButton->setEnabled(true);
323 p_syncScale->setEnabled(true);
324 }
325 else {
326 p_linkViewportsButton->setEnabled(false);
327 p_syncScale->setEnabled(false);
328 }
329
330 if (activeViewport->camera() != NULL) {
331 p_statusEdit->setText("Camera");
332 if ( cubeViewport()->camera()->HasProjection() ) {
333 p_statusEdit->setText("Both");
334 }
335 }
336 else if (activeViewport->projection() != NULL) {
337 p_statusEdit->setText("Projection");
338 }
339
340 // from here until the rest of this method we are just updating the
341 // line edits within the dialog
342
343 UniversalGroundMap *groundMap = activeViewport->universalGroundMap();
344
345 if (p_samp != DBL_MAX && p_line != DBL_MAX) {
346 if ( groundMap && groundMap->SetImage(p_samp, p_line) ) {
347 QString latStr = QString::number( groundMap->UniversalLatitude() );
348 QString lonStr = QString::number( groundMap->UniversalLongitude() );
349 p_groundTab->p_latLineEdit->setText(latStr);
350 p_groundTab->p_lonLineEdit->setText(lonStr);
351 }
352 else {
353 p_groundTab->p_latLineEdit->setText("");
354 p_groundTab->p_lonLineEdit->setText("");
355 }
356
357 p_imageTab->p_sampLineEdit->setText( QString::number(p_samp) );
358 p_imageTab->p_lineLineEdit->setText( QString::number(p_line) );
359 }
360 else if (p_lat != DBL_MAX && p_lon != DBL_MAX) {
361 // this should also work for rings (radius, azimuth)
362 if ( groundMap && groundMap->SetUniversalGround(p_lat, p_lon) ) {
363 QString lineStr = QString::number( groundMap->Line() );
364 QString sampStr = QString::number( groundMap->Sample() );
365 p_imageTab->p_lineLineEdit->setText(lineStr);
366 p_imageTab->p_sampLineEdit->setText(sampStr);
367 }
368 else {
369 p_imageTab->p_lineLineEdit->setText("");
370 p_imageTab->p_sampLineEdit->setText("");
371 }
372
373 p_groundTab->p_latLineEdit->setText( QString::number(p_lat) );
374 p_groundTab->p_lonLineEdit->setText( QString::number(p_lon) );
375 }
376 } // of if activeViewport != NULL
377 }
378
379
388 p_samp = DBL_MAX;
389 p_line = DBL_MAX;
390 p_lat = DBL_MAX;
391 p_lon = DBL_MAX;
392
393 if (p_tabWidget->tabText( p_tabWidget->currentIndex() ) == "Ground") {
394 p_lat = p_groundTab->p_latLineEdit->text().toDouble();
395 p_lon = p_groundTab->p_lonLineEdit->text().toDouble();
396 if (p_lat > 90 || p_lat < -90) {
397 QString mess = QString::number(p_lat) + " is an invalid latitude value. "
398 + "Please enter a latitude between -90 and 90.";
399 QMessageBox::warning((QWidget *)parent(), "Warning", mess);
400 p_lat = DBL_MAX;
401 p_lon = DBL_MAX;
402 }
403 }
404 else if (p_tabWidget->tabText( p_tabWidget->currentIndex() ) == "Image") {
405 p_line = p_imageTab->p_lineLineEdit->text().toDouble();
406 p_samp = p_imageTab->p_sampLineEdit->text().toDouble();
407 }
408
410 refresh();
411 updateTool();
412 }
413
414
431 double line = p_line;
432 double samp = p_samp;
433
434 if (p_lat != DBL_MAX && p_lon != DBL_MAX) {
436 UniversalGroundMap *groundMap = cvp->universalGroundMap();
437
438 if (groundMap) {
439 if ( groundMap->SetUniversalGround(p_lat, p_lon) ) {
440 line = groundMap->Line();
441 samp = groundMap->Sample();
442 }
443 }
444 }
445
446 if (line != DBL_MAX && samp != DBL_MAX) {
447 int x, y;
449 cvp->cubeToViewport(samp, line, x, y);
450 QPoint p(x, y);
451 emit recordPoint(p);
452 }
453 }
454
455
463 void FindTool::mouseButtonRelease(QPoint p, Qt::MouseButton s) {
464 MdiCubeViewport *activeViewport = cubeViewport();
465 UniversalGroundMap *groundMap = activeViewport->universalGroundMap();
466
467 double samp, line;
468 activeViewport->viewportToCube(p.x(), p.y(), samp, line);
469
470 p_samp = DBL_MAX;
471 p_line = DBL_MAX;
472 p_lat = DBL_MAX;
473 p_lon = DBL_MAX;
474
475 if (groundMap) {
476 if ( groundMap->SetImage(samp, line) ) {
477 if (activeViewport->camera() != NULL) {
478 if (activeViewport->camera()->target()->isSky()) {
479 p_lat = activeViewport->camera()->Declination();
480 p_lon = activeViewport->camera()->RightAscension();
481 }
482 else {
483 p_lat = groundMap->UniversalLatitude();
484 p_lon = groundMap->UniversalLongitude();
485 }
486 }
487 else {
488 p_lat = groundMap->UniversalLatitude();
489 p_lon = groundMap->UniversalLongitude();
490 }
491 }
492 }
493 else {
494 p_samp = samp;
495 p_line = line;
496 }
497
499 refresh();
500 updateTool();
501 }
502
503
516 void FindTool::paintViewport(MdiCubeViewport *vp, QPainter *painter) {
517 if ( (vp == cubeViewport() || ( cubeViewport()->isLinked() && vp->isLinked() ) )
518 && p_pointVisible) {
519 double samp = p_samp;
520 double line = p_line;
521
522 UniversalGroundMap *groundMap = vp->universalGroundMap();
523
524 if (p_lat != DBL_MAX && p_lon != DBL_MAX && groundMap) {
525 if ( groundMap->SetUniversalGround(p_lat, p_lon) ) {
526 samp = groundMap->Sample();
527 line = groundMap->Line();
528 }
529 }
530
531 if (samp != DBL_MAX && line != DBL_MAX) {
532 // first find the point
533 int x, y;
534 vp->cubeToViewport(samp, line, x, y);
535
536 // now that we have the point draw it!
537 QPen pen(Qt::red);
538 pen.setWidth(3);
539 pen.setStyle(Qt::SolidLine);
540 painter->setPen(pen);
541 painter->drawRoundedRect(x - 2, y - 2, 4, 4, 1, 1, Qt::RelativeSize);
542 }
543 }
544 }
545
546
549 // toggle the member boolean that specifies visibility
550 p_pointVisible = !p_pointVisible;
551
552 // update the buttons text
553 if (p_pointVisible) {
554 p_togglePointVisibleButton->setChecked(true);
555 p_togglePointVisibleButton->setToolTip("Hide red dot");
556 }
557 else {
558 p_togglePointVisibleButton->setChecked(false);
559 p_togglePointVisibleButton->setToolTip("Show red dot");
560 }
561
562 refresh();
563 }
564
565
568 for (int i = 0; i < cubeViewportList()->size(); i++) {
569 MdiCubeViewport *viewport = ( *( cubeViewportList() ) )[i];
570 UniversalGroundMap *groundMap = viewport->universalGroundMap();
571
572 if (groundMap) {
573 groundMap->setPriority(index);
574 }
575 }
576 }
577
578
582 for (int i = 0; i < (int)cubeViewportList()->size(); i++) {
583 d = ( *( cubeViewportList() ) )[i];
584 if (d->universalGroundMap() != NULL) {
585 d->setLinked(true);
586 }
587 else {
588 d->setLinked(false);
589 }
590 }
591 }
592
593
596 MdiCubeViewport *activeViewport = cubeViewport();
597 bool syncScale = p_syncScale->isChecked();
598 // This will be the ground map resolution of the active viewport in meters
599 // per pixel.
600 Distance viewportResolutionToMatch;
601 UniversalGroundMap *groundMap = activeViewport->universalGroundMap();
602
603 // Equation to match viewports:
604 // otherViewportZoomFactor = activeViewportZoomFactor *
605 // (otherViewportResolution / activeViewportResolution)
606 if (syncScale) {
607 viewportResolutionToMatch = distancePerPixel(activeViewport, p_lat, p_lon);
608 }
609
610 for (int i = 0; i < cubeViewportList()->size(); i++) {
611 MdiCubeViewport *viewport = ( *( cubeViewportList() ) )[i];
612
613 if ( viewport == activeViewport ||
614 ( activeViewport->isLinked() && viewport->isLinked() ) ) {
615 groundMap = viewport->universalGroundMap();
616 double otherViewportZoomFactor = viewport->scale();
617
618 if ( groundMap && !IsSpecial(p_lat) && p_lat != DBL_MAX &&
619 !IsSpecial(p_lon) && p_lon != DBL_MAX &&
620 groundMap->SetUniversalGround(p_lat, p_lon) ) {
621 double samp = groundMap->Sample();
622 double line = groundMap->Line();
623
624 if ( viewportResolutionToMatch.isValid() ) {
625 Distance otherViewportResolution = distancePerPixel(viewport,
626 p_lat, p_lon);
627 otherViewportZoomFactor = activeViewport->scale() *
628 (otherViewportResolution / viewportResolutionToMatch);
629 }
630
631 if (p_lat != DBL_MAX && p_lon != DBL_MAX && groundMap) {
632 viewport->setScale(otherViewportZoomFactor, samp, line);
633 }
634 }
635
636 if (p_line != DBL_MAX && p_samp != DBL_MAX) {
637 viewport->setScale(otherViewportZoomFactor, p_samp, p_line);
638 }
639 }
640 }
641 }
642
643
661 double lat, double lon) {
662 // UniversalGroundMaps default to camera priority, so create a new one so that we can use projection if it exists.
663 UniversalGroundMap *groundMap = viewport->universalGroundMap();
664 Distance viewportResolution;
665 if (groundMap) {
666 if (groundMap->Camera() != NULL) {
667 if (groundMap->Camera()->target()->isSky()) {
669 }
670 }
671 }
672
673 try {
674 if ( groundMap && !IsSpecial(lat) && !IsSpecial(lon) &&
675 lat != DBL_MAX && lon != DBL_MAX &&
676 groundMap->SetUniversalGround(lat, lon) ) {
677 // Distance/pixel
678 viewportResolution = Distance(groundMap->Resolution(), Distance::Meters);
679 double samp = groundMap->Sample();
680 double line = groundMap->Line();
681
682 if ( groundMap->SetImage(samp - 0.5, line - 0.5) ) {
683 double lat1 = groundMap->UniversalLatitude();
684 double lon1 = groundMap->UniversalLongitude();
685 double radius1 = groundMap->LocalRadius();
686
687 if ( groundMap->SetImage(samp + 0.5, line + 0.5) ) {
688 double lat2 = groundMap->UniversalLatitude();
689 double lon2 = groundMap->UniversalLongitude();
690 double radius2 = groundMap->LocalRadius();
691
692 SurfacePoint point1( Latitude(lat1, Angle::Degrees),
694 Distance(radius1, Distance::Meters) );
695
696 SurfacePoint point2( Latitude(lat2, Angle::Degrees),
698 Distance(radius2, Distance::Meters) );
699
700 viewportResolution = point1.GetDistanceToPoint(point2);
701 }
702 }
703 }
704 }
705 catch (IException &e) {
706 p_samp = DBL_MAX;
707 p_line = DBL_MAX;
708 p_lat = DBL_MAX;
709 p_lon = DBL_MAX;
710 QMessageBox::warning((QWidget *)parent(), "Warning", e.toString());
711 }
712
713 return viewportResolution;
714 }
715
716
719 MdiCubeViewport *activeVp = cubeViewport();
720 for (int i = 0; i < cubeViewportList()->size(); i++) {
721 MdiCubeViewport *vp = ( *( cubeViewportList() ) )[i];
722
723 if ( vp == activeVp || (activeVp->isLinked() && vp->isLinked() ) )
724 vp->viewport()->repaint();
725 }
726 }
727}
@ Degrees
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Definition Angle.h:56
double RaDecResolution()
Returns the RaDec resolution.
Definition Camera.cpp:1883
double scale() const
void viewportToCube(int x, int y, double &sample, double &line) const
Turns a viewport into a cube.
void cubeToViewport(double sample, double line, int &x, int &y) const
Turns a cube into a viewport.
void setScale(double scale)
Change the scale of the cube to the given parameter value.
Camera * camera() const
UniversalGroundMap * universalGroundMap() const
Projection * projection() const
Distance measurement, usually in meters.
Definition Distance.h:34
bool isValid() const
Test if this distance has been initialized or not.
Definition Distance.cpp:192
@ Meters
The distance is being specified in meters.
Definition Distance.h:43
void recordPoint(QPoint p)
Emitted when point should be recorded.
void paintViewport(MdiCubeViewport *vp, QPainter *painter)
This method paints the viewport.
Definition FindTool.cpp:516
void handleOkClicked()
Actions to take when the dialog's ok button is clicked.
Definition FindTool.cpp:387
void handleRecordClicked()
Slot called when the record button is clicked.
Definition FindTool.cpp:430
void addTo(QMenu *menu)
Adds the find tool to the menu.
Definition FindTool.cpp:199
Distance distancePerPixel(MdiCubeViewport *viewport, double lat, double lon)
This computes the distance covered by a pixel at the given lat/lon in the given viewport.
Definition FindTool.cpp:660
void refresh()
does a repaint for active viewport and also for any linked viewports
Definition FindTool.cpp:718
void updateTool()
Overriden method to update this tool - Checks if cube is open and checks if the image has camera and/...
Definition FindTool.cpp:303
void createDialog(QWidget *parent)
Creates the dialog used by this tool.
Definition FindTool.cpp:90
void togglePointVisible()
toggles visibility of the red circle
Definition FindTool.cpp:548
void centerLinkedViewports()
centers all linked viewports
Definition FindTool.cpp:595
void setProjectionEngine(int index)
toggles visibility of the red circle
Definition FindTool.cpp:567
void handleLinkClicked()
Links all cubes that have camera models or are map projections.
Definition FindTool.cpp:580
void mouseButtonRelease(QPoint p, Qt::MouseButton s)
Handles mouse clickes in the CubeViewport.
Definition FindTool.cpp:463
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the tool bar for the find tool.
Definition FindTool.cpp:211
FindTool(QWidget *parent)
Constructs a FindTool object.
Definition FindTool.cpp:39
QAction * toolPadAction(ToolPad *toolpad)
Adds the find tool to the toolpad.
Definition FindTool.cpp:181
QLineEdit * p_lonLineEdit
Input for longitude.
Definition FindTool.h:38
GroundTab(QWidget *parent=0)
The ground tab used by the dialog in the FindTool.
Definition FindTool.cpp:131
QLineEdit * p_latLineEdit
Input for latitude.
Definition FindTool.h:39
QLineEdit * p_sampLineEdit
Input for sample.
Definition FindTool.h:53
QLineEdit * p_lineLineEdit
Input for line.
Definition FindTool.h:54
ImageTab(QWidget *parent=0)
The image tab used by the dialog in the FindTool.
Definition FindTool.cpp:156
This class is designed to encapsulate the concept of a Latitude.
Definition Latitude.h:51
This class is designed to encapsulate the concept of a Longitude.
Definition Longitude.h:40
Cube display widget for certain Isis MDI applications.
void setLinked(bool b)
Change the linked state of the viewport.
bool isLinked() const
Is the viewport linked with other viewports.
virtual double RightAscension()
Returns the right ascension angle (sky longitude).
Definition Sensor.cpp:563
virtual double Declination()
Returns the declination angle (sky latitude).
Definition Sensor.cpp:576
virtual Target * target() const
Returns a pointer to the target object.
Definition Spice.cpp:1590
This class defines a body-fixed surface point.
Distance GetDistanceToPoint(const SurfacePoint &other) const
Computes and returns the distance between two surface points.
bool isSky() const
Return if our target is the sky.
Definition Target.cpp:215
Tool(QWidget *parent)
Tool constructor.
Definition Tool.cpp:27
CubeViewportList * cubeViewportList() const
Return the list of cubeviewports.
Definition Tool.cpp:390
MdiCubeViewport * cubeViewport() const
Return the current cubeviewport.
Definition Tool.h:195
QString toolIconDir() const
returns the path to the icon directory.
Definition Tool.h:111
Universal Ground Map.
double Sample() const
Returns the current line value of the camera model or projection.
double UniversalLongitude() const
Returns the universal longitude of the camera model or projection.
bool SetImage(double sample, double line)
Returns whether the sample/line postion was set successfully in the camera model or projection.
double Resolution() const
Returns the resolution of the camera model or projection.
double UniversalLatitude() const
Returns the universal latitude of the camera model or projection.
double Line() const
Returns the current line value of the camera model or projection.
double LocalRadius() const
Returns the radius of the camera model or projection.
bool SetUniversalGround(double lat, double lon)
Returns whether the lat/lon position was set successfully in the camera model or projection.
Isis::Camera * Camera() const
Return the camera associated with the ground map (NULL implies none)
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16