Isis 3 Programmer Reference
|
Point Editor Widget. More...
#include <ControlPointEdit.h>
Public Slots | |
void | setLeftMeasure (ControlMeasure *leftMeasure, Cube *leftCube, QString pointId) |
Set the measure displayed in the left ChipViewport. More... | |
void | setRightMeasure (ControlMeasure *rightMeasure, Cube *rightCube, QString pointId) |
Set the measure displayed in the right ChipViewport. More... | |
void | colorizeSaveButton () |
Turn "Save Measure" button text to red. More... | |
void | refreshChips () |
void | saveChips () |
Slot to save registration chips to files and fire off qview. More... | |
Signals | |
void | updateLeftView (double sample, double line) |
void | updateRightView (double sample, double line) |
void | measureSaved () |
void | newControlNetwork (ControlNet *) |
void | stretchChipViewport (Stretch *, CubeViewport *) |
Public Member Functions | |
ControlPointEdit (ControlNet *cnet, QWidget *parent=0, bool allowLeftMouse=false, bool useGeometry=true) | |
Constructs a ControlPointEdit widget. More... | |
QString | templateFileName () |
bool | setTemplateFile (QString) |
Allows user to choose a new template file by opening a window from which to select a filename. More... | |
void | allowLeftMouse (bool allowMouse) |
Set the option that allows mouse movements in the left ChipViewport. More... | |
Private Slots | |
void | setNoGeom () |
Slot to turn off geom. More... | |
void | setGeom () |
Turn geom on. More... | |
void | setRotate () |
Slot to update the right ChipViewport for zoom operations. More... | |
void | setCircle (bool) |
Turn circle widgets on/off. More... | |
void | setZoomLink (bool) |
Turn linking of zoom on or off. More... | |
void | findPoint () |
Find point from left ChipViewport in the right ChipViewport. More... | |
void | registerPoint () |
Sub-pixel register point in right chipViewport with point in left. More... | |
void | saveMeasure () |
Save control measure under the crosshair in right ChipViewport. More... | |
void | updateLeftPositionLabel (double zoomFactor) |
Update sample/line, lat/lon and zoom factor of left measure. More... | |
void | updateRightGeom () |
Slot to update the geomed right ChipViewport for zoom operations. More... | |
void | updateRightPositionLabel (double zoomFactor) |
Update sample/line, lat/lon and zoom factor of right measure. More... | |
void | blinkStart () |
Slot to start blink function. More... | |
void | blinkStop () |
Slot to stop blink function. More... | |
void | changeBlinkTime (double interval) |
Set blink rate. More... | |
void | updateBlink () |
Slot to cause the blink to happen coinciding with the timer. More... | |
Private Member Functions | |
void | createPointEditor (QWidget *parent) |
Design the PointEdit widget. More... | |
Private Attributes | |
bool | p_allowLeftMouse |
bool | p_useGeometry |
QString | p_templateFileName |
QLabel * | p_leftZoomFactor |
QLabel * | p_rightZoomFactor |
QLabel * | p_leftSampLinePosition |
QLabel * | p_rightSampLinePosition |
QLabel * | p_leftLatLonPosition |
QLabel * | p_rightLatLonPosition |
QRadioButton * | p_nogeom |
QRadioButton * | p_geom |
QToolButton * | p_rightZoomIn |
QToolButton * | p_rightZoomOut |
QToolButton * | p_rightZoom1 |
bool | p_timerOn |
QTimer * | p_timer |
std::vector< ChipViewport * > | p_blinkList |
unsigned char | p_blinkIndex |
QDial * | p_dial |
QLCDNumber * | p_dialNumber |
QDoubleSpinBox * | p_blinkTimeBox |
bool | p_circle |
QScrollBar * | p_slider |
QPushButton * | p_autoReg |
QWidget * | p_autoRegExtension |
QLabel * | p_oldPosition |
QLabel * | p_goodFit |
bool | p_autoRegShown |
bool | p_autoRegAttempted |
QPushButton * | p_saveMeasure |
QPalette | p_saveDefaultPalette |
ChipViewport * | p_leftView |
ChipViewport * | p_rightView |
Cube * | p_leftCube |
Cube * | p_rightCube |
ControlMeasure * | p_leftMeasure |
ControlMeasure * | p_rightMeasure |
Chip * | p_leftChip |
Chip * | p_rightChip |
UniversalGroundMap * | p_leftGroundMap |
UniversalGroundMap * | p_rightGroundMap |
AutoReg * | p_autoRegFact |
QString | p_pointId |
int | p_rotation |
bool | p_geomIt |
bool | p_linkZoom |
Point Editor Widget.
2008-11-19 Tracie Sucharski - Addition option to constructor to allow mouse events on leftChipViewport.
2008-11-24 Tracie Sucharski - Changed class name from PointEdit
2008-12-02 Jeannie Walldren - Modified createPointEditor() to allow the leftChipViewport to refresh even if allowLeftMouse = false.
2008-12-10 Jeannie Walldren - Added a private variable for the template filename. Set the default value of this variable to the previously hard-coded template filename. Added setTemplateFile() method derived from previously unused and commented out method called openTemplateFile().
2008-12-15 Jeannie Walldren - Some QMessageBox warnings had strings tacked on to the list of errors. These strings were changed to iExceptions and added to the error stack to conform with Isis standards.
2008-12-30 Jeannie Walldren - Modified savePoint() method to update user (chooser) name and date when point is saved
2009-03-17 Tracie Sucharski - Add slot to set a boolean to indicate whether the registration chips should be saved.
2010-06-08 Jeannie Walldren - Added warning box in registerPoint() if unable to load left or right chip
2010-06-26 Eric Hyer - now uses MdiCubeViewport instead of CubeViewport. Fixed multiple include problems.
2010-11-17 Eric Hyer - now forwards new ControlNets to the ChipViewports
2010-11-19 Tracie Sucharski - Renamed the "Save Point" button to "Save Measure" along with signals and slots. Add a new "Save Point" button which actually saves the edit point to the network.
2010-11-22 Eric Hyer - Forwarded SIGNAL from StretchTool to ChipViewports
2010-12-01 Eric Hyer - Added checkboxes for stretch locking
2010-12-08 Eric Hyer - Relocated stretch locking checkboxes
2010-12-14 Eric Hyer - setTemplateFile now takes the filename as a parameter (no more open dialog!)
2011-05-04 Jai Rideout - updated saveChips() to reference new AutoReg API for accessing chips used in registration.
2011-06-14 Tracie Sucharski - Added slot to colorize the Save Measure button. If user moved the tack point, the button text will be changed to red. If they push the save button, button will go back to black.
2011-06-15 Tracie Sucharski - Changed signal mouseClick to userMovedTackPoint. TODO: Could not use tackPointChanged signal because that signal is emitted whenever the measure is loaded not just when the user initiates the move. This should be cleaned up.
2012-04-17 Tracie Sucharski - If geom is turned on update the right measure in ::setLeftMeasure.
2012-05-01 Tracie Sucharski - Fix intereface between No Geom, geom and rotate. Make sure resets are done properly when switching beween the options.
2012-05-07 Tracie Sucharski - Change made on 2012-04-17 introduced bug when loading a different control point, so in setLeftMeasure, only update the right chip if we're not loading a different control point.
2012-06-28 Tracie Sucharski - Add parameter to constructor to indicate whether to use cube geometry. This allow cubes with no camera or SPICE information to be used.
2012-07-20 Tracie Sucharski - Change the Save Measure button text and tootip depending on whether movement is allowed on the left chip.
2012-07-26 Tracie Sucharski - Added ability to link zooming between left and right viewports. Added 2 methods, zoomFactor() which returns a zoom factor and zoom(double zoomFactor).
2013-04-30 Tracie Sucharski - Fixed bug introduced by linking zooms between left and right viewports. Zoom factors were being passed into the Chip::Load method as the second argument which should be the rotation value.
2013-11-07 Tracie Sucharski - Moved error checking on edit locked measures from QnetTool::measureSaved to ::saveMeasure. The error checking now forces the edit lock check box to be unchecked before the measure can be saved. Fixes #1624.
2013-12-30 Kimberly Oyama and Stuart Sides - In saveChips(), added single quotes around the file names in case there are spaces or other special characters in them. Fixes #1551.
2015-01-13 Ian Humphrey - Modified setTemplateFile() so opening a template file will undo registration if a point is already registered. Modified saveMeasure() to handle exception thrown by ControlMeasure::SetLogData(). Fixes #2041.
2015-10-29 Ian Humphrey - Added shortcuts for Register (R), Save Measure (M), Undo Registration (U), and Find (F). Fixes #2324.
2017-04-25 Marjorie Hahn - Moved AutoRegFactory creation from the constructor to ControlPointEdit::registerPoint() so that AutoRegFactory is not created until it is needed. Fixes #4590.
Definition at line 147 of file ControlPointEdit.h.
Isis::ControlPointEdit::ControlPointEdit | ( | ControlNet * | cnet, |
QWidget * | parent = 0 , |
||
bool | allowLeftMouse = false , |
||
bool | useGeometry = true |
||
) |
Constructs a ControlPointEdit widget.
parent | Input Parent of widget |
allowLeftMouse | Input Allow/Disallow mouse events on Left ChipViewport |
2008-15-2008 Jeannie Walldren - Added error string to iException::Message before creating QMessageBox
2017-04-21 Marjorie Hahn - Moved p_autoRegFact creation from constructor to registerPoint() method.
Definition at line 56 of file ControlPointEdit.cpp.
References allowLeftMouse(), and createPointEditor().
void Isis::ControlPointEdit::allowLeftMouse | ( | bool | allowMouse | ) |
Set the option that allows mouse movements in the left ChipViewport.
Definition at line 1546 of file ControlPointEdit.cpp.
Referenced by ControlPointEdit().
|
privateslot |
Slot to start blink function.
Definition at line 1433 of file ControlPointEdit.cpp.
References updateBlink().
Referenced by createPointEditor().
|
privateslot |
Slot to stop blink function.
Definition at line 1450 of file ControlPointEdit.cpp.
Referenced by createPointEditor().
|
privateslot |
Set blink rate.
interval | Input Blink rate in seconds |
Definition at line 1467 of file ControlPointEdit.cpp.
Referenced by createPointEditor().
|
slot |
Turn "Save Measure" button text to red.
Definition at line 859 of file ControlPointEdit.cpp.
Referenced by createPointEditor(), findPoint(), and registerPoint().
|
private |
Design the PointEdit widget.
2008-11-19 Tracie Sucharski - Added left pan buttons, but default to hidden.
2008-12-02 Jeannie Walldren - Allow connection between updateLeftView and refreshView for all objects. Previously this was only done if allowLeftMouse = true.
2008-12-02 Tracie Sucharski - Another bug fix due to change on 2008-11-19, The leftView tackPointChanged connection needs to always be made whether mouse button events are allowed or not.
2008-12-10 Jeannie Walldren - Set the default value of the new private variable, p_templateFileName, to the previously hard-coded template filename.
2015-10-29 Ian Humphrey - Added shortcuts for Find (F), Register (R), Undo Registration (U), and Save Measure (M) buttons. Fixes #2324.
Definition at line 110 of file ControlPointEdit.cpp.
References blinkStart(), blinkStop(), changeBlinkTime(), colorizeSaveButton(), Isis::FileName::expanded(), findPoint(), registerPoint(), saveMeasure(), setCircle(), setGeom(), setNoGeom(), setRotate(), setZoomLink(), updateLeftPositionLabel(), updateRightGeom(), updateRightPositionLabel(), and Isis::VIEWSIZE.
Referenced by ControlPointEdit().
|
privateslot |
Find point from left ChipViewport in the right ChipViewport.
Definition at line 878 of file ControlPointEdit.cpp.
References colorizeSaveButton(), Isis::UniversalGroundMap::Line(), Isis::UniversalGroundMap::Sample(), Isis::UniversalGroundMap::SetImage(), Isis::UniversalGroundMap::SetUniversalGround(), Isis::ChipViewport::tackLine(), Isis::ChipViewport::tackSample(), Isis::UniversalGroundMap::UniversalLatitude(), and Isis::UniversalGroundMap::UniversalLongitude().
Referenced by createPointEditor().
|
privateslot |
Sub-pixel register point in right chipViewport with point in left.
2008-15-2008 Jeannie Walldren - Throw and catch error before creating QMessageBox
2009-03-23 Tracie Sucharski - Added private p_autoRegAttempted for the SaveChips method.
2010-02-16 Tracie Sucharski- If autoreg fails, print registration stats.
2010-02-18 Tracie Sucharski - Registration stats wasn't the correct info to print. Instead, check registrationStatus and print separate errors for each possibility.
2010-02-22 Tracie Sucharski - Added more info for registration failures.
2010-06-08 Jeannie Walldren - Catch error and warn user if unable to load pattern (left) or search (right) chip
2010-10-12 Tracie Sucharski - Clean up try/catch blocks.
2011-06-27 Tracie Sucharski - If un-doing registration, change save button back to black. If registration successful, change save button to red.
2011-10-21 Tracie Sucharski - Add try/catch around registration to catch errors thrown from autoreg class.
2017-04-21 Marjorie Hahn - Added auto registration factory creation.
Definition at line 933 of file ControlPointEdit.cpp.
References _FILEINFO_, Isis::AutoReg::AdaptiveAlgorithmFailed, colorizeSaveButton(), Isis::AutoRegFactory::Create(), Isis::AutoReg::CubeLine(), Isis::AutoReg::CubeSample(), Isis::AutoReg::Distance(), Isis::AutoReg::DistanceTolerance(), Isis::AutoReg::FitChipNoData, Isis::AutoReg::FitChipToleranceNotMet, Isis::AutoReg::GoodnessOfFit(), Isis::IException::Io, Isis::Chip::Load(), Isis::AutoReg::MinimumZScore(), Isis::AutoReg::PatternChip(), Isis::AutoReg::PatternChipNotEnoughValidData, Isis::AutoReg::PatternValidPercent(), Isis::AutoReg::PatternZScoreNotMet, Isis::AutoReg::Register(), Isis::AutoReg::SearchChip(), Isis::AutoReg::Success(), Isis::AutoReg::SurfaceModelDistanceInvalid, Isis::AutoReg::SurfaceModelNotEnoughValidData, Isis::AutoReg::SurfaceModelSolutionInvalid, Isis::Chip::TackCube(), Isis::AutoReg::Tolerance(), Isis::IException::toString(), and Isis::AutoReg::ZScores().
Referenced by createPointEditor(), and setTemplateFile().
|
slot |
Slot to save registration chips to files and fire off qview.
Definition at line 1582 of file ControlPointEdit.cpp.
References Isis::AutoReg::FitChip(), Isis::AutoReg::RegistrationPatternChip(), Isis::AutoReg::RegistrationSearchChip(), Isis::ProgramLauncher::RunSystemCommand(), Isis::toString(), and Isis::Chip::Write().
Referenced by Isis::MatchTool::saveChips().
|
privateslot |
Save control measure under the crosshair in right ChipViewport.
2008-12-30 Jeannie Walldren - Modified to update user (chooser) name and date when point is saved
2010-11-19 Tracie Sucharski - Renamed from savePoint.
2011-03-04 Tracie Sucharski - If auto reg info is shown, save the GoodnessOfFit value to the right ControlMeasure log entry. Changed the way the left viewport is updated if the left and right measure are the same. Simply copy the right measure into the left and re-load the left measure. If measure currently has type of subPixelRegistered, but the new position has not be sub-pixel registered, change measure type and get rid of goodness of fit.
2011-06-14 Tracie Sucharski - Change Save Measure button text back to black.
2011-07-19 Tracie Sucharski - Updated for new functionality of registration pixel shift. ControlMeasure will now calculate based on aprioriSample/Line and current coordinate. If autoreg has been calculated, save coordinate to apriori before updating to subpixel registered coordinate.
2013-11-07 Tracie Sucharski - Moved error checking on edit locked measures from QnetTool::measureSaved to ::saveMeasure. The error checking now forces the edit lock check box to be unchecked before the measure can be saved.
2015-01-09 Ian Humphrey - Modified to prevent segmentation fault that arises when registering, opening a template file, and saving the measure. This was caused by not handling the exception thrown by ControlMeasure::SetLogData(), which produces undefined behavior within the Qt signal-slot connection mechanism.
Definition at line 1111 of file ControlPointEdit.cpp.
References Isis::ControlMeasure::DeleteLogData(), Isis::ControlMeasure::GetCubeSerialNumber(), Isis::ControlMeasureLogData::GoodnessOfFit, Isis::AutoReg::GoodnessOfFit(), Isis::ControlMeasure::IsEditLocked(), Isis::ControlMeasure::Manual, Isis::ControlMeasureLogData::MaximumPixelZScore, Isis::ControlMeasureLogData::MinimumPixelZScore, Isis::ControlMeasure::RegisteredSubPixel, Isis::ControlMeasure::SetChooserName(), Isis::ControlMeasure::SetCoordinate(), Isis::ControlMeasure::SetDateTime(), setLeftMeasure(), Isis::ControlMeasure::SetLogData(), Isis::ControlMeasure::SetType(), Isis::ChipViewport::tackLine(), Isis::ChipViewport::tackSample(), Isis::IException::toString(), Isis::Application::UserName(), and Isis::AutoReg::ZScores().
Referenced by createPointEditor().
|
privateslot |
Turn circle widgets on/off.
checked | Input Turn cirle on or off |
Definition at line 1391 of file ControlPointEdit.cpp.
References Isis::ChipViewport::setCircle().
Referenced by createPointEditor().
|
privateslot |
Turn geom on.
2007-06-15 Tracie Sucharski - Grey out zoom buttons
2008-15-2008 Jeannie Walldren - Added error string to iException::Message before creating QMessageBox
Definition at line 1308 of file ControlPointEdit.cpp.
References _FILEINFO_, Isis::ChipViewport::geomChip(), Isis::IException::toString(), and Isis::IException::User.
Referenced by createPointEditor().
|
slot |
Set the measure displayed in the left ChipViewport.
leftMeasure | Input Measure displayed in left ChipViewport |
leftCube | Input Cube of measure displayed in left ChipViewport |
2008-11-19 Tracie Sucharski - If left cube changes, get new universalGroundMap.
2012-04-17 Tracie Sucharski - If geom is turned on update the right measure.
2012-05-07 Tracie Sucharski - Last change introduced bug when loading a different control point, so only update the right chip if we're not loading a different control point.
2013-04-30 Tracie Sucharski - Fixed bug introduced by linking zooms between left and right viewports. Zoom factors were being passed into the Chip::Load method as the second argument which should be the rotation value.
Definition at line 655 of file ControlPointEdit.cpp.
References Isis::Chip::Load(), Isis::ChipViewport::setChip(), Isis::Chip::TackCube(), and updateRightGeom().
Referenced by Isis::StereoTool::loadPoint(), Isis::MatchTool::measureSaved(), saveMeasure(), and Isis::MatchTool::selectLeftMeasure().
|
privateslot |
Slot to turn off geom.
Definition at line 1355 of file ControlPointEdit.cpp.
References Isis::ChipViewport::nogeomChip().
Referenced by createPointEditor().
|
slot |
Set the measure displayed in the right ChipViewport.
rightMeasure | Input Measure displayed in right ChipViewport |
rightCube | Input Cube of measure displayed in right ChipViewport |
2008-11-19 Tracie Sucharski - If right cube changes, get new universalGroundMap.
2008-15-2008 Jeannie Walldren - Added error string to iException::Message before creating QMessageBox
2009-09-14 Tracie Sucharski - Call geomChip to make sure left chip is initialized in the ChipViewport. This was done for the changes made to the Chip class and the ChipViewport class where the Cube info is no longer stored.
2013-04-30 Tracie Sucharski - Fixed bug introduced by linking zooms between left and right viewports. Zoom factors were being passed into the Chip::Load method as the second argument which should be the rotation value.
Definition at line 716 of file ControlPointEdit.cpp.
References _FILEINFO_, Isis::Chip::Load(), Isis::ChipViewport::setChip(), Isis::Chip::TackCube(), Isis::IException::toString(), updateRightGeom(), and Isis::IException::User.
Referenced by Isis::StereoTool::loadPoint(), and Isis::MatchTool::selectRightMeasure().
|
privateslot |
Slot to update the right ChipViewport for zoom operations.
Slot to enable the rotate dial
Definition at line 1270 of file ControlPointEdit.cpp.
References Isis::ChipViewport::nogeomChip().
Referenced by createPointEditor().
bool Isis::ControlPointEdit::setTemplateFile | ( | QString | fn | ) |
Allows user to choose a new template file by opening a window from which to select a filename.
This file is then registered and set as the new template.
2008-12-10 Jeannie Walldren - Changed name from openTemplateFile() and added functionality to set new template filename to the private variable, p_templateFileName
2008-12-15 Jeannie Walldren - Modified code to only allow the template file to be modified if registration is successfull, otherwise the original template file is kept.
2014-12-11 Ian Humphrey - Modified code so opening a template file will undo registration if a point is already registered.
Definition at line 1498 of file ControlPointEdit.cpp.
References _FILEINFO_, Isis::AutoRegFactory::Create(), Isis::IException::Io, registerPoint(), and Isis::IException::toString().
Referenced by Isis::MatchTool::openTemplateFile(), Isis::StereoTool::setTemplateFile(), and Isis::MatchTool::writeTemplateFile().
|
privateslot |
Turn linking of zoom on or off.
checked | Input Turn zoom linking on or off |
Definition at line 1421 of file ControlPointEdit.cpp.
References Isis::ChipViewport::zoom(), and Isis::ChipViewport::zoomFactor().
Referenced by createPointEditor().
|
privateslot |
Slot to cause the blink to happen coinciding with the timer.
Definition at line 1473 of file ControlPointEdit.cpp.
References Isis::ChipViewport::loadView().
Referenced by blinkStart().
|
privateslot |
Update sample/line, lat/lon and zoom factor of left measure.
zoomFactor | Input zoom factor |
Definition at line 784 of file ControlPointEdit.cpp.
References Isis::UniversalGroundMap::SetImage(), Isis::ChipViewport::tackLine(), Isis::ChipViewport::tackSample(), Isis::UniversalGroundMap::UniversalLatitude(), Isis::UniversalGroundMap::UniversalLongitude(), Isis::ChipViewport::zoom(), and Isis::ChipViewport::zoomFactor().
Referenced by createPointEditor().
|
privateslot |
Slot to update the geomed right ChipViewport for zoom operations.
Definition at line 1219 of file ControlPointEdit.cpp.
References _FILEINFO_, Isis::ChipViewport::geomChip(), Isis::IException::toString(), and Isis::IException::User.
Referenced by createPointEditor(), setLeftMeasure(), and setRightMeasure().
|
privateslot |
Update sample/line, lat/lon and zoom factor of right measure.
zoomFactor | Input zoom factor |
Definition at line 819 of file ControlPointEdit.cpp.
References Isis::UniversalGroundMap::SetImage(), Isis::ChipViewport::tackLine(), Isis::ChipViewport::tackSample(), Isis::UniversalGroundMap::UniversalLatitude(), and Isis::UniversalGroundMap::UniversalLongitude().
Referenced by createPointEditor().