Isis 3.0 Programmer Reference
Back | Home
Isis::ControlMeasureEditWidget Class Reference

Point Editor Widget. More...

#include <ControlMeasureEditWidget.h>

Inheritance diagram for Isis::ControlMeasureEditWidget:
Inheritance graph
Collaboration diagram for Isis::ControlMeasureEditWidget:
Collaboration graph

Public Slots

void setPoint (ControlPoint *editPoint, SerialNumberList *snList)
 
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

 ControlMeasureEditWidget (QWidget *parent=0, bool allowLeftMouse=false, bool useGeometry=true)
 Constructs a ControlMeasureEditWidget widget. More...
 
 ~ControlMeasureEditWidget ()
 Destructor. More...
 
QString templateFileName ()
 Returns the template filename used for auto-registration. More...
 
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...
 
void showBlinkExtension ()
 
void blinkStartRight ()
 Slot to start blink function. More...
 
void blinkStopRight ()
 Slot to stop blink function. More...
 
void changeBlinkTimeRight (double interval)
 Set blink rate. More...
 
void updateBlinkRight ()
 Slot to cause the blink to happen coinciding with the timer. More...
 

Private Member Functions

void createMeasureEditor (QWidget *parent)
 Design the MeasureEdit widget. More...
 

Private Attributes

bool m_allowLeftMouse
 Whether or not to allow mouse events on left chip viewport. More...
 
bool m_useGeometry
 Whether or not to allow geometry/rotation on right chip viewport. More...
 
QString m_templateFileName
 Registration template filename. More...
 
QLabel * m_leftZoomFactor
 Label for left chip viewport's zoom factor. More...
 
QLabel * m_rightZoomFactor
 Label for right chip viewport's zoom factor. More...
 
QLabel * m_leftSampLinePosition
 Label for left chip viewport's current sample/line. More...
 
QLabel * m_rightSampLinePosition
 Label for right chip viewport's current sample/line. More...
 
QLabel * m_leftLatLonPosition
 Label for left chip viewport's current lat/lon. More...
 
QLabel * m_rightLatLonPosition
 Label for right chip viewport's current lat/lon. More...
 
QRadioButton * m_nogeom
 Radio button to remove geometry/rotation for right chip viewport. More...
 
QRadioButton * m_geom
 Radio button to apply geometry/rotation to right chip viewport. More...
 
QToolButton * m_rightZoomIn
 Button for zooming in right chip viewport. More...
 
QToolButton * m_rightZoomOut
 Button for zooming out right chip viewport. More...
 
QToolButton * m_rightZoom1
 Button for 1:1 zoom on right chip viewport. More...
 
bool m_timerOn
 Indicates if the blink timer is on. More...
 
QTimer * m_timer
 Timer on the blinking. More...
 
QList< ChipViewport * > m_blinkList
 List of chip viewports to blink. More...
 
unsigned char m_blinkIndex
 Index of the chip to load in the left chip viewport. More...
 
QDial * m_dial
 Rotation dial. More...
 
QLCDNumber * m_dialNumber
 The current amount of rotation (in degrees) More...
 
QDoubleSpinBox * m_blinkTimeBox
 The current blink step (in seconds) More...
 
bool m_circle
 Whether or not to draw circle in center of the right chip viewport. More...
 
QScrollBar * m_slider
 Slider that controls the size of the center circle. More...
 
QPushButton * m_autoReg
 Button to auto-register the measure. More...
 
QWidgetm_autoRegExtension
 Widget that shows after registering a measure. More...
 
QLabel * m_oldPosition
 The old sample and line before registering. More...
 
QLabel * m_goodFit
 The goodness of fit value after registering. More...
 
bool m_autoRegShown
 Whether or not the auto-reg extension is shown. More...
 
bool m_autoRegAttempted
 Whether or not auto-registration has been attempted. More...
 
QPushButton * m_saveMeasure
 Button to save the current measure. More...
 
QPalette m_saveDefaultPalette
 Default color palette for the Save button. More...
 
