Isis 3.0 Programmer Reference
Back | Home
MosaicControlNetTool.cpp
1 #include "MosaicControlNetTool.h"
2 
3 #include <iostream>
4 
5 #include <QGraphicsScene>
6 #include <QHBoxLayout>
7 #include <QInputDialog>
8 #include <QLabel>
9 #include <QMenu>
10 #include <QPointF>
11 #include <QMessageBox>
12 #include <QPushButton>
13 
14 #include "ChipViewportsWidget.h"
15 #include "Control.h"
16 #include "ControlList.h"
17 #include "ControlNet.h"
18 #include "ControlNetGraphicsItem.h"
19 #include "ControlPoint.h"
20 #include "ControlPointEditView.h"
21 #include "ControlPointEditWidget.h"
22 #include "Directory.h"
23 #include "FileDialog.h"
24 #include "FileName.h"
25 #include "IException.h"
26 #include "Image.h"
27 #include "ImageDisplayProperties.h"
28 #include "IString.h"
29 #include "Latitude.h"
30 #include "Longitude.h"
31 #include "MosaicControlNetToolMovementConfigDialog.h"
32 #include "MosaicSceneItem.h"
33 #include "MosaicSceneWidget.h"
34 #include "MosaicGraphicsView.h"
35 #include "Project.h"
36 #include "Projection.h"
37 #include "PvlObject.h"
38 #include "SpecialPixel.h"
39 #include "TProjection.h"
40 
41 namespace Isis {
42 
49  MosaicTool(scene) {
50  m_controlNet = NULL;
51  m_controlNetGraphics = NULL;
52  m_loadControlNetButton = NULL;
53  m_displayControlNetButton = NULL;
54  m_displayConnectivity = NULL;
55  m_closeNetwork = NULL;
56  m_controlNetFileLabel = NULL;
57 // m_pointEditor = NULL;
58  m_randomizeColors = NULL;
59 
61  m_measureCount = 10;
62  m_residualMagnitude = 5.0;
63 
64  // Create the action buttons
65 
66  m_displayControlNetButton = new QPushButton("Display");
67  m_displayControlNetButton->setCheckable(true);
68  m_displayControlNetButton->setEnabled(false);
69  m_displayControlNetButton->setToolTip("Toggle the visibility of the "
70  "control points and movement arrows in the network.");
71  connect(m_displayControlNetButton, SIGNAL(clicked()), this, SLOT(displayControlNet()));
72  connect(m_displayControlNetButton, SIGNAL(destroyed(QObject *)),
73  this, SLOT(objectDestroyed(QObject *)));
74 
75  m_displayConnectivity = new QPushButton("Color Islands");
76  m_displayConnectivity->setToolTip("Color cubes the same if the control "
77  "network has a connection between them");
78  connect(m_displayConnectivity, SIGNAL(clicked()), this, SLOT(displayConnectivity()));
79  connect(m_displayConnectivity, SIGNAL(destroyed(QObject *)),
80  this, SLOT(objectDestroyed(QObject *)));
81  m_displayConnectivity->setEnabled(false);
82 
83  m_randomizeColors = new QPushButton("Color Images");
84  m_randomizeColors->setToolTip("Color all cubes differently");
85  connect(m_randomizeColors, SIGNAL(clicked()), this, SLOT(randomizeColors()));
86  connect(m_randomizeColors, SIGNAL(destroyed(QObject *)),
87  this, SLOT(objectDestroyed(QObject *)));
88 
89  m_configMovement = new QPushButton(tr("Configure Movement Display"));
90  m_configMovement->setToolTip(tr("Show arrow from the apriori surface point to "
91  "the adjusted surface point for each control point with this "
92  "information"));
93  connect(m_configMovement, SIGNAL(clicked()), this, SLOT(configMovement()));
94  connect(m_configMovement, SIGNAL(destroyed(QObject *)),
95  this, SLOT(objectDestroyed(QObject *)));
96 
97  m_closeNetwork = new QPushButton("Close Network");
98  m_closeNetwork->setEnabled(false);
99  m_closeNetwork->setVisible(false);
100  m_closeNetwork->setToolTip("Close the currently open control network");
101  connect(m_closeNetwork, SIGNAL(clicked()), this, SLOT(closeNetwork()));
102  connect(m_closeNetwork, SIGNAL(destroyed(QObject *)),
103  this, SLOT(objectDestroyed(QObject *)));
104 
105  m_loadControlNetButton = new QPushButton("Open Network");
106  m_loadControlNetButton->setToolTip("Open and load a control network");
107  connect(m_loadControlNetButton, SIGNAL(clicked()),
108  this, SLOT(openControlNet()));
109  connect(m_loadControlNetButton, SIGNAL(destroyed(QObject *)),
110  this, SLOT(objectDestroyed(QObject *)));
111 
112  m_controlNetFileLabel = new QLabel;
113  m_controlNetFileLabel->setToolTip("The filename of the currently open "
114  "control network");
115  connect(m_controlNetFileLabel, SIGNAL(destroyed(QObject *)),
116  this, SLOT(objectDestroyed(QObject *)));
117 
118  connect(this, SIGNAL(controlPointSelected(ControlPoint *)),
119  getWidget(), SIGNAL(controlPointSelected(ControlPoint *)));
120  }
121 
122 
123  MosaicControlNetTool::~MosaicControlNetTool() {
124  m_controlNetGraphics = NULL; // the scene cleans/cleaned this up
125 
126  delete m_loadControlNetButton;
127  delete m_displayControlNetButton;
128  delete m_displayConnectivity;
129  delete m_configMovement;
130  delete m_closeNetwork;
131  delete m_controlNetFileLabel;
132  delete m_randomizeColors;
133 
134  closeNetwork();
135  }
136 
137 
138  Image *MosaicControlNetTool::takeImage(
139  QString sn, ImageList &images) {
140  if (m_controlNet && m_controlNetGraphics) {
141  QString filename = m_controlNetGraphics->snToFileName(sn);
142 
143  for(int i = 0; i < images.size(); i++) {
144  Image *image = images[i];
145 
146  if (image->fileName() == filename) {
147  return images.takeAt(i);
148  }
149  }
150  }
151 
152  return NULL;
153  }
154 
155 
156  PvlObject MosaicControlNetTool::toPvl() const {
157  PvlObject obj(projectPvlObjectName());
158 
159  obj += PvlKeyword("FileName", m_controlNetFile);
160  obj += PvlKeyword("Visible",
161  Isis::toString((int)(m_controlNetGraphics && m_controlNetGraphics->isVisible())));
162  obj += PvlKeyword("Movement", toString(m_movementArrowColorSource));
163 
164  if (maxMovementColorMeasureCount() != -1) {
165  obj += PvlKeyword("MovementColorMaxMeasureCount", Isis::toString(m_measureCount));
166  }
167 
169  obj += PvlKeyword("MovementColorMaxResidualMagnitude",
171  }
172 
173  return obj;
174  }
175 
176 
177  void MosaicControlNetTool::fromPvl(const PvlObject &obj) {
178  m_controlNetFile = obj["FileName"][0];
179  if (m_controlNetFile == "Null")
180  m_controlNetFile = "";
181 
182  if (obj.hasKeyword("Movement")) {
184  }
185 
186  if (obj.hasKeyword("MovementColorMaxMeasureCount")) {
187  m_measureCount = toInt(obj["MovementColorMaxMeasureCount"][0]);
188  }
189 
190  if (obj.hasKeyword("MovementColorMaxResidualMagnitude")) {
191  m_residualMagnitude = toDouble(obj["MovementColorMaxResidualMagnitude"][0]);
192  }
193 
194  loadNetwork();
195 
196  if (m_controlNetGraphics && m_displayControlNetButton) {
197  m_displayControlNetButton->setChecked( toBool(obj["Visible"][0]) );
199  }
200  }
201 
202 
203  QString MosaicControlNetTool::projectPvlObjectName() const {
204  return "MosaicControlNetTool";
205  }
206 
207 
221  int maxMeasureCount, double maxResidualMagnitude) {
222  m_movementArrowColorSource = colorSource;
223  m_measureCount = maxMeasureCount;
224  m_residualMagnitude = maxResidualMagnitude;
225 
226  if (m_controlNetGraphics) {
227  m_controlNetGraphics->setArrowsVisible(m_movementArrowColorSource != NoMovement,
230  }
231  }
232 
233 
239  }
240 
241 
246  int result = -1;
247 
248  if (m_measureCount > 0)
249  result = m_measureCount;
250 
251  return result;
252  }
253 
254 
260  double result = Null;
261 
263  result = m_residualMagnitude;
264 
265  return result;
266  }
267 
268 
273  QString result;
274 
275  switch (source) {
276  case NoMovement:
277  result = "No movement arrows";
278  break;
279 
280  case NoColor:
281  result = "Black movement arrows";
282  break;
283 
284  case MeasureCount:
285  result = "Movement arrows colored by measure count";
286  break;
287 
288  case ResidualMagnitude:
289  result = "Movement arrows colored by residual magnitude";
290  break;
291  }
292 
293  return result;
294  }
295 
296 
301  QString string) {
303 
304  for (int i = 0; i < NUM_MOVEMENT_COLOR_SOURCE_VALUES; i++) {
305  if (string.toLower() == toString((MovementColorSource)i).toLower()) {
306  result = (MovementColorSource)i;
307  }
308  }
309 
310  return result;
311  }
312 
313 
322  QAction *action = new QAction(this);
323  action->setIcon(getIcon("HILLBLU_molecola.png"));
324  action->setToolTip("Control Net (c)");
325  action->setShortcut(Qt::Key_C);
326  QString text =
327  "<b>Function:</b> Display and analyze a control network<br><br>"
328  "This tool shows you all of the control points in your network for "
329  "which a latitude/longitude can be calculated. The control points are "
330  "shown as color-coded '+' marks. The control points have a right-click "
331  "menu and information about them can be seen just by hovering over them."
332  "<p><b>Shortcut:</b> c</p> ";
333  action->setWhatsThis(text);
334  return action;
335  }
336 
337 
339  // Put the buttons in a horizontal orientation
340  QHBoxLayout *actionLayout = new QHBoxLayout();
341 
342  if (m_displayControlNetButton)
343  actionLayout->addWidget(m_displayControlNetButton);
344 
345  if (m_displayConnectivity)
346  actionLayout->addWidget(m_displayConnectivity);
347 
348  if (m_randomizeColors)
349  actionLayout->addWidget(m_randomizeColors);
350 
351  if (m_configMovement)
352  actionLayout->addWidget(m_configMovement);
353 
354  if (m_closeNetwork)
355  actionLayout->addWidget(m_closeNetwork);
356 
357  if (m_loadControlNetButton)
358  actionLayout->addWidget(m_loadControlNetButton);
359 
360  if (m_controlNetFileLabel)
361  actionLayout->addWidget(m_controlNetFileLabel);
362 
363  actionLayout->setMargin(0);
364 
365  QWidget *toolBarWidget = new QWidget;
366  toolBarWidget->setLayout(actionLayout);
367 
368  return toolBarWidget;
369  }
370 
371 
377  new MosaicControlNetToolMovementConfigDialog(this, qobject_cast<QWidget *>(parent()));
378  configDialog->setAttribute(Qt::WA_DeleteOnClose);
379  configDialog->show();
380  }
381 
382 
387  if (isActive()) {
388  getWidget()->setCubesSelectable(true);
389  getWidget()->getView()->setContextMenuPolicy(Qt::NoContextMenu);
390  getWidget()->enableRubberBand(false);
391  }
392  else {
393  getWidget()->setCubesSelectable(true);
394  getWidget()->getView()->setContextMenuPolicy(Qt::DefaultContextMenu);
395  getWidget()->enableRubberBand(false);
396  }
397  if (isActive() && m_controlNetFile == "") {
398  openControlNet();
399  }
400  }
401 
402 
408  if (m_controlNetGraphics && m_displayControlNetButton)
409  m_controlNetGraphics->setVisible( m_displayControlNetButton->isChecked() );
410  }
411 
412 
418  if (m_controlNet) {
419  ImageList images = getWidget()->images();
420 
421  QList<QColor> colorsUsed;
422 
423  QList< QList<QString> > serialConns =
424  m_controlNet->GetSerialConnections();
425 
426  QList<QString> island;
427  foreach(island, serialConns) {
428  QColor color;
429 
430  QString cubeSn;
431  foreach(cubeSn, island) {
432  Image *image = takeImage(cubeSn, images);
433 
434  if (image) {
435  while(!color.isValid()) {
436  QColor displayColor = image->displayProperties()->getValue(
437  ImageDisplayProperties::Color).value<QColor>();
438 
439  if (colorsUsed.indexOf(displayColor) == -1) {
440  colorsUsed.append(displayColor);
441  color = displayColor;
442  }
443  else {
444  QColor ranColor = ImageDisplayProperties::randomColor();
445 
446  if (colorsUsed.indexOf(ranColor) == -1) {
447  colorsUsed.append(ranColor);
448  color = ranColor;
449  }
450  }
451  }
452 
453  image->displayProperties()->setColor(color);
454  }
455  }
456  }
457  }
458  }
459 
460 
461  void MosaicControlNetTool::displayChangedControlPoint(QString changedControlPoint) {
462  m_controlNetGraphics->clearControlPointGraphicsItem(changedControlPoint);
463  m_controlNetGraphics->buildChildren();
464  }
465 
466 
467  void MosaicControlNetTool::displayNewControlPoint(QString newControlPoint) {
468  m_controlNetGraphics->buildChildren();
469  }
470 
471 
472 /*
473  * remove deleted point from display
474  * removeControlPointFromDisplay
475  */
476  void MosaicControlNetTool::displayUponControlPointDeletion() {
477  m_controlNetGraphics->clearControlPointGraphicsItem( QString("Point ID") );
478  m_controlNetGraphics->buildChildren();
479  }
480 
481 
487  if (m_controlNetGraphics) {
488  getWidget()->getScene()->removeItem(m_controlNetGraphics);
489  delete m_controlNetGraphics;
490  }
491 
492  if (m_controlNet && !getWidget()->directory()) {
493  delete m_controlNet;
494  m_controlNet = NULL;
495  }
496 
497  if (m_displayControlNetButton)
498  m_displayControlNetButton->setChecked(false);
499 
500  if (m_displayControlNetButton)
501  m_displayControlNetButton->setEnabled(false);
502 
503  if (m_displayConnectivity)
504  m_displayConnectivity->setEnabled(false);
505 
506  if (m_closeNetwork) {
507  m_closeNetwork->setEnabled(false);
508  m_closeNetwork->setVisible(false);
509  }
510 
511  if (m_loadControlNetButton) {
512  m_loadControlNetButton->setEnabled(true);
513  m_loadControlNetButton->setVisible(true);
514  }
515 
516  if (m_controlNetFileLabel)
517  m_controlNetFileLabel->setText("");
518 
519  m_controlNetFile = "";
520  }
521 
522 
527  if (obj == m_loadControlNetButton)
528  m_loadControlNetButton = NULL;
529  else if (obj == m_displayControlNetButton)
530  m_displayControlNetButton = NULL;
531  else if (obj == m_displayConnectivity)
532  m_displayConnectivity = NULL;
533  else if (obj == m_closeNetwork)
534  m_closeNetwork = NULL;
535  else if (obj == m_controlNetGraphics)
536  m_controlNetGraphics = NULL;
537  else if (obj == m_configMovement)
538  m_configMovement = NULL;
539  else if (obj == m_controlNetFileLabel)
540  m_controlNetFileLabel = NULL;
541  else if (obj == m_randomizeColors)
542  m_randomizeColors = NULL;
543  }
544 
545 
551  if (!getWidget()->directory()) {
552  // Bring up a file dialog for user to select their cnet file.
553  QString netFile = FileDialog::getOpenFileName(getWidget(),
554  "Select Control Net. File",
555  QDir::current().dirName() + "/",
556  "Control Networks (*.net);;All Files (*.*)");
557 
558  //--------------------------------------------------------------
559  // if the file is not empty attempt to load in the control points
560  // for each mosaic item
561  //---------------------------------------------------------------
562  if (!netFile.isEmpty()) {
563  FileName controlNetFile(netFile);
564  m_controlNetFile = controlNetFile.expanded();
565  }
566  }
567  else {
568  Control *activeControl = getWidget()->directory()->project()->activeControl();
569  if (activeControl == NULL) {
570  // Error and return to Select Tool
571  QString message = "No active control network chosen. Choose active control network on "
572  "project tree.\n";
573  QMessageBox::critical(getWidget(), "Error", message);
574  return;
575  }
576  m_controlNet = activeControl->controlNet();
577  m_controlNetFile = activeControl->fileName();
578  }
579 
580  if (!m_controlNetFile.isEmpty()) {
581  loadNetwork();
582  if (m_displayControlNetButton) m_displayControlNetButton->setChecked(true);
583  }
584  }
585 
586 
592  QString netFile = m_controlNetFile;
593  closeNetwork();
594  m_controlNetFile = netFile;
595  m_controlNetFileLabel->setText( QFileInfo(netFile).fileName() );
596 
597  if (m_controlNetFile.size() > 0) {
598  try {
599  if (!getWidget()->directory()) {
600  m_controlNet = new ControlNet(m_controlNetFile);
601  }
602  m_controlNetGraphics = new ControlNetGraphicsItem(m_controlNet,
603  getWidget());
604 
607 
608  connect(m_controlNetGraphics, SIGNAL(destroyed(QObject *)),
609  this, SLOT(objectDestroyed(QObject *)));
610 
611  // TODO: TLS 2014-06-04
612  // Use Directory to add control point editor for now. Should this be done from Directory
613  // similarly to addFootprint2DView, addImageFileListView, etc. It was done here because
614  // the infrastructure for opening, displaying control nets was already in place.
615  // However for cnetsuite, if we want to follow the Directory/WorkOrder design paradigm this
616  // is probably not the best place to implement this.
617  // Also, once we figure out how to determine the active control network, this will change.
618 // if (getWidget()->directory()) {
619 // getWidget()->directory()->addControlPointEditor(m_controlNet, netFile);
620 // }
621  }
622  catch(IException &e) {
623  QString message = "Invalid control network.\n";
624  message += e.toString();
625  QMessageBox::information(getWidget(), "Error", message);
626  return;
627  }
628 
629  if (m_displayControlNetButton)
630  m_displayControlNetButton->setEnabled(true);
631 
632  if (m_displayConnectivity)
633  m_displayConnectivity->setEnabled(true);
634 
635  if (m_closeNetwork) {
636  m_closeNetwork->setEnabled(true);
637  m_closeNetwork->setVisible(true);
638  }
639 
640  if (m_loadControlNetButton) {
641  m_loadControlNetButton->setEnabled(false);
642  m_loadControlNetButton->setVisible(false);
643  }
644  }
645  }
646 
647 
648  void MosaicControlNetTool::randomizeColors() {
649  foreach (Image *image, getWidget()->images()) {
651  }
652  }
653 
654 
655  // TODO: why did we remove the error checks?
656  void MosaicControlNetTool::mouseButtonRelease(QPointF point, Qt::MouseButton mouseButton) {
657 
658  if (!isActive() || !m_controlNet) return;
659 
660  // If not IPCE, return, qmos does not use this code
661  if (!getWidget()->directory()) return;
662 
663  ControlPoint *cp = NULL;
664 
665  // Modify closest control point
666  if (mouseButton == Qt::LeftButton) {
667 
668  // Find closes point
669  cp = m_controlNetGraphics->findClosestControlPoint();
670 
671  // TODO move the emit into the if so that we do not need to do early return.
672  // The user did not click close enough to a point for findClosestControlPoint to find a point.
673  if (!cp) {
674  return;
675  }
676  emit modifyControlPoint(cp);
677 // getWidget()->directory()->controlPointEditView()->controlPointEditWidget()->setEditPoint(cp);
678 // getWidget()->directory()->controlPointChipViewports()->setPoint(cp);
679 
680  }
681  else if (mouseButton == Qt::MidButton) {
682 
683 
684  cp = m_controlNetGraphics->findClosestControlPoint();
685  if (!cp) {
686  // TODO Figure out how to get this error message in the right place
687  QString message = "No points exist for deleting. Create points "
688  "using the right mouse button.";
689  QMessageBox::warning(getWidget(), "Warning", message);
690  return;
691  }
692 
693  emit deleteControlPoint(cp);
694  // deletePoint(point); // what should happen here?
695  }
696 
697  // Create control point at cursor location
698  else if (mouseButton == Qt::RightButton) {
699  // TODO For now simply take the first image in the list
700  // Find all Images under mouse position ... already doing this with the foreach loop?
701  // TODO should this imagesUnderMousePosition be implemented in MosaicSceneWidget?
702  // Similar code is found in MosaicSceneWidget::contextMenuEvent.
703  ImageList imagesAtMousePosition;
704  QList<QGraphicsItem *> itemsAtMousePosition = getWidget()->getScene()->items(point);
705  foreach (QGraphicsItem *graphicsItem, itemsAtMousePosition) {
706  MosaicSceneItem *sceneImageItem = dynamic_cast<MosaicSceneItem *>(graphicsItem);
707 
708  if (!sceneImageItem) {
709  sceneImageItem = dynamic_cast<MosaicSceneItem *>(graphicsItem->parentItem());
710  }
711 
712  if (sceneImageItem && sceneImageItem->image()) {
713  imagesAtMousePosition.append(sceneImageItem->image());
714  }
715  }
716 
717  if (imagesAtMousePosition.count()) {
718 // Image *image = imagesAtMousePosition.at(0);
719  Projection *proj = getWidget()->getProjection();
720  Projection::ProjectionType ptype = proj->projectionType();
721 
722  if (ptype == Projection::Triaxial) {
723  TProjection *tproj = (TProjection *) proj;
724  if (tproj && getWidget()->getView()->sceneRect().contains(point)) {
725  if ( tproj->SetCoordinate( point.x(), -1 * point.y() ) ) {
726  // Create Latitude and Longitude objects so there is a signature different from
727  // createPoint(serialnumber, double, double).
728  Latitude lat(tproj->Latitude(), Angle::Degrees);
729  Longitude lon(tproj->Longitude(), Angle::Degrees);
730  emit createControlPoint(lat.degrees(), lon.degrees());
731  }
732  }
733  }
734  }
735  }
736  }
737 }
QVariant getValue(int property) const
Get a property&#39;s associated data.
void closeNetwork()
Close the open network, if one is open.
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:57
Configure qmos Control Net Tool&#39;s movement arrows.
void loadNetwork()
Load m_controlNetFile into memory - this will re-load the network if it&#39;s already open...
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:44
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:109
void updateTool()
This slot opens and reopens this tool properly.
File name manipulation and expansion.
Definition: FileName.h:111
void setArrowsVisible(bool visible, bool colorByMeasureCount, int measureCount, bool colorByJigsawError, double residualMagnitude)
Enable/disable and configure movement arrows for all CP displays in the network.
This widget encompasses the entire mosaic scene.
void objectDestroyed(QObject *)
An object was destroyed, NULL it out.
Show movement arrows colored by measure count.
QAction * getPrimaryAction()
Adds the action to the toolpad.
Base class for the MosaicTools.
Definition: MosaicTool.h:37
int toInt(const QString &string)
Global function to convert from a string to an integer.
Definition: IString.cpp:108
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:226
double maxMovementColorResidualMagnitude() const
Get the current max.
double toDouble(const QString &string)
Global function to convert from a string to a double.
Definition: IString.cpp:164
Control * activeControl()
Return the Active Control (control network)
Definition: Project.cpp:1182
double m_residualMagnitude
This is the residual magnitude at which we coloring the movement arrows.
Project * project() const
Gets the Project for this directory.
Definition: Directory.cpp:923
MovementColorSource m_movementArrowColorSource
This defines the drawing mode of the apriori to adjusted arrows.
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Definition: Angle.h:69
a control network
Definition: ControlNet.h:207
Show movement arrows colored by residual magnitude.
bool isActive() const
Returns the activeness of this toool.
Definition: MosaicTool.h:50
static QString toString(MovementColorSource)
Convert a MovementColorSource to a string for serialization purposes.
Control Network Display on Mosaic Scene.
int maxMovementColorMeasureCount() const
Get the current measure count to become fully colored.
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:199
A single control point.
Definition: ControlPoint.h:339
This represents a cube in a project-based GUI interface.
Definition: Image.h:91
void setColor(QColor newColor)
Change the color associated with this cube.
QList< QList< QString > > GetSerialConnections() const
This method searches through all the cube serial numbers in the network.
Definition: ControlNet.cpp:797
MosaicControlNetTool(MosaicSceneWidget *)
MosaicControlNetTool constructor.
ImageDisplayProperties * displayProperties()
Get the display (GUI) properties (information) associated with this image.
Definition: Image.cpp:285
QString fileName() const
Access the name of the control network file associated with this Control.
Definition: Control.cpp:171
QPixmap getIcon(QString iconName) const
returns the path to the icon directory.
Definition: MosaicTool.cpp:115
ControlNet * controlNet()
Open and return a pointer to the ControlNet for this Control.
Definition: Control.cpp:106
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
static const int NUM_MOVEMENT_COLOR_SOURCE_VALUES
This is the count of possible values of MovementColorSource (useful for loops).
bool toBool(const QString &string)
Global function to convert from a string to a boolean.
Definition: IString.cpp:53
int m_measureCount
This is the measure count at which we start coloring the movement arrows.
void setMovementArrowColorSource(MovementColorSource, int, double)
Define how the movement arrows should be drawn.
QString toString() const
Returns a string representation of this exception.
Definition: IException.cpp:553
void displayControlNet()
The user toggled the cnet visibility - re-sync the graphics item visibility with the action...
Isis exception class.
Definition: IException.h:99
Show black movement arrows.
void displayConnectivity()
Displays the connectivity of Control Points.
The color of the cube, default randomized (QColor)
void buildChildren()
Call this to re-calculate where control points ought to lie.
MovementColorSource
This enum defines how to draw the movement arrows (arrows from CP A Priori location to adjusted locat...
void configMovement()
Bring up a movement arrow configuration dialog.
ProjectionType
This enum defines the subclasses of Projection supported in Isis.
Definition: Projection.h:180
$Date$ $Revision$
QWidget * getToolBarWidget()
This method returns a widget that will be put in a tool bar when the tool is activated.
static QColor randomColor()
Creates and returns a random color for the intial color of the footprint polygon. ...
void openControlNet()
Loads a control net from a file.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
These projections are used to map triaxial and irregular-shaped bodies.
Definition: Projection.h:180
MovementColorSource movementArrowColorSource() const
Get the current setting for the movement arrows.
static MovementColorSource fromMovementColorSourceString(QString)
Convert a string back to a MovementColorSource (for serialization purposes).

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 ISIS Support Center
File Modified: 07/12/2023 23:23:55