Isis 3 Programmer Reference
ControlMeasureEditWidget.h
1 #ifndef ControlMeasureEditWidget_h
2 #define ControlMeasureEditWidget_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 // This is the only include allowed in this file!
13 #include <QWidget>
14 
15 
16 class QCheckBox;
17 class QDial;
18 class QDoubleSpinBox;
19 class QHBoxLayout;
20 class QLabel;
21 class QLCDNumber;
22 class QListWidget;
23 class QPalette;
24 class QPushButton;
25 class QRadioButton;
26 class QScrollBar;
27 class QString;
28 class QTimer;
29 class QToolButton;
30 class QVBoxLayout;
31 
32 namespace Isis {
33  class AutoReg;
34  class Chip;
35  class ChipViewport;
36  class ControlMeasure;
37  class ControlNet;
38  class ControlPoint;
39  class Cube;
40  class CubeViewport;
41  class SerialNumberList;
42  class Stretch;
43  class Tool;
44  class UniversalGroundMap;
45 
175  Q_OBJECT
176 
177  public:
178  ControlMeasureEditWidget(QWidget *parent = 0, bool allowLeftMouse = false,
179  bool useGeometry = true);
186  QString templateFileName() {
187  return m_templateFileName;
188  };
189  void allowLeftMouse(bool allowMouse);
190 
191  void setLeftPosition(double sample, double line);
192  void setRightPosition(double sample, double line);
193 
194  signals:
195  void updateLeftView(double sample, double line);
196  void updateRightView(double sample, double line);
197  void measureSaved();
198  void newControlNetwork(ControlNet *);
199  void setTemplateFailed(QString);
200  void stretchChipViewport(Stretch *, CubeViewport *);
201 
202  public slots:
203  bool setTemplateFile(QString);
204  void setPoint(ControlPoint *editPoint, SerialNumberList *snList);
205  void setLeftMeasure(ControlMeasure *leftMeasure,
206  Cube *leftCube, QString pointId);
207  void setRightMeasure(ControlMeasure *rightMeasure,
208  Cube *rightCube, QString pointId);
209  void colorizeSaveButton();
210  void refreshChips();
211  void saveChips();
212 
213  protected slots:
214 
215  private slots:
216 
217  void setNoGeom();
218  void setGeom();
219  void setRotate();
220  void setCircle(bool);
221  void setZoomLink(bool);
222 
223  void findPoint();
224  void registerPoint();
225  void saveMeasure();
226  void updateLeftPositionLabel(double zoomFactor);
227  void updateRightGeom();
228  void updateRightPositionLabel(double zoomFactor);
229 
230  void blinkStart();
231  void blinkStop();
232  void changeBlinkTime(double interval);
233  void updateBlink();
234 
235  void showBlinkExtension();
236  void blinkStartRight();
237  void blinkStopRight();
238  void changeBlinkTimeRight(double interval);
239  void updateBlinkRight();
240 
241 
242  private:
243  void createMeasureEditor(QWidget *parent);
244 
247 
255  QRadioButton *m_nogeom;
256  QRadioButton *m_geom;
257  QToolButton *m_rightZoomIn;
258  QToolButton *m_rightZoomOut;
259  QToolButton *m_rightZoom1;
260 
261  bool m_timerOn;
262  QTimer *m_timer;
264  unsigned char m_blinkIndex;
265 
266  QDial *m_dial;
267  QLCDNumber *m_dialNumber;
268  QDoubleSpinBox *m_blinkTimeBox;
269 
270  bool m_circle;
271  QScrollBar *m_slider;
272 
273  QPushButton *m_autoReg;
275  QLabel *m_oldPosition;
276  QLabel *m_goodFit;
279 
280  QPushButton *m_saveMeasure;
282 
285 
294 
296  QString m_pointId;
297 
299  bool m_geomIt;
300  bool m_linkZoom;
301 
302 
303 
307  QListWidget *m_blinkListWidget;
308 
309 
310  QDoubleSpinBox *m_blinkTimeBoxRight;
312  QTimer *m_timerRight;
314  unsigned char m_blinkIndexRight;
315 
316  };
317 };
318 
319 #endif
Isis::ControlMeasureEditWidget::m_rightZoomFactor
QLabel * m_rightZoomFactor
Label for right chip viewport's zoom factor.
Definition: ControlMeasureEditWidget.h:250
Isis::ControlMeasureEditWidget::m_rightSampLinePosition
QLabel * m_rightSampLinePosition
Label for right chip viewport's current sample/line.
Definition: ControlMeasureEditWidget.h:252
Isis::ControlMeasureEditWidget::blinkStopRight
void blinkStopRight()
Slot to stop blink function.
Definition: ControlMeasureEditWidget.cpp:1815
Isis::ControlMeasureEditWidget::m_leftSampLinePosition
QLabel * m_leftSampLinePosition
Label for left chip viewport's current sample/line.
Definition: ControlMeasureEditWidget.h:251
QWidget
Isis::UniversalGroundMap
Universal Ground Map.
Definition: UniversalGroundMap.h:69
Isis::ControlMeasureEditWidget::setTemplateFile
bool setTemplateFile(QString)
Allows user to choose a new template file by opening a window from which to select a filename.
Definition: ControlMeasureEditWidget.cpp:1624
Isis::ControlMeasureEditWidget::m_serialNumberList
SerialNumberList * m_serialNumberList
The serial numbers for each measure of m_editpoint.
Definition: ControlMeasureEditWidget.h:305
Isis::ControlMeasureEditWidget::saveChips
void saveChips()
Slot to save registration chips to files and fire off qview.
Definition: ControlMeasureEditWidget.cpp:1705
Isis::ControlMeasureEditWidget::updateLeftPositionLabel
void updateLeftPositionLabel(double zoomFactor)
Update sample/line, lat/lon and zoom factor of left measure.
Definition: ControlMeasureEditWidget.cpp:890
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::ControlMeasureEditWidget::m_saveDefaultPalette
QPalette m_saveDefaultPalette
Default color palette for the Save button.
Definition: ControlMeasureEditWidget.h:281
Isis::ControlMeasureEditWidget::m_linkZoom
bool m_linkZoom
Link zoom factors between chip viewports.
Definition: ControlMeasureEditWidget.h:300
Isis::ControlMeasureEditWidget::m_rightCube
Cube * m_rightCube
Right chip viewport's Cube.
Definition: ControlMeasureEditWidget.h:287
Isis::Stretch
Pixel value mapper.
Definition: Stretch.h:58
Isis::ControlMeasureEditWidget::blinkStart
void blinkStart()
Slot to start blink function.
Definition: ControlMeasureEditWidget.cpp:1555
Isis::ControlMeasureEditWidget::m_blinkListWidget
QListWidget * m_blinkListWidget
List of images being blinked through.
Definition: ControlMeasureEditWidget.h:307
Isis::ControlMeasureEditWidget::m_dial
QDial * m_dial
Rotation dial.
Definition: ControlMeasureEditWidget.h:266
Isis::ControlMeasureEditWidget::m_timerOnRight
bool m_timerOnRight
Timer is on for right viewport.
Definition: ControlMeasureEditWidget.h:311
Isis::ControlMeasureEditWidget::setGeom
void setGeom()
Turn geom on.
Definition: ControlMeasureEditWidget.cpp:1427
Isis::ControlMeasureEditWidget::m_leftChip
Chip * m_leftChip
Left Chip.
Definition: ControlMeasureEditWidget.h:290
Isis::ControlMeasureEditWidget::ControlMeasureEditWidget
ControlMeasureEditWidget(QWidget *parent=0, bool allowLeftMouse=false, bool useGeometry=true)
Constructs a ControlMeasureEditWidget widget.
Definition: ControlMeasureEditWidget.cpp:64
Isis::ControlMeasureEditWidget::updateBlinkRight
void updateBlinkRight()
Slot to cause the blink to happen coinciding with the timer.
Definition: ControlMeasureEditWidget.cpp:1837
Isis::ControlMeasureEditWidget::m_leftZoomFactor
QLabel * m_leftZoomFactor
Label for left chip viewport's zoom factor.
Definition: ControlMeasureEditWidget.h:249
Isis::ControlMeasureEditWidget::m_autoRegAttempted
bool m_autoRegAttempted
Whether or not auto-registration has been attempted.
Definition: ControlMeasureEditWidget.h:278
Isis::ControlMeasureEditWidget::m_blinkTimeBoxRight
QDoubleSpinBox * m_blinkTimeBoxRight
Input for time between image blinks.
Definition: ControlMeasureEditWidget.h:310
Isis::ControlMeasureEditWidget::m_dialNumber
QLCDNumber * m_dialNumber
The current amount of rotation (in degrees)
Definition: ControlMeasureEditWidget.h:267
Isis::ControlMeasureEditWidget::updateBlink
void updateBlink()
Slot to cause the blink to happen coinciding with the timer.
Definition: ControlMeasureEditWidget.cpp:1599
Isis::ControlMeasureEditWidget::setCircle
void setCircle(bool)
Turn circle widgets on/off.
Definition: ControlMeasureEditWidget.cpp:1512
Isis::ControlMeasureEditWidget::~ControlMeasureEditWidget
~ControlMeasureEditWidget()
Destructor.
Definition: ControlMeasureEditWidget.cpp:90
Isis::ControlMeasureEditWidget::setPoint
void setPoint(ControlPoint *editPoint, SerialNumberList *snList)
Set the Control Point for this widget.
Definition: ControlMeasureEditWidget.cpp:1740
Isis::ControlMeasureEditWidget::setRightMeasure
void setRightMeasure(ControlMeasure *rightMeasure, Cube *rightCube, QString pointId)
Set the measure displayed in the right ChipViewport.
Definition: ControlMeasureEditWidget.cpp:821
Isis::ControlMeasureEditWidget::findPoint
void findPoint()
Find point from left ChipViewport in the right ChipViewport.
Definition: ControlMeasureEditWidget.cpp:986
Isis::ControlMeasureEditWidget::updateRightPositionLabel
void updateRightPositionLabel(double zoomFactor)
Update sample/line, lat/lon and zoom factor of right measure.
Definition: ControlMeasureEditWidget.cpp:927
Isis::ControlMeasureEditWidget::m_leftView
ChipViewport * m_leftView
Left ChipViewport.
Definition: ControlMeasureEditWidget.h:283
Isis::ControlMeasureEditWidget::m_timer
QTimer * m_timer
Timer on the blinking.
Definition: ControlMeasureEditWidget.h:262
Isis::ControlMeasureEditWidget
Point Editor Widget.
Definition: ControlMeasureEditWidget.h:174
Isis::SerialNumberList
Serial Number list generator.
Definition: SerialNumberList.h:64
Isis::ControlMeasureEditWidget::changeBlinkTime
void changeBlinkTime(double interval)
Set blink rate.
Definition: ControlMeasureEditWidget.cpp:1591
Isis::ControlMeasureEditWidget::colorizeSaveButton
void colorizeSaveButton()
Turn "Save Measure" button text to red.
Definition: ControlMeasureEditWidget.cpp:967
Isis::AutoReg
Auto Registration class.
Definition: AutoReg.h:167
Isis::ControlMeasureEditWidget::saveMeasure
void saveMeasure()
Save control measure under the crosshair in right ChipViewport.
Definition: ControlMeasureEditWidget.cpp:1226
Isis::ControlMeasureEditWidget::changeBlinkTimeRight
void changeBlinkTimeRight(double interval)
Set blink rate.
Definition: ControlMeasureEditWidget.cpp:1831
Isis::ControlMeasureEditWidget::m_slider
QScrollBar * m_slider
Slider that controls the size of the center circle.
Definition: ControlMeasureEditWidget.h:271
Isis::ControlPoint
A single control point.
Definition: ControlPoint.h:354
Isis::ControlMeasureEditWidget::setLeftMeasure
void setLeftMeasure(ControlMeasure *leftMeasure, Cube *leftCube, QString pointId)
Set the measure displayed in the left ChipViewport.
Definition: ControlMeasureEditWidget.cpp:731
Isis::ControlMeasureEditWidget::m_geom
QRadioButton * m_geom
Radio button to apply geometry/rotation to right chip viewport.
Definition: ControlMeasureEditWidget.h:256
Isis::ControlMeasureEditWidget::m_blinkList
QList< ChipViewport * > m_blinkList
List of chip viewports to blink.
Definition: ControlMeasureEditWidget.h:263
Isis::ControlMeasureEditWidget::m_leftGroundMap
UniversalGroundMap * m_leftGroundMap
UniversalGroundMap for left cube.
Definition: ControlMeasureEditWidget.h:292
Isis::ControlMeasureEditWidget::setRightPosition
void setRightPosition(double sample, double line)
Set the tack position of the measure in the right ChipViewport.
Definition: ControlMeasureEditWidget.cpp:788
Isis::ControlMeasureEditWidget::m_circle
bool m_circle
Whether or not to draw circle in center of the right chip viewport.
Definition: ControlMeasureEditWidget.h:270
Isis::ControlMeasureEditWidget::m_blinkExtension
QWidget * m_blinkExtension
Widget for selecting images and timing to blink through them.
Definition: ControlMeasureEditWidget.h:306
Isis::ControlMeasureEditWidget::m_rightZoomOut
QToolButton * m_rightZoomOut
Button for zooming out right chip viewport.
Definition: ControlMeasureEditWidget.h:258
Isis::ControlMeasureEditWidget::createMeasureEditor
void createMeasureEditor(QWidget *parent)
Design the MeasureEdit widget.
Definition: ControlMeasureEditWidget.cpp:121
Isis::ControlMeasureEditWidget::m_useGeometry
bool m_useGeometry
Whether or not to allow geometry/rotation on right chip viewport.
Definition: ControlMeasureEditWidget.h:246
Isis::ControlMeasureEditWidget::m_timerRight
QTimer * m_timerRight
Timer for tracking image blink time.
Definition: ControlMeasureEditWidget.h:312
Isis::ControlMeasureEditWidget::blinkStop
void blinkStop()
Slot to stop blink function.
Definition: ControlMeasureEditWidget.cpp:1574
Isis::ControlMeasureEditWidget::m_rotation
int m_rotation
Amount to rotate right chip viewport TODO Is this used??
Definition: ControlMeasureEditWidget.h:298
Isis::ControlMeasureEditWidget::m_rightZoomIn
QToolButton * m_rightZoomIn
Button for zooming in right chip viewport.
Definition: ControlMeasureEditWidget.h:257
Isis::ControlMeasureEditWidget::setRotate
void setRotate()
‍**
Definition: ControlMeasureEditWidget.cpp:1388
Isis::ControlMeasureEditWidget::registerPoint
void registerPoint()
Sub-pixel register point in right chipViewport with point in left.
Definition: ControlMeasureEditWidget.cpp:1041
Isis::ControlMeasureEditWidget::m_autoRegFact
AutoReg * m_autoRegFact
Created AutoReg.
Definition: ControlMeasureEditWidget.h:295
Isis::ControlMeasureEditWidget::m_leftCube
Cube * m_leftCube
Left chip viewport's Cube.
Definition: ControlMeasureEditWidget.h:286
Isis::ControlNet
a control network
Definition: ControlNet.h:257
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::ControlMeasureEditWidget::m_geomIt
bool m_geomIt
Apply geometry to the right chip viewport.
Definition: ControlMeasureEditWidget.h:299
Isis::ControlMeasureEditWidget::m_rightView
ChipViewport * m_rightView
Right ChipViewport.
Definition: ControlMeasureEditWidget.h:284
Isis::ControlMeasureEditWidget::setNoGeom
void setNoGeom()
Slot to turn off geom.
Definition: ControlMeasureEditWidget.cpp:1476
Isis::CubeViewport
Widget to display Isis cubes for qt apps.
Definition: CubeViewport.h:122
Isis::ChipViewport
Viewport for Isis Chips.
Definition: ChipViewport.h:71
Isis::ControlMeasureEditWidget::m_autoRegShown
bool m_autoRegShown
Whether or not the auto-reg extension is shown.
Definition: ControlMeasureEditWidget.h:277
Isis::ControlMeasureEditWidget::templateFileName
QString templateFileName()
Returns the template filename used for auto-registration.
Definition: ControlMeasureEditWidget.h:186
Isis::ControlMeasureEditWidget::m_goodFit
QLabel * m_goodFit
The goodness of fit value after registering.
Definition: ControlMeasureEditWidget.h:276
Isis::ControlMeasureEditWidget::m_blinkTimeBox
QDoubleSpinBox * m_blinkTimeBox
The current blink step (in seconds)
Definition: ControlMeasureEditWidget.h:268
Isis::ControlMeasureEditWidget::m_allowLeftMouse
bool m_allowLeftMouse
Whether or not to allow mouse events on left chip viewport.
Definition: ControlMeasureEditWidget.h:245
Isis::ControlMeasureEditWidget::m_rightLatLonPosition
QLabel * m_rightLatLonPosition
Label for right chip viewport's current lat/lon.
Definition: ControlMeasureEditWidget.h:254
Isis::ControlMeasureEditWidget::m_nogeom
QRadioButton * m_nogeom
Radio button to remove geometry/rotation for right chip viewport.
Definition: ControlMeasureEditWidget.h:255
Isis::ControlMeasureEditWidget::m_templateFileName
QString m_templateFileName
Registration template filename.
Definition: ControlMeasureEditWidget.h:248
Isis::ControlMeasureEditWidget::m_blinkIndex
unsigned char m_blinkIndex
Index of the chip to load in the left chip viewport.
Definition: ControlMeasureEditWidget.h:264
Isis::ControlMeasureEditWidget::m_saveMeasure
QPushButton * m_saveMeasure
Button to save the current measure.
Definition: ControlMeasureEditWidget.h:280
Isis::ControlMeasureEditWidget::m_rightGroundMap
UniversalGroundMap * m_rightGroundMap
UniversalGroundMap for right cube.
Definition: ControlMeasureEditWidget.h:293
Isis::Chip
A small chip of data used for pattern matching.
Definition: Chip.h:86
Isis::ControlMeasureEditWidget::m_autoRegExtension
QWidget * m_autoRegExtension
Widget that shows after registering a measure.
Definition: ControlMeasureEditWidget.h:274
Isis::ControlMeasureEditWidget::allowLeftMouse
void allowLeftMouse(bool allowMouse)
Set the option that allows mouse movements in the left ChipViewport.
Definition: ControlMeasureEditWidget.cpp:1668
Isis::ControlMeasureEditWidget::m_leftMeasure
ControlMeasure * m_leftMeasure
Left ControlMeasure.
Definition: ControlMeasureEditWidget.h:288
Isis::ControlMeasureEditWidget::m_blinkIndexRight
unsigned char m_blinkIndexRight
Index of image being blinked.
Definition: ControlMeasureEditWidget.h:314
Isis::ControlMeasureEditWidget::m_timerOn
bool m_timerOn
Indicates if the blink timer is on.
Definition: ControlMeasureEditWidget.h:261
Isis::ControlMeasureEditWidget::m_pointId
QString m_pointId
Associated control point id of the right measure.
Definition: ControlMeasureEditWidget.h:296
Isis::ControlMeasureEditWidget::m_blinkChipViewportListRight
QList< ChipViewport * > m_blinkChipViewportListRight
List of viewports to blink through.
Definition: ControlMeasureEditWidget.h:313
Isis::ControlMeasureEditWidget::m_rightChip
Chip * m_rightChip
Right Chip.
Definition: ControlMeasureEditWidget.h:291
Isis::ControlMeasureEditWidget::setZoomLink
void setZoomLink(bool)
Turn linking of zoom on or off.
Definition: ControlMeasureEditWidget.cpp:1541
Isis::ControlMeasureEditWidget::blinkStartRight
void blinkStartRight()
Slot to start blink function for advanced blink functionality.
Definition: ControlMeasureEditWidget.cpp:1772
Isis::ControlMeasureEditWidget::m_rightZoom1
QToolButton * m_rightZoom1
Button for 1:1 zoom on right chip viewport.
Definition: ControlMeasureEditWidget.h:259
Isis::ControlMeasureEditWidget::m_autoReg
QPushButton * m_autoReg
Button to auto-register the measure.
Definition: ControlMeasureEditWidget.h:273
Isis::ControlMeasureEditWidget::m_oldPosition
QLabel * m_oldPosition
The old sample and line before registering.
Definition: ControlMeasureEditWidget.h:275
Isis::ControlMeasureEditWidget::m_editPoint
ControlPoint * m_editPoint
The control point currently being edited.
Definition: ControlMeasureEditWidget.h:304
Isis::ControlMeasureEditWidget::m_rightMeasure
ControlMeasure * m_rightMeasure
Right ControlMeasure.
Definition: ControlMeasureEditWidget.h:289
Isis::ControlMeasureEditWidget::updateRightGeom
void updateRightGeom()
Slot to update the geomed right ChipViewport for zoom operations.
Definition: ControlMeasureEditWidget.cpp:1335
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::ControlMeasureEditWidget::m_leftLatLonPosition
QLabel * m_leftLatLonPosition
Label for left chip viewport's current lat/lon.
Definition: ControlMeasureEditWidget.h:253
Isis::ControlMeasureEditWidget::setLeftPosition
void setLeftPosition(double sample, double line)
Set the tack position of the measure in the left ChipViewport.
Definition: ControlMeasureEditWidget.cpp:774
Isis::ControlMeasure
a control measurement
Definition: ControlMeasure.h:175