ChipViewportm_leftView
 Left ChipViewport. More...
 
ChipViewportm_rightView
 Right ChipViewport. More...
 
Cubem_leftCube
 Left chip viewport's Cube. More...
 
Cubem_rightCube
 Right chip viewport's Cube. More...
 
ControlMeasurem_leftMeasure
 Left ControlMeasure. More...
 
ControlMeasurem_rightMeasure
 Right ControlMeasure. More...
 
Chipm_leftChip
 Left Chip. More...
 
Chipm_rightChip
 Right Chip. More...
 
UniversalGroundMapm_leftGroundMap
 UniversalGroundMap for left cube. More...
 
UniversalGroundMapm_rightGroundMap
 UniversalGroundMap for right cube. More...
 
AutoRegm_autoRegFact
 Created AutoReg. More...
 
QString m_pointId
 Associated control point id of the right measure. More...
 
int m_rotation
 Amount to rotate right chip viewport TODO Is this used?? More...
 
bool m_geomIt
 Apply geometry to the right chip viewport. More...
 
bool m_linkZoom
 Link zoom factors between chip viewports. More...
 
ControlPointm_editPoint
 
SerialNumberListm_serialNumberList
 
QWidgetm_blinkExtension
 
QListWidget * m_blinkListWidget
 
QDoubleSpinBox * m_blinkTimeBoxRight
 
bool m_timerOnRight
 
QTimer * m_timerRight
 
QList< ChipViewport * > m_blinkChipViewportListRight
 
unsigned char m_blinkIndexRight
 

Detailed Description

Point Editor Widget.

Author
2008-09-09 Tracie Sucharski
History:

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.

2014-07-03 Tracie Sucharski - Renamed from ControlPointEdit for IPCE.

2016-04-28 Tracie Sucharski - Removed position information, this will be shown in ControlNetEditor type view. Added blink capability.

2016-06-27 Ian Humphrey - Updated documentation and coding standards. Fixes #4004.

Todo:
Re-think design of the change made on 2012-07-26. The linking was put into ::updateLeftPositionLabel because it was the fastest solution, but should this be put somewhere else.

Definition at line 145 of file ControlMeasureEditWidget.h.

Constructor & Destructor Documentation

Isis::ControlMeasureEditWidget::ControlMeasureEditWidget ( QWidget parent = 0,
bool  allowLeftMouse = false,
bool  useGeometry = true 
)

Constructs a ControlMeasureEditWidget widget.

Parameters
parent[in]Parent of widget
allowLeftMouse[in]Allow/Disallow mouse events on Left ChipViewport
useGeometry[in]Allow/Disallow geometry and rotation on right ChipViewport
Exceptions
IException::Io"Cannot create AutoRegFactory. As a result, sub-pixel registration will not work."
Author
Tracie Sucharski
History:
2008-15-?? Jeannie Walldren - Added error string to iException::Message before creating QMessageBox

Definition at line 58 of file ControlMeasureEditWidget.cpp.

References _FILEINFO_, allowLeftMouse(), Isis::AutoRegFactory::Create(), createMeasureEditor(), Isis::IException::Io, m_allowLeftMouse, m_autoRegFact, m_leftCube, m_leftGroundMap, m_rightCube, m_rightGroundMap, m_rotation, m_templateFileName, m_timerOn, m_useGeometry, and Isis::IException::toString().

Isis::ControlMeasureEditWidget::~ControlMeasureEditWidget ( )

Destructor.

Definition at line 97 of file ControlMeasureEditWidget.cpp.

References m_leftChip, and m_rightChip.

Member Function Documentation

void Isis::ControlMeasureEditWidget::allowLeftMouse ( bool  allowMouse)

Set the option that allows mouse movements in the left ChipViewport.

Parameters
allowMouseWhether or not to allow mouse event on left chip viewport
Author
Tracie Sucharski

Definition at line 1545 of file ControlMeasureEditWidget.cpp.

