Isis Developer Reference
ControlPointEdit.h
Go to the documentation of this file.
1 #ifndef ControlPointEdit_h
2 #define ControlPointEdit_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 QPalette;
23 class QPushButton;
24 class QRadioButton;
25 class QScrollBar;
26 class QString;
27 class QTimer;
28 class QToolButton;
29 class QVBoxLayout;
30 
31 namespace Isis {
32  class AutoReg;
33  class Chip;
34  class ChipViewport;
35  class ControlMeasure;
36  class ControlNet;
37  class Cube;
38  class CubeViewport;
39  class Stretch;
40  class Tool;
41  class UniversalGroundMap;
42 
155  class ControlPointEdit : public QWidget {
156  Q_OBJECT
157 
158  public:
159  ControlPointEdit(ControlNet * cnet, QWidget *parent = 0,
160  bool allowLeftMouse = false, bool useGeometry = true);
162  QString templateFileName() {
163  return p_templateFileName;
164  };
165  bool setTemplateFile(QString);
166  void allowLeftMouse(bool allowMouse);
167 
168  signals:
169  void updateLeftView(double sample, double line);
170  void updateRightView(double sample, double line);
171  void measureSaved();
174 
175  public slots:
176  void setLeftMeasure(ControlMeasure *leftMeasure,
177  Cube *leftCube, QString pointId);
178  void setRightMeasure(ControlMeasure *rightMeasure,
179  Cube *rightCube, QString pointId);
180  void colorizeSaveButton();
181  void refreshChips();
182  void saveChips();
183 
184  protected slots:
185 
186  private slots:
187 
188  void setNoGeom();
189  void setGeom();
190  void setRotate();
191  void setCircle(bool);
192  void setZoomLink(bool);
193 
194  void findPoint();
195  void registerPoint();
196  void saveMeasure();
197  void updateLeftPositionLabel(double zoomFactor);
198  void updateRightGeom();
199  void updateRightPositionLabel(double zoomFactor);
200 
201  void blinkStart();
202  void blinkStop();
203  void changeBlinkTime(double interval);
204  void updateBlink();
205 
206  private:
207  void createPointEditor(QWidget *parent);
208 
209  bool p_allowLeftMouse;
210  bool p_useGeometry;
211 
212  QString p_templateFileName;
213  QLabel *p_leftZoomFactor;
214  QLabel *p_rightZoomFactor;
215  QLabel *p_leftSampLinePosition;
216  QLabel *p_rightSampLinePosition;
217  QLabel *p_leftLatLonPosition;
218  QLabel *p_rightLatLonPosition;
219  QRadioButton *p_nogeom;
220  QRadioButton *p_geom;
221  QToolButton *p_rightZoomIn;
222  QToolButton *p_rightZoomOut;
223  QToolButton *p_rightZoom1;
224 
225 
226  bool p_timerOn;
227  QTimer *p_timer;
228  std::vector<ChipViewport *> p_blinkList;
229  unsigned char p_blinkIndex;
230 
231  QDial *p_dial;
232  QLCDNumber *p_dialNumber;
233  QDoubleSpinBox *p_blinkTimeBox;
234 
235  bool p_circle;
236  QScrollBar *p_slider;
237 
238  QPushButton *p_autoReg;
239  QWidget *p_autoRegExtension;
240  QLabel *p_oldPosition;
241  QLabel *p_goodFit;
242  bool p_autoRegShown;
243  bool p_autoRegAttempted;
244 
245  QPushButton *p_saveMeasure;
246  QPalette p_saveDefaultPalette;
247 
248  ChipViewport *p_leftView;
249  ChipViewport *p_rightView;
250 
251  Cube *p_leftCube;
252  Cube *p_rightCube;
253  ControlMeasure *p_leftMeasure;
254  ControlMeasure *p_rightMeasure;
255  Chip *p_leftChip;
256  Chip *p_rightChip;
257  UniversalGroundMap *p_leftGroundMap;
258  UniversalGroundMap *p_rightGroundMap;
259 
260  AutoReg *p_autoRegFact;
261  QString p_pointId;
262 
263  int p_rotation;
264  bool p_geomIt;
265  bool p_linkZoom;
266  };
267 };
268 
269 #endif
Isis::AutoReg::GoodnessOfFit
double GoodnessOfFit() const
Return the goodness of fit of the match algorithm.
Definition: AutoReg.h:323
Isis::ControlPointEdit::stretchChipViewport
void stretchChipViewport(Stretch *, CubeViewport *)
FileName.h
Isis::ControlPointEdit::updateLeftView
void updateLeftView(double sample, double line)
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::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::ControlPointEdit::allowLeftMouse
void allowLeftMouse(bool allowMouse)
Set the option that allows mouse movements in the left ChipViewport.
Definition: ControlPointEdit.cpp:1554
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::UniversalGroundMap::UniversalLatitude
double UniversalLatitude() const
Returns the universal latitude of the camera model or projection.
Definition: UniversalGroundMap.cpp:247
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::AutoReg::ZScores
void ZScores(double &score1, double &score2) const
Return the ZScores of the pattern chip.
Definition: AutoReg.h:360
Isis::ControlPointEdit::setLeftMeasure
void setLeftMeasure(ControlMeasure *leftMeasure, Cube *leftCube, QString pointId)
Set the measure displayed in the left ChipViewport.
Definition: ControlPointEdit.cpp:663
Isis::ControlPointEdit::~ControlPointEdit
~ControlPointEdit()
Definition: ControlPointEdit.cpp:86
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::ControlPointEdit::saveChips
void saveChips()
Slot to save registration chips to files and fire off qview.
Definition: ControlPointEdit.cpp:1590
Isis::AutoReg::RegistrationSearchChip
Chip * RegistrationSearchChip()
Return pointer to search chip used in registration.
Definition: AutoReg.h:227
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::ControlPointEdit::ControlPointEdit
ControlPointEdit(ControlNet *cnet, QWidget *parent=0, bool allowLeftMouse=false, bool useGeometry=true)
Constructs a ControlPointEdit widget.
Definition: ControlPointEdit.cpp:64
Isis::AutoReg::SearchChip
Chip * SearchChip()
Return pointer to search chip.
Definition: AutoReg.h:207
Isis::ChipViewport::tackSample
double tackSample()
Return the position of cube under cross hair.
Definition: ChipViewport.cpp:353
Isis::ControlPointEdit::newControlNetwork
void newControlNetwork(ControlNet *)
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::ControlPointEdit::setRightMeasure
void setRightMeasure(ControlMeasure *rightMeasure, Cube *rightCube, QString pointId)
Set the measure displayed in the right ChipViewport.
Definition: ControlPointEdit.cpp:724
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::ChipViewport::tackLine
double tackLine()
Returns tack line.
Definition: ChipViewport.cpp:364
IString.h
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::FileName::expanded
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
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
Isis::ControlMeasureLogData::MinimumPixelZScore
@ MinimumPixelZScore
Control measures store z-scores in pairs.
Definition: ControlMeasureLogData.h:76
Isis::ControlPointEdit::colorizeSaveButton
void colorizeSaveButton()
Turn "Save Measure" button text to red.
Definition: ControlPointEdit.cpp:867
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::ControlPointEdit::setTemplateFile
bool setTemplateFile(QString)
Allows user to choose a new template file by opening a window from which to select a filename.
Definition: ControlPointEdit.cpp:1506
Isis::ControlMeasure::Manual
@ Manual
Hand Measured (e.g., qnet)
Definition: ControlMeasure.h:210
Isis::ControlPointEdit::templateFileName
QString templateFileName()
Definition: ControlPointEdit.h:162
Isis::AutoReg::CubeSample
double CubeSample() const
Return the search chip cube sample that best matched.
Definition: AutoReg.h:340
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
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::ControlPointEdit::updateRightView
void updateRightView(double sample, double line)
Isis::ControlPointEdit::measureSaved
void measureSaved()
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
ControlPointEdit.h
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::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::ControlPointEdit
Point Editor Widget.
Definition: ControlPointEdit.h:155
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
ChipViewport.h
Isis::Application::UserName
static QString UserName()
Returns the user name.
Definition: Application.cpp:816
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::ControlPointEdit::refreshChips
void refreshChips()
Definition: ControlPointEdit.cpp:1576
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::ControlMeasure
a control measurement
Definition: ControlMeasure.h:175