Isis Developer Reference
ControlMeasureEditWidget.h
Go to the documentation of this file.
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();
199  void setTemplateFailed(QString);
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 
245  bool m_allowLeftMouse;
246  bool m_useGeometry;
247 
248  QString m_templateFileName;
249  QLabel *m_leftZoomFactor;
250  QLabel *m_rightZoomFactor;
251  QLabel *m_leftSampLinePosition;
252  QLabel *m_rightSampLinePosition;
253  QLabel *m_leftLatLonPosition;
254  QLabel *m_rightLatLonPosition;
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;
263  QList<ChipViewport *> m_blinkList;
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;
274  QWidget *m_autoRegExtension;
275  QLabel *m_oldPosition;
276  QLabel *m_goodFit;
277  bool m_autoRegShown;
278  bool m_autoRegAttempted;
279 
280  QPushButton *m_saveMeasure;
281  QPalette m_saveDefaultPalette;
282 
283  ChipViewport *m_leftView;
284  ChipViewport *m_rightView;
285 
286  Cube *m_leftCube;
287  Cube *m_rightCube;
288  ControlMeasure *m_leftMeasure;
289  ControlMeasure *m_rightMeasure;
290  Chip *m_leftChip;
291  Chip *m_rightChip;
292  UniversalGroundMap *m_leftGroundMap;
293  UniversalGroundMap *m_rightGroundMap;
294 
295  AutoReg *m_autoRegFact;
296  QString m_pointId;
297 
298  int m_rotation;
299  bool m_geomIt;
300  bool m_linkZoom;
301 
302 
303 
304  ControlPoint *m_editPoint;
305  SerialNumberList *m_serialNumberList;
306  QWidget *m_blinkExtension;
307  QListWidget *m_blinkListWidget;
308 
309 
310  QDoubleSpinBox *m_blinkTimeBoxRight;
311  bool m_timerOnRight;
312  QTimer *m_timerRight;
313  QList<ChipViewport *> m_blinkChipViewportListRight;
314  unsigned char m_blinkIndexRight;
315 
316  };
317 };
318 
319 #endif
Isis::AutoReg::GoodnessOfFit
double GoodnessOfFit() const
Return the goodness of fit of the match algorithm.
Definition: AutoReg.h:323
FileName.h
QWidget
Isis::ControlMeasure::RegisteredSubPixel
@ RegisteredSubPixel
Registered to sub-pixel (e.g., pointreg)
Definition: ControlMeasure.h:214
Isis::IException::Io
@ Io
A type of error that occurred when performing an actual I/O operation.
Definition: IException.h:155
Isis::ControlMeasureEditWidget::stretchChipViewport
void stretchChipViewport(Stretch *, CubeViewport *)
Isis::AutoReg::MinimumZScore
double MinimumZScore() const
Return minimumPatternZScore.
Definition: AutoReg.h:350
Isis::ChipViewport::zoom
void zoom(double zoomFactor)
Zoom by a specified factor.
Definition: ChipViewport.cpp:454
Isis::UniversalGroundMap
Universal Ground Map.
Definition: UniversalGroundMap.h:69
Isis::VIEWSIZE
const int VIEWSIZE
Constant representing the length and width of the chip viewports.
Definition: ChipViewportsWidget.cpp:48
Isis::UniversalGroundMap::Sample
double Sample() const
Returns the current line value of the camera model or projection.
Definition: UniversalGroundMap.cpp:200
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::UniversalGroundMap::UniversalLatitude
double UniversalLatitude() const
Returns the universal latitude of the camera model or projection.
Definition: UniversalGroundMap.cpp:247
Isis::ControlMeasureEditWidget::saveChips
void saveChips()
Slot to save registration chips to files and fire off qview.
Definition: ControlMeasureEditWidget.cpp:1705
Isis::ControlPoint::GetMeasure
const ControlMeasure * GetMeasure(QString serialNumber) const
Get a control measure based on its cube's serial number.
Definition: ControlPoint.cpp:416
QList< QListWidgetItem * >
Isis::ProgramLauncher::RunSystemCommand
static void RunSystemCommand(QString commandLine)
This runs arbitrary system commands.
Definition: ProgramLauncher.cpp:207
Isis::ControlMeasure::SetLogData
void SetLogData(ControlMeasureLogData)
This adds or updates the log data information associated with data's type.
Definition: ControlMeasure.cpp:435
Isis::ControlMeasureEditWidget::updateRightView
void updateRightView(double sample, double line)
Isis::AutoReg::ZScores
void ZScores(double &score1, double &score2) const
Return the ZScores of the pattern chip.
Definition: AutoReg.h:360
Isis::AutoReg::PatternZScoreNotMet
@ PatternZScoreNotMet
Pattern data max or min does not pass the z-score test.
Definition: AutoReg.h:188
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::ControlMeasure::SetAprioriSample
Status SetAprioriSample(double aprioriSample)
Definition: ControlMeasure.cpp:144
Isis::AutoReg::AdaptiveAlgorithmFailed
@ AdaptiveAlgorithmFailed
Error occured in Adaptive algorithm.
Definition: AutoReg.h:189
Isis::Chip::TackCube
void TackCube(const double cubeSample, const double cubeLine)
This sets which cube position will be located at the chip tack position.
Definition: Chip.cpp:182
Isis::Stretch
Pixel value mapper.
Definition: Stretch.h:58
Isis::ControlMeasureLogData::MaximumPixelZScore
@ MaximumPixelZScore
Definition: ControlMeasureLogData.h:81
Isis::ControlPoint::GetNumMeasures
int GetNumMeasures() const
Definition: ControlPoint.cpp:1702
Isis::ControlMeasureEditWidget::measureSaved
void measureSaved()
Isis::AutoReg::RegistrationSearchChip
Chip * RegistrationSearchChip()
Return pointer to search chip used in registration.
Definition: AutoReg.h:227
Isis::ControlMeasureEditWidget::ControlMeasureEditWidget
ControlMeasureEditWidget(QWidget *parent=0, bool allowLeftMouse=false, bool useGeometry=true)
Constructs a ControlMeasureEditWidget widget.
Definition: ControlMeasureEditWidget.cpp:64
Isis::AutoReg::Register
AutoReg::RegisterStatus Register()
Walk the pattern chip through the search chip to find the best registration.
Definition: AutoReg.cpp:587
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::AutoReg::SearchChip
Chip * SearchChip()
Return pointer to search chip.
Definition: AutoReg.h:207
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::ChipViewport::tackSample
double tackSample()
Return the position of cube under cross hair.
Definition: ChipViewport.cpp:353
Isis::ControlMeasure::DeleteLogData
void DeleteLogData(long dataType)
This deletes log data of the specified type.
Definition: ControlMeasure.cpp:455
Isis::ControlMeasure::SetDateTime
Status SetDateTime()
Date Time - Creation Time.
Definition: ControlMeasure.cpp:247
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::ControlMeasureEditWidget
Point Editor Widget.
Definition: ControlMeasureEditWidget.h:174
Isis::SerialNumberList
Serial Number list generator.
Definition: SerialNumberList.h:64
Isis::ChipViewport::tackLine
double tackLine()
Returns tack line.
Definition: ChipViewport.cpp:364
IString.h
Isis::SerialNumberList::serialNumber
QString serialNumber(const QString &filename)
Return a serial number given a filename.
Definition: SerialNumberList.cpp:426
Isis::ControlMeasureEditWidget::colorizeSaveButton
void colorizeSaveButton()
Turn "Save Measure" button text to red.
Definition: ControlMeasureEditWidget.cpp:967
Isis::Chip::Load
void Load(Cube &cube, const double rotation=0.0, const double scale=1.0, const int band=1)
Load cube data into the Chip.
Definition: Chip.cpp:203
Isis::AutoReg
Auto Registration class.
Definition: AutoReg.h:167
Isis::AutoReg::SurfaceModelSolutionInvalid
@ SurfaceModelSolutionInvalid
Could not model surface for sub-pixel accuracy.
Definition: AutoReg.h:186
Isis::ControlMeasure::GetCubeSerialNumber
QString GetCubeSerialNumber() const
Return the serial number of the cube containing the coordinate.
Definition: ControlMeasure.cpp:557
Isis::ControlPoint
A single control point.
Definition: ControlPoint.h:354
Isis::FileName::expanded
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
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::setRightPosition
void setRightPosition(double sample, double line)
Set the tack position of the measure in the right ChipViewport.
Definition: ControlMeasureEditWidget.cpp:788
Pvl.h
Isis::AutoReg::PatternChipNotEnoughValidData
@ PatternChipNotEnoughValidData
Not enough valid data in pattern chip.
Definition: AutoReg.h:182
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
ControlMeasureEditWidget.h
Isis::ControlMeasureLogData::MinimumPixelZScore
@ MinimumPixelZScore
Control measures store z-scores in pairs.
Definition: ControlMeasureLogData.h:76
Isis::IException::toString
QString toString() const
Returns a string representation of this exception.
Definition: IException.cpp:537
Isis::Chip::Write
void Write(const QString &filename)
Writes the contents of the Chip to a cube.
Definition: Chip.cpp:985
Isis::ChipViewport::geomChip
void geomChip(Chip *matchChip, Cube *matchChipCube)
Slot to geom chip (apply geometry transformation)
Definition: ChipViewport.cpp:621
Isis::ControlMeasure::Manual
@ Manual
Hand Measured (e.g., qnet)
Definition: ControlMeasure.h:210
Isis::AutoReg::CubeSample
double CubeSample() const
Return the search chip cube sample that best matched.
Definition: AutoReg.h:340
SerialNumberList.h
Application.h
Isis::ControlMeasure::SetChooserName
Status SetChooserName()
Set chooser name to a user who last changed the coordinate.
Definition: ControlMeasure.cpp:196
Isis::ChipViewport::zoomFactor
double zoomFactor()
Return the zoom factor.
Definition: ChipViewport.cpp:465
Isis::AutoReg::PatternChip
Chip * PatternChip()
Return pointer to pattern chip.
Definition: AutoReg.h:202
Isis::ControlMeasure::IsEditLocked
bool IsEditLocked() const
Return value for p_editLock or implicit lock on reference measure.
Definition: ControlMeasure.cpp:601
Isis::ControlMeasure::GetSample
double GetSample() const
Definition: ControlMeasure.cpp:723
Isis::AutoReg::SurfaceModelDistanceInvalid
@ SurfaceModelDistanceInvalid
Surface model moves registration more than one pixel.
Definition: AutoReg.h:187
ControlPoint.h
Isis::ControlNet
a control network
Definition: ControlNet.h:257
Isis::AutoReg::PatternValidPercent
double PatternValidPercent() const
Return pattern chip valid percent. The default value is.
Definition: AutoReg.h:280
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::CubeViewport
Widget to display Isis cubes for qt apps.
Definition: CubeViewport.h:122
Isis::AutoReg::RegisterStatus
RegisterStatus
Enumeration of the Register() method's return status.
Definition: AutoReg.h:179
Isis::AutoReg::Tolerance
double Tolerance() const
Return match algorithm tolerance.
Definition: AutoReg.h:290
UniversalGroundMap.h
Isis::ChipViewport
Viewport for Isis Chips.
Definition: ChipViewport.h:71
Isis::AutoReg::FitChipToleranceNotMet
@ FitChipToleranceNotMet
Goodness of fit tolerance not satisfied.
Definition: AutoReg.h:184
Isis::ControlMeasureEditWidget::setTemplateFailed
void setTemplateFailed(QString)
Isis::ControlMeasureEditWidget::templateFileName
QString templateFileName()
Returns the template filename used for auto-registration.
Definition: ControlMeasureEditWidget.h:186
Isis::AutoReg::FitChip
Chip * FitChip()
Return pointer to fit chip.
Definition: AutoReg.h:212
Isis::ChipViewport::setChip
void setChip(Chip *chip, Cube *chipCube)
Set chip.
Definition: ChipViewport.cpp:110
ProgramLauncher.h
Isis::AutoReg::SurfaceModelNotEnoughValidData
@ SurfaceModelNotEnoughValidData
Not enough points to fit a surface model for sub-pixel accuracy.
Definition: AutoReg.h:185
Isis::ControlMeasureEditWidget::updateLeftView
void updateLeftView(double sample, double line)
Isis::AutoRegFactory::Create
static AutoReg * Create(Pvl &pvl)
Create an AutoReg object using a PVL specification.
Definition: AutoRegFactory.cpp:45
Isis::AutoReg::FitChipNoData
@ FitChipNoData
Fit chip did not have any valid data.
Definition: AutoReg.h:183
Isis::Chip
A small chip of data used for pattern matching.
Definition: Chip.h:86
Isis::ControlMeasure::GetLine
double GetLine() const
Definition: ControlMeasure.cpp:690
AutoRegFactory.h
Isis::ControlMeasureEditWidget::refreshChips
void refreshChips()
Definition: ControlMeasureEditWidget.cpp:1690
Isis::ChipViewport::setCircle
void setCircle(bool checked)
Slot to change state of circle.
Definition: ChipViewport.cpp:588
Isis::UniversalGroundMap::SetUniversalGround
bool SetUniversalGround(double lat, double lon)
Returns whether the lat/lon position was set successfully in the camera model or projection.
Definition: UniversalGroundMap.cpp:102
Isis::UniversalGroundMap::SetImage
bool SetImage(double sample, double line)
Returns whether the sample/line postion was set successfully in the camera model or projection.
Definition: UniversalGroundMap.cpp:233
Isis::AutoReg::CubeLine
double CubeLine() const
Return the search chip cube line that best matched.
Definition: AutoReg.h:345
Isis::ControlMeasureLogData::GoodnessOfFit
@ GoodnessOfFit
GoodnessOfFit is pointreg information for reference measures.
Definition: ControlMeasureLogData.h:67
Isis::ControlMeasureEditWidget::allowLeftMouse
void allowLeftMouse(bool allowMouse)
Set the option that allows mouse movements in the left ChipViewport.
Definition: ControlMeasureEditWidget.cpp:1668
Isis::ControlMeasure::SetType
Status SetType(MeasureType type)
Set how the coordinate was obtained.
Definition: ControlMeasure.cpp:420
Isis::AutoReg::Distance
void Distance(double &sampDistance, double &lineDistance)
Return the distance point moved.
Definition: AutoReg.h:310
Isis::ChipViewport::loadView
void loadView(ChipViewport &newView)
Load with another ChipViewport, used for blinking.
Definition: ChipViewport.cpp:342
Isis::SerialNumberList::fileName
QString fileName(const QString &sn)
Return a filename given a serial number.
Definition: SerialNumberList.cpp:399
ChipViewport.h
Isis::Application::UserName
static QString UserName()
Returns the user name.
Definition: Application.cpp:816
Isis::ControlMeasureEditWidget::newControlNetwork
void newControlNetwork(ControlNet *)
Isis::ControlMeasure::SetAprioriLine
Status SetAprioriLine(double aprioriLine)
Definition: ControlMeasure.cpp:134
Isis::ChipViewport::nogeomChip
void nogeomChip()
Slot to un-geom chip (revert geometry transformation)
Definition: ChipViewport.cpp:649
ControlMeasureLogData.h
Isis::UniversalGroundMap::Line
double Line() const
Returns the current line value of the camera model or projection.
Definition: UniversalGroundMap.cpp:214
Isis::AutoReg::Success
bool Success() const
Return whether the match algorithm succeeded or not.
Definition: AutoReg.h:318
AutoReg.h
Isis::UniversalGroundMap::UniversalLongitude
double UniversalLongitude() const
Returns the universal longitude of the camera model or projection.
Definition: UniversalGroundMap.cpp:270
ControlMeasure.h
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::AutoReg::RegistrationPatternChip
Chip * RegistrationPatternChip()
Return pointer to pattern chip used in registration.
Definition: AutoReg.h:217
Isis::ControlMeasure::SetCoordinate
Status SetCoordinate(double sample, double line)
Set the coordinate of the measurement.
Definition: ControlMeasure.cpp:219
Isis::IException::User
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126
Isis::AutoReg::DistanceTolerance
double DistanceTolerance() const
Return distance tolerance.
Definition: AutoReg.h:300
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