References m_allowLeftMouse, and m_saveMeasure.

Referenced by ControlMeasureEditWidget().

void Isis::ControlMeasureEditWidget::blinkStart ( )
privateslot

Slot to start blink function.

Definition at line 1433 of file ControlMeasureEditWidget.cpp.

References m_blinkIndex, m_blinkList, m_blinkTimeBox, m_leftView, m_rightView, m_timer, m_timerOn, and updateBlink().

Referenced by createMeasureEditor().

void Isis::ControlMeasureEditWidget::blinkStartRight ( )
privateslot
void Isis::ControlMeasureEditWidget::blinkStop ( )
privateslot

Slot to stop blink function.

Definition at line 1452 of file ControlMeasureEditWidget.cpp.

References m_blinkList, m_leftView, m_timer, and m_timerOn.

Referenced by createMeasureEditor().

void Isis::ControlMeasureEditWidget::blinkStopRight ( )
privateslot

Slot to stop blink function.

Definition at line 1688 of file ControlMeasureEditWidget.cpp.

References m_rightView.

Referenced by createMeasureEditor().

void Isis::ControlMeasureEditWidget::changeBlinkTime ( double  interval)
privateslot

Set blink rate.

Parameters
interval[in]Blink rate in seconds
Author
Tracie Sucharski

Definition at line 1469 of file ControlMeasureEditWidget.cpp.

References m_timer, and m_timerOn.

Referenced by createMeasureEditor().

void Isis::ControlMeasureEditWidget::changeBlinkTimeRight ( double  interval)
privateslot

Set blink rate.

Parameters
intervalInput Blink rate in seconds
Author
Tracie Sucharski

Definition at line 1704 of file ControlMeasureEditWidget.cpp.

Referenced by createMeasureEditor().

void Isis::ControlMeasureEditWidget::colorizeSaveButton ( )
slot

Turn "Save Measure" button text to red.

Author
2011-06-14 Tracie Sucharski

Definition at line 888 of file ControlMeasureEditWidget.cpp.

References m_saveMeasure.

Referenced by createMeasureEditor(), findPoint(), and registerPoint().

void Isis::ControlMeasureEditWidget::createMeasureEditor ( QWidget parent)
private

Design the MeasureEdit widget.

Parameters
parentThe parent QWidget
Author
Tracie Sucharski
History:

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, m_templateFileName, to the previously hard-coded template filename.

Definition at line 128 of file ControlMeasureEditWidget.cpp.

References blinkStart(), blinkStartRight(), blinkStop(), blinkStopRight(), changeBlinkTime(), changeBlinkTimeRight(), colorizeSaveButton(), findPoint(), m_allowLeftMouse, m_autoReg, m_autoRegAttempted, m_autoRegExtension, m_autoRegShown, m_blinkTimeBox, m_dial, m_dialNumber, m_geom, m_geomIt, m_goodFit, m_leftChip, m_leftView, m_leftZoomFactor, m_linkZoom, m_nogeom, m_oldPosition, m_rightChip, m_rightView, m_rightZoom1, m_rightZoomFactor, m_rightZoomIn, m_rightZoomOut, m_rotation, m_saveDefaultPalette, m_saveMeasure, m_slider, m_useGeometry, registerPoint(), saveMeasure(), setCircle(), setGeom(), setNoGeom(), setRotate(), setZoomLink(), updateLeftPositionLabel(), updateRightGeom(), updateRightPositionLabel(), and Isis::VIEWSIZE.

Referenced by ControlMeasureEditWidget().

void Isis::ControlMeasureEditWidget::findPoint ( )
privateslot
void Isis::ControlMeasureEditWidget::registerPoint ( )
privateslot

Sub-pixel register point in right chipViewport with point in left.

History:

2008-15-?? Jeannie Walldren - Throw and catch error before creating QMessageBox

2009-03-23 Tracie Sucharski - Added private m_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.

Definition at line 961 of file ControlMeasureEditWidget.cpp.

