Isis Developer Reference
MosaicControlNetTool.h
Go to the documentation of this file.
1 #ifndef MosaicControlNetTool_h
2 #define MosaicControlNetTool_h
3 
4 #include "MosaicTool.h"
5 
6 class QDialog;
7 class QLabel;
8 class QPushButton;
9 
10 namespace Isis {
11  class ControlNet;
12  class ControlNetGraphicsItem;
13  class ControlPoint;
14 // class ControlPointEdit;
15  class Image;
16  class ImageList;
17 
75  Q_OBJECT
76 
77  public:
95  };
97  static const int NUM_MOVEMENT_COLOR_SOURCE_VALUES = 4;
98 
101 
102  void addToMenu(QMenu *menu);
103 
104  PvlObject toPvl() const;
105  void fromPvl(const PvlObject &obj);
106  QString projectPvlObjectName() const;
107 
110 
111  int maxMovementColorMeasureCount() const;
112  double maxMovementColorResidualMagnitude() const;
113 
114  static QString toString(MovementColorSource);
116 
117  signals:
118  void modifyControlPoint(ControlPoint *controlPoint);
119  void deleteControlPoint(ControlPoint *controlPoint);
120  void createControlPoint(double latitude, double longitude);
121 
123  void deleteControlPoint(QString controlPointId);
124 
125  public slots:
126  void loadNetwork();
127  void rebuildPointGraphics();
128  void displayNewControlPoint(QString pointId);
129  void displayChangedControlPoint(QString pointId);
131 
132  protected:
135  void mouseButtonRelease(QPointF, Qt::MouseButton s);
136 
137  private slots:
138  void configMovement();
139  void updateTool();
140  void openControlNet();
141  void displayControlNet();
142  void displayConnectivity();
143  void closeNetwork();
144  void randomizeColors();
145 
146  void objectDestroyed(QObject *);
147 
148  private:
149  void createDialog();
150 
151  Image *takeImage(QString sn, ImageList &images);
152 
153  QPushButton *m_loadControlNetButton;
154  QPushButton *m_displayControlNetButton;
155  QPushButton *m_displayConnectivity;
156  QPushButton *m_configMovement;
157  QPushButton *m_closeNetwork;
158  QPushButton *m_randomizeColors;
159  QAction *m_connectivity;
160  ControlNet *m_controlNet;
161  ControlNetGraphicsItem *m_controlNetGraphics;
162  QLabel *m_controlNetFileLabel;
163  QString m_controlNetFile;
164 // ControlPointEdit *m_pointEditor;
165 
167  MovementColorSource m_movementArrowColorSource;
169  int m_measureCount;
171  double m_residualMagnitude;
172  };
173 };
174 
175 #endif
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::MosaicControlNetTool::createControlPoint
void createControlPoint(double latitude, double longitude)
Isis::ControlNetGraphicsItem::setArrowsVisible
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.
Definition: ControlNetGraphicsItem.cpp:224
Isis::MosaicControlNetTool::maxMovementColorMeasureCount
int maxMovementColorMeasureCount() const
Get the current measure count to become fully colored.
Definition: MosaicControlNetTool.cpp:251
Isis::MosaicControlNetTool::MeasureCount
@ MeasureCount
Show movement arrows colored by measure count.
Definition: MosaicControlNetTool.h:92
Isis::MosaicControlNetTool::deleteControlPoint
void deleteControlPoint(QString controlPointId)
FileName.h
Isis::ControlNetGraphicsItem::snToFileName
QString snToFileName(QString sn)
Definition: ControlNetGraphicsItem.cpp:203
Isis::MosaicControlNetTool::addToMenu
void addToMenu(QMenu *menu)
Isis::MosaicSceneWidget::getView
MosaicGraphicsView * getView() const
Definition: MosaicSceneWidget.h:162
QWidget
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::MosaicTool::getIcon
QPixmap getIcon(QString iconName) const
returns the path to the icon directory.
Definition: MosaicTool.cpp:115
Isis::MosaicControlNetTool::NoMovement
@ NoMovement
Do not show movement arrows.
Definition: MosaicControlNetTool.h:88
Isis::MosaicSceneWidget::getProjection
Projection * getProjection() const
Definition: MosaicSceneWidget.h:170
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
MosaicSceneWidget.h
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::Latitude
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:51
Project.h
Isis::ImageDisplayProperties::randomColor
static QColor randomColor()
Creates and returns a random color for the intial color of the footprint polygon.
Definition: ImageDisplayProperties.cpp:54
MosaicControlNetTool.h
Isis::ImageDisplayProperties::setColor
void setColor(QColor newColor)
Change the color associated with this cube.
Definition: ImageDisplayProperties.cpp:74
Isis::MosaicSceneWidget::enableRubberBand
void enableRubberBand(bool)
Definition: MosaicSceneWidget.cpp:496
SpecialPixel.h
Isis::TProjection::SetCoordinate
virtual bool SetCoordinate(const double x, const double y)
This method is used to set the projection x/y.
Definition: TProjection.cpp:789
Isis::MosaicControlNetTool::MovementColorSource
MovementColorSource
This enum defines how to draw the movement arrows (arrows from CP A Priori location to adjusted locat...
Definition: MosaicControlNetTool.h:86
QMenu
ControlPointEditView.h
Directory.h
ControlPointEditWidget.h
Isis::MosaicControlNetTool::maxMovementColorResidualMagnitude
double maxMovementColorResidualMagnitude() const
Get the current max.
Definition: MosaicControlNetTool.cpp:265
Isis::MosaicSceneWidget::setCubesSelectable
void setCubesSelectable(bool)
Definition: MosaicSceneWidget.cpp:1499
Isis::MosaicTool::getWidget
MosaicSceneWidget * getWidget()
Definition: MosaicTool.h:96
Isis::MosaicControlNetTool::getPrimaryAction
QAction * getPrimaryAction()
Adds the action to the toolpad.
Definition: MosaicControlNetTool.cpp:327
Isis::MosaicControlNetTool::loadNetwork
void loadNetwork()
Load m_controlNetFile into memory - this will re-load the network if it's already open.
Definition: MosaicControlNetTool.cpp:610
Isis::MosaicControlNetTool::MosaicControlNetTool
MosaicControlNetTool(MosaicSceneWidget *)
MosaicControlNetTool constructor.
Definition: MosaicControlNetTool.cpp:48
ImageDisplayProperties.h
Isis::TProjection::Longitude
virtual double Longitude() const
This returns a longitude with correct longitude direction and domain as specified in the label object...
Definition: TProjection.cpp:823
Longitude.h
Isis::ImageList::append
void append(Image *const &value)
Appends an image to the image list.
Definition: ImageList.cpp:153
Isis::Projection::projectionType
ProjectionType projectionType() const
Returns an enum value for the projection type.
Definition: Projection.cpp:198
Isis::MosaicSceneWidget
This widget encompasses the entire mosaic scene.
Definition: MosaicSceneWidget.h:153
Isis::Project::activeControl
Control * activeControl()
Return the Active Control (control network)
Definition: Project.cpp:1903
Isis::Image::fileName
QString fileName() const
Get the file name of the cube that this image represents.
Definition: Image.cpp:340
Isis::MosaicControlNetTool::movementArrowColorSource
MovementColorSource movementArrowColorSource() const
Get the current setting for the movement arrows.
Definition: MosaicControlNetTool.cpp:243
Isis::Directory::project
Project * project() const
Gets the Project for this directory.
Definition: Directory.cpp:1311
Image.h
ControlNetGraphicsItem.h
Isis::ControlNetGraphicsItem::findClosestControlPoint
ControlPoint * findClosestControlPoint(QPointF locationPoint)
Return the closest control point to the pointLocation.
Definition: ControlNetGraphicsItem.cpp:302
Isis::MosaicTool
Base class for the MosaicTools.
Definition: MosaicTool.h:37
Isis::MosaicControlNetTool::NUM_MOVEMENT_COLOR_SOURCE_VALUES
static const int NUM_MOVEMENT_COLOR_SOURCE_VALUES
This is the count of possible values of MovementColorSource (useful for loops).
Definition: MosaicControlNetTool.h:97
Isis::MosaicControlNetTool::~MosaicControlNetTool
~MosaicControlNetTool()
Definition: MosaicControlNetTool.cpp:129
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::IsSpecial
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:197
Isis::MosaicControlNetTool::rebuildPointGraphics
void rebuildPointGraphics()
Slot used to re-create the graphics items that depict the control points.
Definition: MosaicControlNetTool.cpp:471
IString.h
ControlList.h
Isis::MosaicControlNetTool::mouseButtonRelease
void mouseButtonRelease(QPointF, Qt::MouseButton s)
Definition: MosaicControlNetTool.cpp:673
Isis::MosaicSceneWidget::getScene
QGraphicsScene * getScene() const
Definition: MosaicSceneWidget.h:166
Isis::Longitude
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:40
Isis::ImageList
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:55
Isis::MosaicControlNetTool::displayChangedControlPoint
void displayChangedControlPoint(QString pointId)
Definition: MosaicControlNetTool.cpp:478
Isis::ControlPoint
A single control point.
Definition: ControlPoint.h:354
Isis::MosaicSceneWidget::images
ImageList images()
Definition: MosaicSceneWidget.cpp:724
ControlNet.h
Latitude.h
Isis::MosaicSceneWidget::directory
Directory * directory() const
Definition: MosaicSceneWidget.cpp:719
Isis::Control::controlNet
ControlNet * controlNet()
Open and return a pointer to the ControlNet for this Control.
Definition: Control.cpp:150
FileDialog.h
Isis::TProjection::Latitude
virtual double Latitude() const
This returns a latitude with correct latitude type as specified in the label object.
Definition: TProjection.cpp:811
Isis::MosaicControlNetTool::setMovementArrowColorSource
void setMovementArrowColorSource(MovementColorSource, int, double)
Define how the movement arrows should be drawn.
Definition: MosaicControlNetTool.cpp:226
Isis::IException::toString
QString toString() const
Returns a string representation of this exception.
Definition: IException.cpp:537
Isis::ImageDisplayProperties::Color
@ Color
The color of the cube, default randomized (QColor)
Definition: ImageDisplayProperties.h:95
Isis::toInt
int toInt(const QString &string)
Global function to convert from a string to an integer.
Definition: IString.cpp:93
Isis::MosaicSceneItem::image
Image * image()
Definition: MosaicSceneItem.h:59
Isis::TProjection
Base class for Map TProjections.
Definition: TProjection.h:166
Isis::MosaicControlNetTool::toPvl
PvlObject toPvl() const
Definition: MosaicControlNetTool.cpp:162
Isis::MosaicControlNetTool::fromPvl
void fromPvl(const PvlObject &obj)
Definition: MosaicControlNetTool.cpp:183
Isis::PvlObject::hasKeyword
bool hasKeyword(const QString &kname, FindOptions opts) const
See if a keyword is in the current PvlObject, or deeper inside other PvlObjects and Pvlgroups within ...
Definition: PvlObject.cpp:236
MosaicGraphicsView.h
ControlPoint.h
Isis::MosaicControlNetTool::modifyControlPoint
void modifyControlPoint(ControlPoint *controlPoint)
Isis::ControlNet
a control network
Definition: ControlNet.h:257
Isis::MosaicControlNetTool::displayUponControlPointDeletion
void displayUponControlPointDeletion()
Definition: MosaicControlNetTool.cpp:493
Isis::Image
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::MosaicControlNetTool::controlPointSelected
void controlPointSelected(ControlPoint *)
Isis::MosaicControlNetTool::ResidualMagnitude
@ ResidualMagnitude
Show movement arrows colored by residual magnitude.
Definition: MosaicControlNetTool.h:94
Isis::MosaicControlNetToolMovementConfigDialog
Configure qmos Control Net Tool's movement arrows.
Definition: MosaicControlNetToolMovementConfigDialog.h:27
TProjection.h
Isis::MosaicControlNetTool::projectPvlObjectName
QString projectPvlObjectName() const
Definition: MosaicControlNetTool.cpp:209
Isis::Null
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
Isis::ImageList::takeAt
Image * takeAt(int i)
Removes the image at an index and returns it.
Definition: ImageList.cpp:394
ChipViewportsWidget.h
Isis::ControlNetGraphicsItem
Control Network Display on Mosaic Scene.
Definition: ControlNetGraphicsItem.h:37
Isis::Image::displayProperties
ImageDisplayProperties * displayProperties()
Get the display (GUI) properties (information) associated with this image.
Definition: Image.cpp:320
Isis::MosaicControlNetTool::fromMovementColorSourceString
static MovementColorSource fromMovementColorSourceString(QString)
Convert a string back to a MovementColorSource (for serialization purposes).
Definition: MosaicControlNetTool.cpp:306
Isis::MosaicTool::isActive
bool isActive() const
Returns the activeness of this toool.
Definition: MosaicTool.h:50
IException.h
Isis::toDouble
double toDouble(const QString &string)
Global function to convert from a string to a double.
Definition: IString.cpp:149
Isis::ControlNetGraphicsItem::clearControlPointGraphicsItem
void clearControlPointGraphicsItem(QString pointId)
Definition: ControlNetGraphicsItem.cpp:188
Isis::MosaicControlNetTool::deleteControlPoint
void deleteControlPoint(ControlPoint *controlPoint)
MosaicSceneItem.h
Isis::MosaicSceneItem
A single cube in the mosaic scene.
Definition: MosaicSceneItem.h:47
Isis::MosaicControlNetTool
//TODO: Remove debug printout & comment // 2016-08-25 Tracie Sucharski - Checking Directory pointer f...
Definition: MosaicControlNetTool.h:74
Isis::toBool
bool toBool(const QString &string)
Global function to convert from a string to a boolean.
Definition: IString.cpp:38
Isis::MosaicControlNetTool::getToolBarWidget
QWidget * getToolBarWidget()
This method returns a widget that will be put in a tool bar when the tool is activated.
Definition: MosaicControlNetTool.cpp:344
Isis::MosaicControlNetTool::toString
static QString toString(MovementColorSource)
Convert a MovementColorSource to a string for serialization purposes.
Definition: MosaicControlNetTool.cpp:278
PvlObject.h
Isis::Angle::degrees
double degrees() const
Get the angle in units of Degrees.
Definition: Angle.h:232
Control.h
Projection.h
Isis::Projection::Triaxial
@ Triaxial
These projections are used to map triaxial and irregular-shaped bodies.
Definition: Projection.h:166
QDialog
QObject
MosaicControlNetToolMovementConfigDialog.h
MosaicTool.h
Isis::Projection
Base class for Map Projections.
Definition: Projection.h:155
QAction
Isis::ControlNetGraphicsItem::buildChildren
void buildChildren()
Call this to re-calculate where control points ought to lie.
Definition: ControlNetGraphicsItem.cpp:240
QGraphicsItem
Isis::Projection::ProjectionType
ProjectionType
This enum defines the subclasses of Projection supported in Isis.
Definition: Projection.h:166
Isis::MosaicControlNetTool::displayNewControlPoint
void displayNewControlPoint(QString pointId)
Definition: MosaicControlNetTool.cpp:484
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::MosaicControlNetTool::NoColor
@ NoColor
Show black movement arrows.
Definition: MosaicControlNetTool.h:90
Isis::ControlNet::GetSerialConnections
QList< QList< QString > > GetSerialConnections() const
This method searches through all the cube serial numbers in the network.
Definition: ControlNet.cpp:967
Isis::Control::fileName
QString fileName() const
Access the name of the control network file associated with this Control.
Definition: Control.cpp:272