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. | |
void | setRightMeasure (ControlMeasure *rightMeasure, Cube *rightCube, QString pointId) |
Set the measure displayed in the right ChipViewport. | |
void | colorizeSaveButton () |
Turn "Save Measure" button text to red. | |
void | refreshChips () |
void | saveChips () |
Slot to save registration chips to files and fire off qview. | |
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. | |
QString | templateFileName () |
bool | setTemplateFile (QString) |
Allows user to choose a new template file by opening a window from which to select a filename. | |
void | allowLeftMouse (bool allowMouse) |
Set the option that allows mouse movements in the left ChipViewport. | |
Private Slots | |
void | setNoGeom () |
Slot to turn off geom. | |
void | setGeom () |
Turn geom on. | |
void | setRotate () |
** | |
void | setCircle (bool) |
Turn circle widgets on/off. | |
void | setZoomLink (bool) |
Turn linking of zoom on or off. | |
void | findPoint () |
Find point from left ChipViewport in the right ChipViewport. | |
void | registerPoint () |
Sub-pixel register point in right chipViewport with point in left. | |
void | saveMeasure () |
Save control measure under the crosshair in right ChipViewport. | |
void | updateLeftPositionLabel (double zoomFactor) |
Update sample/line, lat/lon and zoom factor of left measure. | |
void | updateRightGeom () |
Slot to update the geomed right ChipViewport for zoom operations. | |
void | updateRightPositionLabel (double zoomFactor) |
Update sample/line, lat/lon and zoom factor of right measure. | |
void | blinkStart () |
Slot to start blink function. | |
void | blinkStop () |
Slot to stop blink function. | |
void | changeBlinkTime (double interval) |
Set blink rate. | |
void | updateBlink () |
Slot to cause the blink to happen coinciding with the timer. | |
Private Member Functions | |
void | createPointEditor (QWidget *parent) |
Design the PointEdit widget. | |
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 155 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 64 of file ControlPointEdit.cpp.
References allowLeftMouse(), and createPointEditor().
Isis::ControlPointEdit::~ControlPointEdit | ( | ) |
Definition at line 86 of file ControlPointEdit.cpp.
void Isis::ControlPointEdit::allowLeftMouse | ( | bool | allowMouse | ) |
Set the option that allows mouse movements in the left ChipViewport.
Definition at line 1554 of file ControlPointEdit.cpp.
Referenced by ControlPointEdit().
|
privateslot |
Slot to start blink function.
Definition at line 1441 of file ControlPointEdit.cpp.
References updateBlink().
Referenced by createPointEditor().
|
privateslot |
Slot to stop blink function.
Definition at line 1458 of file ControlPointEdit.cpp.
Referenced by createPointEditor().
|
privateslot |
Set blink rate.
interval | Input Blink rate in seconds |
Definition at line 1475 of file ControlPointEdit.cpp.
Referenced by createPointEditor().
|
slot |
Turn "Save Measure" button text to red.
Definition at line 867 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 118 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 886 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().
|
slot |
Definition at line 1576 of file ControlPointEdit.cpp.
|
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 941 of file ControlPointEdit.cpp.
References 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(), and Isis::AutoReg::ZScores().
Referenced by createPointEditor(), and setTemplateFile().
|
slot |
Slot to save registration chips to files and fire off qview.
Definition at line 1590 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 1119 of file ControlPointEdit.cpp.
References Isis::ControlMeasure::DeleteLogData(), Isis::ControlMeasure::GetCubeSerialNumber(), Isis::AutoReg::GoodnessOfFit(), Isis::ControlMeasureLogData::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::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 1399 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 1316 of file ControlPointEdit.cpp.
References Isis::ChipViewport::geomChip(), 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 663 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 1363 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 724 of file ControlPointEdit.cpp.
References Isis::Chip::Load(), Isis::ChipViewport::setChip(), Isis::Chip::TackCube(), updateRightGeom(), and Isis::IException::User.
Referenced by Isis::StereoTool::loadPoint(), and Isis::MatchTool::selectRightMeasure().
|
privateslot |
**
Slot to enable the rotate dial
Definition at line 1278 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 1506 of file ControlPointEdit.cpp.
References Isis::AutoRegFactory::Create(), Isis::IException::Io, and registerPoint().
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 1429 of file ControlPointEdit.cpp.
References Isis::ChipViewport::zoom(), and Isis::ChipViewport::zoomFactor().
Referenced by createPointEditor().
|
inline |
Definition at line 162 of file ControlPointEdit.h.
|
privateslot |
Slot to cause the blink to happen coinciding with the timer.
Definition at line 1481 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 792 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 1227 of file ControlPointEdit.cpp.
References Isis::ChipViewport::geomChip(), 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 827 of file ControlPointEdit.cpp.
References Isis::UniversalGroundMap::SetImage(), Isis::ChipViewport::tackLine(), Isis::ChipViewport::tackSample(), Isis::UniversalGroundMap::UniversalLatitude(), and Isis::UniversalGroundMap::UniversalLongitude().
Referenced by createPointEditor().
|
private |
Definition at line 209 of file ControlPointEdit.h.
|
private |
Definition at line 238 of file ControlPointEdit.h.
|
private |
Definition at line 243 of file ControlPointEdit.h.
|
private |
Definition at line 239 of file ControlPointEdit.h.
|
private |
Definition at line 260 of file ControlPointEdit.h.
|
private |
Definition at line 242 of file ControlPointEdit.h.
|
private |
Definition at line 229 of file ControlPointEdit.h.
|
private |
Definition at line 228 of file ControlPointEdit.h.
|
private |
Definition at line 233 of file ControlPointEdit.h.
|
private |
Definition at line 235 of file ControlPointEdit.h.
|
private |
Definition at line 231 of file ControlPointEdit.h.
|
private |
Definition at line 232 of file ControlPointEdit.h.
|
private |
Definition at line 220 of file ControlPointEdit.h.
|
private |
Definition at line 264 of file ControlPointEdit.h.
|
private |
Definition at line 241 of file ControlPointEdit.h.
|
private |
Definition at line 255 of file ControlPointEdit.h.
|
private |
Definition at line 251 of file ControlPointEdit.h.
|
private |
Definition at line 257 of file ControlPointEdit.h.
|
private |
Definition at line 217 of file ControlPointEdit.h.
|
private |
Definition at line 253 of file ControlPointEdit.h.
|
private |
Definition at line 215 of file ControlPointEdit.h.
|
private |
Definition at line 248 of file ControlPointEdit.h.
|
private |
Definition at line 213 of file ControlPointEdit.h.
|
private |
Definition at line 265 of file ControlPointEdit.h.
|
private |
Definition at line 219 of file ControlPointEdit.h.
|
private |
Definition at line 240 of file ControlPointEdit.h.
|
private |
Definition at line 261 of file ControlPointEdit.h.
|
private |
Definition at line 256 of file ControlPointEdit.h.
|
private |
Definition at line 252 of file ControlPointEdit.h.
|
private |
Definition at line 258 of file ControlPointEdit.h.
|
private |
Definition at line 218 of file ControlPointEdit.h.
|
private |
Definition at line 254 of file ControlPointEdit.h.
|
private |
Definition at line 216 of file ControlPointEdit.h.
|
private |
Definition at line 249 of file ControlPointEdit.h.
|
private |
Definition at line 223 of file ControlPointEdit.h.
|
private |
Definition at line 214 of file ControlPointEdit.h.
|
private |
Definition at line 221 of file ControlPointEdit.h.
|
private |
Definition at line 222 of file ControlPointEdit.h.
|
private |
Definition at line 263 of file ControlPointEdit.h.
|
private |
Definition at line 246 of file ControlPointEdit.h.
|
private |
Definition at line 245 of file ControlPointEdit.h.
|
private |
Definition at line 236 of file ControlPointEdit.h.
|
private |
Definition at line 212 of file ControlPointEdit.h.
|
private |
Definition at line 227 of file ControlPointEdit.h.
|
private |
Definition at line 226 of file ControlPointEdit.h.
|
private |
Definition at line 210 of file ControlPointEdit.h.