References Isis::AutoReg::AdaptiveAlgorithmFailed, colorizeSaveButton(), Isis::AutoReg::CubeLine(), Isis::AutoReg::CubeSample(), Isis::AutoReg::Distance(), Isis::AutoReg::DistanceTolerance(), Isis::AutoReg::FitChipNoData, Isis::AutoReg::FitChipToleranceNotMet, Isis::AutoReg::GoodnessOfFit(), Isis::Chip::Load(), m_autoReg, m_autoRegAttempted, m_autoRegExtension, m_autoRegFact, m_autoRegShown, m_goodFit, m_leftCube, m_leftMeasure, m_oldPosition, m_rightCube, m_rightMeasure, m_saveDefaultPalette, m_saveMeasure, m_useGeometry, 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 createMeasureEditor().

void Isis::ControlMeasureEditWidget::saveChips ( )
slot

Slot to save registration chips to files and fire off qview.

Author
2009-03-18 Tracie Sucharski
History:
2009-03-23 Tracie Sucharski - Use m_autoRegAttempted to see if chips exist.

Definition at line 1582 of file ControlMeasureEditWidget.cpp.

References Isis::AutoReg::FitChip(), m_autoRegAttempted, m_autoRegFact, m_leftMeasure, m_pointId, m_rightMeasure, Isis::AutoReg::RegistrationPatternChip(), Isis::AutoReg::RegistrationSearchChip(), Isis::ProgramLauncher::RunSystemCommand(), Isis::toString(), and Isis::Chip::Write().

void Isis::ControlMeasureEditWidget::saveMeasure ( )
privateslot

Save control measure under the crosshair in right ChipViewport.

History:

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.

Definition at line 1117 of file ControlMeasureEditWidget.cpp.

References Isis::ControlMeasure::DeleteLogData(), Isis::ControlMeasure::GetCubeSerialNumber(), Isis::ControlMeasureLogData::GoodnessOfFit, Isis::AutoReg::GoodnessOfFit(), Isis::ControlMeasure::IsEditLocked(), m_allowLeftMouse, m_autoReg, m_autoRegExtension, m_autoRegFact, m_autoRegShown, m_leftCube, m_leftMeasure, m_leftView, m_pointId, m_rightMeasure, m_rightView, m_saveDefaultPalette, m_saveMeasure, 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 createMeasureEditor().

void Isis::ControlMeasureEditWidget::setCircle ( bool  checked)
privateslot

Turn circle widgets on/off.

Parameters
checked[in]Turn cirle on or off
Author
2008-09-09 Tracie Sucharski

Definition at line 1390 of file ControlMeasureEditWidget.cpp.

References m_circle, m_leftView, m_rightView, m_slider, and Isis::ChipViewport::setCircle().

Referenced by createMeasureEditor().

void Isis::ControlMeasureEditWidget::setGeom ( )
privateslot

Turn geom on.

History:

2007-06-15 Tracie Sucharski - Grey out zoom buttons

2008-15-?? Jeannie Walldren - Added error string to iException::Message before creating QMessageBox

Definition at line 1305 of file ControlMeasureEditWidget.cpp.

References _FILEINFO_, Isis::ChipViewport::geomChip(), m_dial, m_dialNumber, m_geom, m_geomIt, m_leftChip, m_leftCube, m_nogeom, m_rightView, m_rightZoom1, m_rightZoomIn, m_rightZoomOut, Isis::IException::toString(), and Isis::IException::User.

Referenced by createMeasureEditor().

void Isis::ControlMeasureEditWidget::setLeftMeasure ( ControlMeasure leftMeasure,
Cube leftCube,
QString  pointId 
)
slot

Set the measure displayed in the left ChipViewport.

Parameters
leftMeasure[in]Measure displayed in left ChipViewport
leftCube[in]Cube of measure displayed in left ChipViewport
pointId[in]Control point id associated with the left measure
Author
Tracie Sucharski
History:

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 720 of file ControlMeasureEditWidget.cpp.

