Isis 3 Programmer Reference
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  // MosaicSceneWidget could be NULL because the MosaicSceneWidget::getControlNetHelp and
98  // MosaicSceneWidget::getGridHelp create tools passing in Null for the Widget.
99  // Why can't the getControlNetHelp and getGridHelp pass in the current MosaicSceneWidget?
100  if (getWidget() && !getWidget()->directory()) {
101  m_closeNetwork = new QPushButton("Close Network");
102  m_closeNetwork->setEnabled(false);
103  m_closeNetwork->setVisible(false);
104  m_closeNetwork->setToolTip("Close the currently open control network");
105  connect(m_closeNetwork, SIGNAL(clicked()), this, SLOT(closeNetwork()));
106  connect(m_closeNetwork, SIGNAL(destroyed(QObject *)),
107  this, SLOT(objectDestroyed(QObject *)));
108 
109  m_loadControlNetButton = new QPushButton("Open Network");
110  m_loadControlNetButton->setToolTip("Open and load a control network");
111  connect(m_loadControlNetButton, SIGNAL(clicked()),
112  this, SLOT(openControlNet()));
113  connect(m_loadControlNetButton, SIGNAL(destroyed(QObject *)),
114  this, SLOT(objectDestroyed(QObject *)));
115 
116  connect(this, SIGNAL(controlPointSelected(ControlPoint *)),
117  getWidget(), SIGNAL(controlPointSelected(ControlPoint *)));
118  }
119 
120  m_controlNetFileLabel = new QLabel;
121  m_controlNetFileLabel->setToolTip("The filename of the currently open "
122  "control network");
123  connect(m_controlNetFileLabel, SIGNAL(destroyed(QObject *)),
124  this, SLOT(objectDestroyed(QObject *)));
125 
126  }
127 
128 
129  MosaicControlNetTool::~MosaicControlNetTool() {
130  m_controlNetGraphics = NULL; // the scene cleans/cleaned this up
131 
132  delete m_loadControlNetButton;
133  delete m_displayControlNetButton;
134  delete m_displayConnectivity;
135  delete m_configMovement;
136  delete m_closeNetwork;
137  delete m_controlNetFileLabel;
138  delete m_randomizeColors;
139 
140  closeNetwork();
141  }
142 
143 
144  Image *MosaicControlNetTool::takeImage(
145  QString sn, ImageList &images) {
146  if (m_controlNet && m_controlNetGraphics) {
147  QString filename = m_controlNetGraphics->snToFileName(sn);
148 
149  for(int i = 0; i < images.size(); i++) {
150  Image *image = images[i];
151 
152  if (image->fileName() == filename) {
153  return images.takeAt(i);
154  }
155  }
156  }
157 
158  return NULL;
159  }
160 
161 
162  PvlObject MosaicControlNetTool::toPvl() const {
163  PvlObject obj(projectPvlObjectName());
164 
165  obj += PvlKeyword("FileName", m_controlNetFile);
166  obj += PvlKeyword("Visible",
167  Isis::toString((int)(m_controlNetGraphics && m_controlNetGraphics->isVisible())));
168  obj += PvlKeyword("Movement", toString(m_movementArrowColorSource));
169 
170  if (maxMovementColorMeasureCount() != -1) {
171  obj += PvlKeyword("MovementColorMaxMeasureCount", Isis::toString(m_measureCount));
172  }
173 
175  obj += PvlKeyword("MovementColorMaxResidualMagnitude",
177  }
178 
179  return obj;
180  }
181 
182 
183  void MosaicControlNetTool::fromPvl(const PvlObject &obj) {
184  m_controlNetFile = obj["FileName"][0];
185  if (m_controlNetFile == "Null")
186  m_controlNetFile = "";
187 
188  if (obj.hasKeyword("Movement")) {
190  }
191 
192  if (obj.hasKeyword("MovementColorMaxMeasureCount")) {
193  m_measureCount = toInt(obj["MovementColorMaxMeasureCount"][0]);
194  }
195 
196  if (obj.hasKeyword("MovementColorMaxResidualMagnitude")) {
197  m_residualMagnitude = toDouble(obj["MovementColorMaxResidualMagnitude"][0]);
198  }
199 
200  loadNetwork();
201 
202  if (m_controlNetGraphics && m_displayControlNetButton) {
203  m_displayControlNetButton->setChecked( toBool(obj["Visible"][0]) );
205  }
206  }
207 
208 
209  QString MosaicControlNetTool::projectPvlObjectName() const {
210  return "MosaicControlNetTool";
211  }
212 
213 
227  int maxMeasureCount, double maxResidualMagnitude) {
228  m_movementArrowColorSource = colorSource;
229  m_measureCount = maxMeasureCount;
230  m_residualMagnitude = maxResidualMagnitude;
231 
232  if (m_controlNetGraphics) {
233  m_controlNetGraphics->setArrowsVisible(m_movementArrowColorSource != NoMovement,
236  }
237  }
238 
239 
245  }
246 
247 
252  int result = -1;
253 
254  if (m_measureCount > 0)
255  result = m_measureCount;
256 
257  return result;
258  }
259 
260 
266  double result = Null;
267 
269  result = m_residualMagnitude;
270 
271  return result;
272  }
273 
274 
279  QString result;
280 
281  switch (source) {
282  case NoMovement:
283  result = "No movement arrows";
284  break;
285 
286  case NoColor:
287  result = "Black movement arrows";
288  break;
289 
290  case MeasureCount:
291  result = "Movement arrows colored by measure count";
292  break;
293 
294  case ResidualMagnitude:
295  result = "Movement arrows colored by residual magnitude";
296  break;
297  }
298 
299  return result;
300  }
301 
302 
307  QString string) {
309 
310  for (int i = 0; i < NUM_MOVEMENT_COLOR_SOURCE_VALUES; i++) {
311  if (string.toLower() == toString((MovementColorSource)i).toLower()) {
312  result = (MovementColorSource)i;
313  }
314  }
315 
316  return result;
317  }
318 
319 
328  QAction *action = new QAction(this);
329  action->setIcon(getIcon("HILLBLU_molecola.png"));
330  action->setToolTip("Control Net (c)");
331  action->setShortcut(Qt::Key_C);
332  QString text =
333  "<b>Function:</b> Display and analyze a control network<br><br>"
334  "This tool shows you all of the control points in your network for "
335  "which a latitude/longitude can be calculated. The control points are "
336  "shown as color-coded '+' marks. The control points have a right-click "
337  "menu and information about them can be seen just by hovering over them."
338  "<p><b>Shortcut:</b> c</p> ";
339  action->setWhatsThis(text);
340  return action;
341  }
342 
343 
345  // Put the buttons in a horizontal orientation
346  QHBoxLayout *actionLayout = new QHBoxLayout();
347 
348  if (m_displayControlNetButton)
349  actionLayout->addWidget(m_displayControlNetButton);
350 
351  if (m_displayConnectivity)
352  actionLayout->addWidget(m_displayConnectivity);
353 
354  if (m_randomizeColors)
355  actionLayout->addWidget(m_randomizeColors);
356 
357  if (m_configMovement)
358  actionLayout->addWidget(m_configMovement);
359 
360  if (m_closeNetwork)
361  actionLayout->addWidget(m_closeNetwork);
362 
363  if (m_loadControlNetButton)
364  actionLayout->addWidget(m_loadControlNetButton);
365 
366  if (m_controlNetFileLabel)
367  actionLayout->addWidget(m_controlNetFileLabel);
368 
369  actionLayout->setMargin(0);
370 
371  QWidget *toolBarWidget = new QWidget;
372  toolBarWidget->setLayout(actionLayout);
373 
374  return toolBarWidget;
375  }
376 
377 
383  new MosaicControlNetToolMovementConfigDialog(this, qobject_cast<QWidget *>(parent()));
384  configDialog->setAttribute(Qt::WA_DeleteOnClose);
385  configDialog->show();
386  }
387 
388 
393  if (isActive()) {
394  getWidget()->setCubesSelectable(true);
395  getWidget()->getView()->setContextMenuPolicy(Qt::NoContextMenu);
396  getWidget()->enableRubberBand(false);
397  }
398  else {
399  getWidget()->setCubesSelectable(true);
400  getWidget()->getView()->setContextMenuPolicy(Qt::DefaultContextMenu);
401  getWidget()->enableRubberBand(false);
402  }
403  if (isActive() && m_controlNetFile == "") {
404  openControlNet();
405  }
406  }
407 
408 
414  if (m_controlNetGraphics && m_displayControlNetButton)
415  m_controlNetGraphics->setVisible( m_displayControlNetButton->isChecked() );
416  }
417 
418 
424  if (m_controlNet) {
425  ImageList images = getWidget()->images();
426 
427  QList<QColor> colorsUsed;
428 
429  QList< QList<QString> > serialConns =
430  m_controlNet->GetSerialConnections();
431 
432  QList<QString> island;
433  foreach(island, serialConns) {
434  QColor color;
435 
436  QString cubeSn;
437  foreach(cubeSn, island) {
438  Image *image = takeImage(cubeSn, images);
439 
440  if (image) {
441  while(!color.isValid()) {
442  QColor displayColor = image->displayProperties()->getValue(
443  ImageDisplayProperties::Color).value<QColor>();
444 
445  if (colorsUsed.indexOf(displayColor) == -1) {
446  colorsUsed.append(displayColor);
447  color = displayColor;
448  }
449  else {
450  QColor ranColor = ImageDisplayProperties::randomColor();
451 
452  if (colorsUsed.indexOf(ranColor) == -1) {
453  colorsUsed.append(ranColor);
454  color = ranColor;
455  }
456  }
457  }
458 
459  image->displayProperties()->setColor(color);
460  }
461  }
462  }
463  }
464  }
465 
466 
472  if (m_controlNetGraphics) {
473  m_controlNetGraphics->buildChildren();
474  }
475  }
476 
477 
478  void MosaicControlNetTool::displayChangedControlPoint(QString changedControlPoint) {
479  m_controlNetGraphics->clearControlPointGraphicsItem(changedControlPoint);
480  m_controlNetGraphics->buildChildren();
481  }
482 
483 
484  void MosaicControlNetTool::displayNewControlPoint(QString newControlPoint) {
485  m_controlNetGraphics->buildChildren();
486  }
487 
488 
489 /*
490  * remove deleted point from display
491  * removeControlPointFromDisplay
492  */
493  void MosaicControlNetTool::displayUponControlPointDeletion() {
494  m_controlNetGraphics->clearControlPointGraphicsItem( QString("Point ID") );
495  m_controlNetGraphics->buildChildren();
496  }
497 
498 
504  if (m_controlNetGraphics) {
505  getWidget()->getScene()->removeItem(m_controlNetGraphics);
506  delete m_controlNetGraphics;
507  }
508 
509  // If qmos (not ipce) application
510  if (m_controlNet && !getWidget()->directory()) {
511  delete m_controlNet;
512  m_controlNet = NULL;
513  }
514 
515  if (m_displayControlNetButton)
516  m_displayControlNetButton->setChecked(false);
517 
518  if (m_displayControlNetButton)
519  m_displayControlNetButton->setEnabled(false);
520 
521  if (m_displayConnectivity)
522  m_displayConnectivity->setEnabled(false);
523 
524  if (m_closeNetwork) {
525  m_closeNetwork->setEnabled(false);
526  m_closeNetwork->setVisible(false);
527  }
528 
529  if (m_loadControlNetButton) {
530  m_loadControlNetButton->setEnabled(true);
531  m_loadControlNetButton->setVisible(true);
532  }
533 
534  if (m_controlNetFileLabel)
535  m_controlNetFileLabel->setText("");
536 
537  m_controlNetFile = "";
538  }
539 
540 
545  if (obj == m_loadControlNetButton)
546  m_loadControlNetButton = NULL;
547  else if (obj == m_displayControlNetButton)
548  m_displayControlNetButton = NULL;
549  else if (obj == m_displayConnectivity)
550  m_displayConnectivity = NULL;
551  else if (obj == m_closeNetwork)
552  m_closeNetwork = NULL;
553  else if (obj == m_controlNetGraphics)
554  m_controlNetGraphics = NULL;
555  else if (obj == m_configMovement)
556  m_configMovement = NULL;
557  else if (obj == m_controlNetFileLabel)
558  m_controlNetFileLabel = NULL;
559  else if (obj == m_randomizeColors)
560  m_randomizeColors = NULL;
561  }
562 
563 
569 
570  // If qmos (not ipce) application
571  if (!getWidget()->directory()) {
572  // Bring up a file dialog for user to select their cnet file.
573  QString netFile = FileDialog::getOpenFileName(getWidget(),
574  "Select Control Net. File",
575  QDir::current().dirName() + "/",
576  "Control Networks (*.net);;All Files (*.*)");
577 
578  //--------------------------------------------------------------
579  // if the file is not empty attempt to load in the control points
580  // for each mosaic item
581  //---------------------------------------------------------------
582  if (!netFile.isEmpty()) {
583  FileName controlNetFile(netFile);
584  m_controlNetFile = controlNetFile.expanded();
585  }
586  }
587  else {
588  // If ipce application, there must be an active control net and active image list.
589  if (!getWidget()->directory()->project()->activeControl()) {
590  // Error and return to Select Tool
591  QString message = "No active control network chosen. Choose an active image list then an"
592  "active control network on the project tree.\n";
593  QMessageBox::critical(getWidget(), "Error", message);
594  return;
595  }
596  m_controlNetFile = getWidget()->directory()->project()->activeControl()->fileName();
597  }
598 
599  if (!m_controlNetFile.isEmpty()) {
600  loadNetwork();
601  if (m_displayControlNetButton) m_displayControlNetButton->setChecked(true);
602  }
603  }
604 
605 
611  QString netFile = m_controlNetFile;
612  closeNetwork();
613  m_controlNetFile = netFile;
614 
615  if (m_controlNetFile.size() > 0) {
616  try {
617  // If qmos application create new control net from chosen filename
618  if (!getWidget()->directory()) {
619  m_controlNetFileLabel->setText( QFileInfo(netFile).fileName() );
620  m_controlNet = new ControlNet(m_controlNetFile);
621  }
622  // If ipce application, get the active control net from the project. This control has
623  // already been read into memory.
624  else {
625  m_controlNet = getWidget()->directory()->project()->activeControl()->controlNet();
626  m_controlNetFileLabel->setText( QFileInfo(
627  getWidget()->directory()->project()->activeControl()->fileName()).fileName() );
628  }
629  m_controlNetGraphics = new ControlNetGraphicsItem(m_controlNet,
630  getWidget());
631 
634 
635  connect(m_controlNetGraphics, SIGNAL(destroyed(QObject *)),
636  this, SLOT(objectDestroyed(QObject *)));
637 
638  }
639  catch(IException &e) {
640  QString message = "Invalid control network.\n";
641  message += e.toString();
642  QMessageBox::information(getWidget(), "Error", message);
643  return;
644  }
645 
646  if (m_displayControlNetButton)
647  m_displayControlNetButton->setEnabled(true);
648 
649  if (m_displayConnectivity)
650  m_displayConnectivity->setEnabled(true);
651 
652  if (m_closeNetwork) {
653  m_closeNetwork->setEnabled(true);
654  m_closeNetwork->setVisible(true);
655  }
656 
657  if (m_loadControlNetButton) {
658  m_loadControlNetButton->setEnabled(false);
659  m_loadControlNetButton->setVisible(false);
660  }
661  }
662  }
663 
664 
665  void MosaicControlNetTool::randomizeColors() {
666  foreach (Image *image, getWidget()->images()) {
668  }
669  }
670 
671 
672  // TODO: why did we remove the error checks?
673  void MosaicControlNetTool::mouseButtonRelease(QPointF point, Qt::MouseButton mouseButton) {
674  if (!isActive() || !m_controlNet) return;
675 
676  // If not IPCE, return, qmos does not use this code
677  if (!getWidget()->directory()) return;
678 
679  ControlPoint *cp = NULL;
680 
681  // Modify closest control point
682  if (mouseButton == Qt::LeftButton) {
683 
684  // Find closes point
685  cp = m_controlNetGraphics->findClosestControlPoint(point);
686 
687  // TODO move the emit into the if so that we do not need to do early return.
688  // The user did not click close enough to a point for findClosestControlPoint to find a point.
689  if (!cp) {
690  return;
691  }
692  emit modifyControlPoint(cp);
693  }
694  else if (mouseButton == Qt::MidButton) {
695 
696 
697  cp = m_controlNetGraphics->findClosestControlPoint(point);
698  if (!cp) {
699  // TODO Figure out how to get this error message in the right place
700  QString message = "No points exist for deleting. Create points "
701  "using the right mouse button.";
702  QMessageBox::warning(getWidget(), "Warning", message);
703  return;
704  }
705 
706  emit deleteControlPoint(cp);
707  // deletePoint(point); // what should happen here?
708  }
709 
710  // Create control point at cursor location
711  else if (mouseButton == Qt::RightButton) {
712  // TODO For now simply take the first image in the list
713  // Find all Images under mouse position ... already doing this with the foreach loop?
714  // TODO should this imagesUnderMousePosition be implemented in MosaicSceneWidget?
715  // Similar code is found in MosaicSceneWidget::contextMenuEvent.
716  ImageList imagesAtMousePosition;
717  QList<QGraphicsItem *> itemsAtMousePosition = getWidget()->getScene()->items(point);
718  foreach (QGraphicsItem *graphicsItem, itemsAtMousePosition) {
719  MosaicSceneItem *sceneImageItem = dynamic_cast<MosaicSceneItem *>(graphicsItem);
720 
721  if (!sceneImageItem) {
722  sceneImageItem = dynamic_cast<MosaicSceneItem *>(graphicsItem->parentItem());
723  }
724 
725  if (sceneImageItem && sceneImageItem->image()) {
726  imagesAtMousePosition.append(sceneImageItem->image());
727  }
728  }
729 
730  if (imagesAtMousePosition.count()) {
731 // Image *image = imagesAtMousePosition.at(0);
732  Projection *proj = getWidget()->getProjection();
733  Projection::ProjectionType ptype = proj->projectionType();
734 
735  if (ptype == Projection::Triaxial) {
736  TProjection *tproj = (TProjection *) proj;
737  if (tproj && getWidget()->getView()->sceneRect().contains(point)) {
738  if ( tproj->SetCoordinate( point.x(), -1 * point.y() ) ) {
739  // Create Latitude and Longitude objects so there is a signature different from
740  // createPoint(serialnumber, double, double).
741  Latitude lat(tproj->Latitude(), Angle::Degrees);
742  Longitude lon(tproj->Longitude(), Angle::Degrees);
743  emit createControlPoint(lat.degrees(), lon.degrees());
744  }
745  }
746  }
747  }
748  }
749  }
750 }
void closeNetwork()
Close the open network, if one is open.
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:55
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:110
void updateTool()
This slot opens and reopens this tool properly.
File name manipulation and expansion.
Definition: FileName.h:116
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.
MovementColorSource movementArrowColorSource() const
Get the current setting for the movement arrows.
This widget encompasses the entire mosaic scene.
double maxMovementColorResidualMagnitude() const
Get the current max.
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
QVariant getValue(int property) const
Get a property&#39;s associated data.
QList< QList< QString > > GetSerialConnections() const
This method searches through all the cube serial numbers in the network.
Definition: ControlNet.cpp:959
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:226
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:1903
bool isActive() const
Returns the activeness of this toool.
Definition: MosaicTool.h:50
double m_residualMagnitude
This is the residual magnitude at which we coloring the movement arrows.
ControlPoint * findClosestControlPoint(QPointF locationPoint)
Return the closest control point to the pointLocation.
MovementColorSource m_movementArrowColorSource
This defines the drawing mode of the apriori to adjusted arrows.
void rebuildPointGraphics()
Slot used to re-create the graphics items that depict the control points.
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Definition: Angle.h:73
a control network
Definition: ControlNet.h:271
int maxMovementColorMeasureCount() const
Get the current measure count to become fully colored.
Show movement arrows colored by residual magnitude.
static QString toString(MovementColorSource)
Convert a MovementColorSource to a string for serialization purposes.
Control Network Display on Mosaic Scene.
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:212
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:212
A single control point.
Definition: ControlPoint.h:369
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
void setColor(QColor newColor)
Change the color associated with this cube.
MosaicControlNetTool(MosaicSceneWidget *)
MosaicControlNetTool constructor.
ImageDisplayProperties * displayProperties()
Get the display (GUI) properties (information) associated with this image.
Definition: Image.cpp:320
ControlNet * controlNet()
Open and return a pointer to the ControlNet for this Control.
Definition: Control.cpp:142
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).
QString toString() const
Returns a string representation of this exception.
Definition: IException.cpp:553
QPixmap getIcon(QString iconName) const
returns the path to the icon directory.
Definition: MosaicTool.cpp:115
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.
void displayControlNet()
The user toggled the cnet visibility - re-sync the graphics item visibility with the action...
Isis exception class.
Definition: IException.h:107
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Show black movement arrows.
Project * project() const
Gets the Project for this directory.
Definition: Directory.cpp:1325
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:182
QString fileName() const
Access the name of the control network file associated with this Control.
Definition: Control.cpp:264
$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:182
static MovementColorSource fromMovementColorSourceString(QString)
Convert a string back to a MovementColorSource (for serialization purposes).