References Isis::Chip::Load(), m_autoReg, m_autoRegExtension, m_autoRegShown, m_geomIt, m_leftChip, m_leftCube, m_leftGroundMap, m_leftMeasure, m_leftView, m_pointId, m_useGeometry, Isis::ChipViewport::setChip(), Isis::Chip::TackCube(), and updateRightGeom().

Referenced by saveMeasure().

void Isis::ControlMeasureEditWidget::setNoGeom ( )
privateslot

Slot to turn off geom.

History:
2012-05-01 Tracie Sucharski - Reset zoom buttons and rotate dial, then reload chip

Definition at line 1354 of file ControlMeasureEditWidget.cpp.

References m_dial, m_dialNumber, m_geomIt, m_rightView, m_rightZoom1, m_rightZoomIn, m_rightZoomOut, and Isis::ChipViewport::nogeomChip().

Referenced by createMeasureEditor().

void Isis::ControlMeasureEditWidget::setRightMeasure ( ControlMeasure rightMeasure,
Cube rightCube,
QString  pointId 
)
slot

Set the measure displayed in the right ChipViewport.

Parameters
rightMeasure[in]Measure displayed in right ChipViewport
rightCube[in]Cube of measure displayed in right ChipViewport
pointId[in]Control point id associated with the measure
Author
Tracie Sucharski
History:

2008-11-19 Tracie Sucharski - If right cube changes, get new universalGroundMap.

2008-15-?? 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 779 of file ControlMeasureEditWidget.cpp.

References _FILEINFO_, Isis::Chip::Load(), m_autoReg, m_autoRegAttempted, m_autoRegExtension, m_autoRegShown, m_geom, m_geomIt, m_leftChip, m_leftCube, m_nogeom, m_pointId, m_rightChip, m_rightCube, m_rightGroundMap, m_rightMeasure, m_rightView, m_saveDefaultPalette, m_saveMeasure, m_useGeometry, Isis::ChipViewport::setChip(), Isis::Chip::TackCube(), Isis::IException::toString(), updateRightGeom(), and Isis::IException::User.

void Isis::ControlMeasureEditWidget::setRotate ( )
privateslot

Slot to update the right ChipViewport for zoom operations.

Author
2012-07-26 Tracie Sucharski

Slot to enable the rotate dial

History:
2012-05-01 Tracie Sucharski - Reset zoom buttons and reload chip

Definition at line 1266 of file ControlMeasureEditWidget.cpp.

References m_dial, m_dialNumber, m_geomIt, m_rightView, m_rightZoom1, m_rightZoomIn, m_rightZoomOut, and Isis::ChipViewport::nogeomChip().

Referenced by createMeasureEditor().

bool Isis::ControlMeasureEditWidget::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.

Parameters
fnTemplate filename
Author
Tracie Sucharski
History:

2008-12-10 Jeannie Walldren - Changed name from openTemplateFile() and added functionality to set new template filename to the private variable, m_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.

Definition at line 1502 of file ControlMeasureEditWidget.cpp.

References _FILEINFO_, Isis::AutoRegFactory::Create(), Isis::IException::Io, m_autoRegFact, m_templateFileName, and Isis::IException::toString().

void Isis::ControlMeasureEditWidget::setZoomLink ( bool  checked)
privateslot

Turn linking of zoom on or off.

Parameters
checked[in]Turn zoom linking on or off
Author
2012-07-26 Tracie Sucharski

Definition at line 1419 of file ControlMeasureEditWidget.cpp.

References m_leftView, m_linkZoom, m_rightView, Isis::ChipViewport::zoom(), and Isis::ChipViewport::zoomFactor().

Referenced by createMeasureEditor().

QString Isis::ControlMeasureEditWidget::templateFileName ( )
inline

Returns the template filename used for auto-registration.

Returns
QString Template filename

Definition at line 157 of file ControlMeasureEditWidget.h.

References m_templateFileName.

void Isis::ControlMeasureEditWidget::updateBlink ( )
privateslot

Slot to cause the blink to happen coinciding with the timer.

Definition at line 1477 of file ControlMeasureEditWidget.cpp.

References Isis::ChipViewport::loadView(), m_blinkIndex, m_blinkList, and m_leftView.

Referenced by blinkStart().

void Isis::ControlMeasureEditWidget::updateBlinkRight ( )
privateslot

Slot to cause the blink to happen coinciding with the timer.

Definition at line 1710 of file ControlMeasureEditWidget.cpp.

References Isis::ChipViewport::loadView(), and m_rightView.

Referenced by blinkStartRight().

void Isis::ControlMeasureEditWidget::updateLeftPositionLabel ( double  zoomFactor)
privateslot

Update sample/line, lat/lon and zoom factor of left measure.

Parameters
zoomFactor[in]zoom factor
Author
Tracie Sucharski
History:
2012-07-26 Tracie Sucharski - Added ability to link zooming between left and right viewports. TODO: Re-think design, should this be put somewhere else. This was the fastest solution for now.

Definition at line 846 of file ControlMeasureEditWidget.cpp.

References m_leftView, m_leftZoomFactor, m_linkZoom, m_rightView, Isis::ChipViewport::zoom(), and Isis::ChipViewport::zoomFactor().

Referenced by createMeasureEditor().

void Isis::ControlMeasureEditWidget::updateRightGeom ( )
privateslot

Slot to update the geomed right ChipViewport for zoom operations.

History:
2008-15-?? Jeannie Walldren - Added error string to iException::Message before creating QMessageBox

Definition at line 1213 of file ControlMeasureEditWidget.cpp.

References _FILEINFO_, Isis::ChipViewport::geomChip(), m_geom, m_geomIt, m_leftChip, m_leftCube, m_nogeom, m_rightView, Isis::IException::toString(), and Isis::IException::User.

Referenced by createMeasureEditor(), setLeftMeasure(), and setRightMeasure().

void Isis::ControlMeasureEditWidget::updateRightPositionLabel ( double  zoomFactor)
privateslot

Update sample/line, lat/lon and zoom factor of right measure.

Parameters
zoomFactor[in]zoom factor
Author
Tracie Sucharski

Definition at line 866 of file ControlMeasureEditWidget.cpp.

References m_autoReg, m_autoRegExtension, m_autoRegShown, and m_rightZoomFactor.

Referenced by createMeasureEditor().

Member Data Documentation

bool Isis::ControlMeasureEditWidget::m_allowLeftMouse
private

Whether or not to allow mouse events on left chip viewport.

Definition at line 212 of file ControlMeasureEditWidget.h.

Referenced by allowLeftMouse(), ControlMeasureEditWidget(), createMeasureEditor(), and saveMeasure().

QPushButton* Isis::ControlMeasureEditWidget::m_autoReg
private

Button to auto-register the measure.

Definition at line 240 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), registerPoint(), saveMeasure(), setLeftMeasure(), setRightMeasure(), and updateRightPositionLabel().

bool Isis::ControlMeasureEditWidget::m_autoRegAttempted
private

Whether or not auto-registration has been attempted.

Definition at line 245 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), registerPoint(), saveChips(), and setRightMeasure().

QWidget* Isis::ControlMeasureEditWidget::m_autoRegExtension
private

Widget that shows after registering a measure.

Definition at line 241 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), registerPoint(), saveMeasure(), setLeftMeasure(), setRightMeasure(), and updateRightPositionLabel().

AutoReg* Isis::ControlMeasureEditWidget::m_autoRegFact
private
bool Isis::ControlMeasureEditWidget::m_autoRegShown
private

Whether or not the auto-reg extension is shown.

Definition at line 244 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), registerPoint(), saveMeasure(), setLeftMeasure(), setRightMeasure(), and updateRightPositionLabel().

unsigned char Isis::ControlMeasureEditWidget::m_blinkIndex
private

Index of the chip to load in the left chip viewport.

Definition at line 231 of file ControlMeasureEditWidget.h.

Referenced by blinkStart(), and updateBlink().

QList<ChipViewport *> Isis::ControlMeasureEditWidget::m_blinkList
private

List of chip viewports to blink.

Definition at line 230 of file ControlMeasureEditWidget.h.

Referenced by blinkStart(), blinkStop(), and updateBlink().

QDoubleSpinBox* Isis::ControlMeasureEditWidget::m_blinkTimeBox
private

The current blink step (in seconds)

Definition at line 235 of file ControlMeasureEditWidget.h.

Referenced by blinkStart(), and createMeasureEditor().

bool Isis::ControlMeasureEditWidget::m_circle
private

Whether or not to draw circle in center of the right chip viewport.

Definition at line 237 of file ControlMeasureEditWidget.h.

Referenced by setCircle().

QDial* Isis::ControlMeasureEditWidget::m_dial
private

Rotation dial.

Definition at line 233 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), setGeom(), setNoGeom(), and setRotate().

QLCDNumber* Isis::ControlMeasureEditWidget::m_dialNumber
private

The current amount of rotation (in degrees)

Definition at line 234 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), setGeom(), setNoGeom(), and setRotate().

QRadioButton* Isis::ControlMeasureEditWidget::m_geom
private

Radio button to apply geometry/rotation to right chip viewport.

Definition at line 223 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), setGeom(), setRightMeasure(), and updateRightGeom().

bool Isis::ControlMeasureEditWidget::m_geomIt
private

Apply geometry to the right chip viewport.

Definition at line 266 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), setGeom(), setLeftMeasure(), setNoGeom(), setRightMeasure(), setRotate(), and updateRightGeom().

QLabel* Isis::ControlMeasureEditWidget::m_goodFit
private

The goodness of fit value after registering.

Definition at line 243 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), and registerPoint().

Chip* Isis::ControlMeasureEditWidget::m_leftChip
private
Cube* Isis::ControlMeasureEditWidget::m_leftCube
private
UniversalGroundMap* Isis::ControlMeasureEditWidget::m_leftGroundMap
private

UniversalGroundMap for left cube.

Definition at line 259 of file ControlMeasureEditWidget.h.

Referenced by ControlMeasureEditWidget(), findPoint(), and setLeftMeasure().

QLabel* Isis::ControlMeasureEditWidget::m_leftLatLonPosition
private

Label for left chip viewport's current lat/lon.

Definition at line 220 of file ControlMeasureEditWidget.h.

ControlMeasure* Isis::ControlMeasureEditWidget::m_leftMeasure
private
QLabel* Isis::ControlMeasureEditWidget::m_leftSampLinePosition
private

Label for left chip viewport's current sample/line.

Definition at line 218 of file ControlMeasureEditWidget.h.

QLabel* Isis::ControlMeasureEditWidget::m_leftZoomFactor
private

Label for left chip viewport's zoom factor.

Definition at line 216 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), and updateLeftPositionLabel().

bool Isis::ControlMeasureEditWidget::m_linkZoom
private

Link zoom factors between chip viewports.

Definition at line 267 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), setZoomLink(), and updateLeftPositionLabel().

QRadioButton* Isis::ControlMeasureEditWidget::m_nogeom
private

Radio button to remove geometry/rotation for right chip viewport.

Definition at line 222 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), setGeom(), setRightMeasure(), and updateRightGeom().

QLabel* Isis::ControlMeasureEditWidget::m_oldPosition
private

The old sample and line before registering.

Definition at line 242 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), and registerPoint().

QString Isis::ControlMeasureEditWidget::m_pointId
private

Associated control point id of the right measure.

Definition at line 263 of file ControlMeasureEditWidget.h.

Referenced by saveChips(), saveMeasure(), setLeftMeasure(), and setRightMeasure().

Chip* Isis::ControlMeasureEditWidget::m_rightChip
private
Cube* Isis::ControlMeasureEditWidget::m_rightCube
private

Right chip viewport's Cube.

Definition at line 254 of file ControlMeasureEditWidget.h.

Referenced by ControlMeasureEditWidget(), registerPoint(), and setRightMeasure().

UniversalGroundMap* Isis::ControlMeasureEditWidget::m_rightGroundMap
private

UniversalGroundMap for right cube.

Definition at line 260 of file ControlMeasureEditWidget.h.

Referenced by ControlMeasureEditWidget(), findPoint(), and setRightMeasure().

QLabel* Isis::ControlMeasureEditWidget::m_rightLatLonPosition
private

Label for right chip viewport's current lat/lon.

Definition at line 221 of file ControlMeasureEditWidget.h.

ControlMeasure* Isis::ControlMeasureEditWidget::m_rightMeasure
private
QLabel* Isis::ControlMeasureEditWidget::m_rightSampLinePosition
private

Label for right chip viewport's current sample/line.

Definition at line 219 of file ControlMeasureEditWidget.h.

QToolButton* Isis::ControlMeasureEditWidget::m_rightZoom1
private

Button for 1:1 zoom on right chip viewport.

Definition at line 226 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), setGeom(), setNoGeom(), and setRotate().

QLabel* Isis::ControlMeasureEditWidget::m_rightZoomFactor
private

Label for right chip viewport's zoom factor.

Definition at line 217 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), and updateRightPositionLabel().

QToolButton* Isis::ControlMeasureEditWidget::m_rightZoomIn
private

Button for zooming in right chip viewport.

Definition at line 224 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), setGeom(), setNoGeom(), and setRotate().

QToolButton* Isis::ControlMeasureEditWidget::m_rightZoomOut
private

Button for zooming out right chip viewport.

Definition at line 225 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), setGeom(), setNoGeom(), and setRotate().

int Isis::ControlMeasureEditWidget::m_rotation
private

Amount to rotate right chip viewport TODO Is this used??

Definition at line 265 of file ControlMeasureEditWidget.h.

Referenced by ControlMeasureEditWidget(), and createMeasureEditor().

QPalette Isis::ControlMeasureEditWidget::m_saveDefaultPalette
private

Default color palette for the Save button.

Definition at line 248 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), registerPoint(), saveMeasure(), and setRightMeasure().

QPushButton* Isis::ControlMeasureEditWidget::m_saveMeasure
private

Button to save the current measure.

Definition at line 247 of file ControlMeasureEditWidget.h.

Referenced by allowLeftMouse(), colorizeSaveButton(), createMeasureEditor(), registerPoint(), saveMeasure(), and setRightMeasure().

QScrollBar* Isis::ControlMeasureEditWidget::m_slider
private

Slider that controls the size of the center circle.

Definition at line 238 of file ControlMeasureEditWidget.h.

Referenced by createMeasureEditor(), and setCircle().

QString Isis::ControlMeasureEditWidget::m_templateFileName
private

Registration template filename.

Definition at line 215 of file ControlMeasureEditWidget.h.

Referenced by ControlMeasureEditWidget(), setTemplateFile(), and templateFileName().

QTimer* Isis::ControlMeasureEditWidget::m_timer
private

Timer on the blinking.

Definition at line 229 of file ControlMeasureEditWidget.h.

Referenced by blinkStart(), blinkStop(), and changeBlinkTime().

bool Isis::ControlMeasureEditWidget::m_timerOn
private

Indicates if the blink timer is on.

Definition at line 228 of file ControlMeasureEditWidget.h.

Referenced by blinkStart(), blinkStop(), changeBlinkTime(), and ControlMeasureEditWidget().

bool Isis::ControlMeasureEditWidget::m_useGeometry
private

Whether or not to allow geometry/rotation on right chip viewport.

Definition at line 213 of file ControlMeasureEditWidget.h.

Referenced by ControlMeasureEditWidget(), createMeasureEditor(), registerPoint(), setLeftMeasure(), and setRightMeasure().


The documentation for this class was generated from the following files:

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:43:31