Isis Developer Reference
Isis::StereoTool Class Reference

Tool for computing parallax. More...

#include <StereoTool.h>

Inheritance diagram for Isis::StereoTool:
Inheritance graph
Collaboration diagram for Isis::StereoTool:
Collaboration graph

Public Slots

void createPoint (double lat, double lon)
 Create control point at given lat,lon.
 
void modifyPoint (ControlPoint *point)
 Modify given control point.
 
void deletePoint (ControlPoint *point)
 Delete given control point.
 
void removeWindow (QObject *)
 When a user closes a window, we want to remove that window from our combo box for selecting the active window.
 
void repaintViewports (CubePlotCurve *)
 This method causes the viewports corresponding with the given CubePlotCurve to be repainted with all of the area's of interest associated with the CubePlotCurve's PlotWindow.
 
void showPlotWindow ()
 displays the plot window
 
void activate (bool)
 Activates the tool.
 
void setCubeViewport (MdiCubeViewport *cvp)
 Sets the current viewport to the given cvp.
 

Signals

void tieToolSave ()
 
void editPointChanged ()
 
void stretchChipViewport (Stretch *, CubeViewport *)
 
void clearWarningSignal ()
 
void toolActivated ()
 
void viewportChanged ()
 

Public Member Functions

 StereoTool (QWidget *parent)
 Construct the StereoTool.
 
void paintViewport (MdiCubeViewport *cvp, QPainter *painter)
 Repaint the given CubeViewport.
 
void addTo (ViewportMainWindow *mw)
 Adds the tool to the application.
 
void addTo (ToolPad *toolpad)
 Adds the tool to the toolpad.
 
virtual void addTo (QMenu *menu)
 
virtual void addTo (Workspace *ws)
 Adds the given workspace to the cubeviewport list.
 
virtual QString menuName () const
 Anytime a tool is created, you must give it a name for the menu.
 
virtual void addToPermanent (QToolBar *toolbar)
 
void addToActive (QToolBar *toolbar)
 
QString toolIconDir () const
 returns the path to the icon directory.
 
RubberBandToolrubberBandTool ()
 
void setList (ToolList *currentList)
 

Static Public Attributes

static QString lastPtIdValue = ""
 

Protected Types

typedef QVector< MdiCubeViewport * > CubeViewportList
 A list of cubeviewports.
 

Protected Slots

void rubberBandComplete ()
 
void activateTool ()
 
void repaintViewports ()
 This method causes all of the viewports to be repainted.
 
virtual void screenPixelsChanged ()
 This is called when actions change which pixels from the cube are displayed.
 
virtual void mouseEnter ()
 
virtual void mouseMove (QPoint p)
 
virtual void mouseMove (QPoint p, Qt::MouseButton)
 
virtual void mouseLeave ()
 

Protected Member Functions

QWidgetcreateToolBarWidget (QStackedWidget *parent)
 Attaches this tool to the toolbar.
 
QActiontoolPadAction (ToolPad *pad)
 Put the StereoTool icon on the main window Toolpad.
 
void enableRubberBandTool ()
 This methods enables the RubberBandTool, it also sets the RubberBandTool to allow points and to allow all clicks.
 
PlotWindowcreateWindow ()
 This needs to be implemented by children to instantiate a plot window of the appropriate child class of PlotWindow.
 
void detachCurves ()
 This will be called when the selected plot window changes.
 
PlotWindowaddWindow ()
 This creates and initializes everything about a plot window.
 
virtual void updateTool ()
 This forwards all update calls to the plot windows.
 
QList< MdiCubeViewport * > viewportsToPlot ()
 Get a list of linked viewports that should be plotting when a new plot is requested.
 
QList< PlotWindow * > plotWindows ()
 Get a list of all of the instantiated plot windows.
 
PlotWindowselectedWindow (bool createIfNeeded=true)
 Get the 'active' plot window (the window selected by the user to contain new curves).
 
virtual void mouseDoubleClick (QPoint p)
 
virtual void mouseButtonPress (QPoint p, Qt::MouseButton s)
 
virtual void mouseButtonRelease (QPoint p, Qt::MouseButton s)
 Resets the Warning to Nowarning when a different activity occurs on the application.
 
virtual void updateMeasure ()
 
virtual void scaleChanged ()
 
virtual void stretchRequested (MdiCubeViewport *, int)
 
void registerTool (MdiCubeViewport *viewport)
 Registers the tool to the viewport.
 
MdiCubeViewportcubeViewport () const
 Return the current cubeviewport.
 
CubeViewportListcubeViewportList () const
 Return the list of cubeviewports.
 
virtual void addConnections (MdiCubeViewport *cvp)
 Anytime a tool is created, you must add the connections for it.
 
virtual void removeConnections (MdiCubeViewport *cvp)
 Anytime a tool is created, you must be able to remove it's connections.
 
Workspaceworkspace ()
 

Static Protected Member Functions

static CubePlotCurvecreateCurve (QString name, QPen pen, PlotCurve::Units xUnits, PlotCurve::Units yUnits)
 This is a helper method for children.
 

Detailed Description

Tool for computing parallax.

Author
2011-12-07 Tracie Sucharski

Member Typedef Documentation

◆ CubeViewportList

typedef QVector< MdiCubeViewport * > Isis::Tool::CubeViewportList
protectedinherited

A list of cubeviewports.

Constructor & Destructor Documentation

◆ StereoTool()

Isis::StereoTool::StereoTool ( QWidget * parent)

Construct the StereoTool.

Author
2011-09-19 Tracie Sucharski

References activateTool(), Isis::Distance::Meters, and Isis::Tool::toolActivated().

Member Function Documentation

◆ activate

◆ activateTool

void Isis::StereoTool::activateTool ( )
protectedslot

Referenced by StereoTool().

◆ addConnections()

virtual void Isis::Tool::addConnections ( MdiCubeViewport * cvp)
inlineprotectedvirtualinherited

Anytime a tool is created, you must add the connections for it.

Parameters
cvp

Reimplemented in Isis::TrackTool, and Isis::WindowTool.

◆ addTo() [1/4]

◆ addTo() [2/4]

void Isis::Tool::addTo ( ToolPad * toolpad)
inherited

Adds the tool to the toolpad.

Parameters
toolpad

References Isis::Tool::activate(), and Isis::Tool::toolPadAction().

◆ addTo() [3/4]

◆ addTo() [4/4]

void Isis::Tool::addTo ( Workspace * ws)
virtualinherited

Adds the given workspace to the cubeviewport list.

Parameters
ws

Reimplemented in Isis::EditTool, Isis::FileTool, Isis::SpecialPixelTool, and Isis::WindowTool.

References Isis::Tool::registerTool(), and Isis::Tool::setCubeViewport().

◆ addToActive()

void Isis::Tool::addToActive ( QToolBar * toolbar)
inherited
Parameters
toolbar

References Isis::Tool::createToolBarWidget(), and Isis::ToolList::toolBarStack().

Referenced by Isis::Tool::addTo().

◆ addToPermanent()

virtual void Isis::Tool::addToPermanent ( QToolBar * toolbar)
inlinevirtualinherited

◆ addWindow()

PlotWindow * Isis::AbstractPlotTool::addWindow ( )
protectedinherited

This creates and initializes everything about a plot window.

This updates the window's title to be unique, adds it to the active plot window combo box, listens for the window to be removed and selects it in the active plot window combo box. Call this if you need a new plot window.

Returns
The newly initialized plot window

References Isis::AbstractPlotTool::createWindow(), Isis::AbstractPlotTool::removeWindow(), and Isis::AbstractPlotTool::repaintViewports().

Referenced by Isis::SpatialPlotTool::refreshPlot(), Isis::SpectralPlotTool::refreshPlot(), and Isis::AbstractPlotTool::selectedWindow().

◆ clearWarningSignal

void Isis::Tool::clearWarningSignal ( )
signalinherited

◆ createCurve()

CubePlotCurve * Isis::AbstractPlotTool::createCurve ( QString name,
QPen pen,
PlotCurve::Units xUnits,
PlotCurve::Units yUnits )
staticprotectedinherited

This is a helper method for children.

Given a title, a color, and units a new CubePlotCurve is created.

Parameters
nameThe title of the curve to be created
penThe color & thickness of the curve
xUnitsThe units of the x-axis associated with this curve. This must match the plot window's x axis.
yUnitsThe units of the y-axis associated with this curve. This must match the plot window's y axis.
Returns
createCurve The requested plot curve

◆ createPoint

◆ createToolBarWidget()

QWidget * Isis::StereoTool::createToolBarWidget ( QStackedWidget * parent)
protectedvirtual

Attaches this tool to the toolbar.

Parameters
parent
Returns
QWidget*

Reimplemented from Isis::AbstractPlotTool.

References Isis::AbstractPlotTool::createToolBarWidget(), and Isis::Tool::toolIconDir().

◆ createWindow()

PlotWindow * Isis::StereoTool::createWindow ( )
protectedvirtual

This needs to be implemented by children to instantiate a plot window of the appropriate child class of PlotWindow.

You should set the window title, but the rest of the initialization will be handled by addWindow().

Returns
A newly instantiated, but not fully initialized, plot window.

Implements Isis::AbstractPlotTool.

References Isis::PlotCurve::Elevation, and Isis::PlotCurve::PixelNumber.

◆ cubeViewport()

MdiCubeViewport * Isis::Tool::cubeViewport ( ) const
inlineprotectedinherited

Return the current cubeviewport.

Returns
CubeViewport*

Referenced by Isis::TrackTool::addConnections(), Isis::WindowTool::addConnections(), Isis::StretchTool::deleteFromCube(), Isis::FileTool::discard(), Isis::FileTool::exportToList(), Isis::FileTool::exportView(), Isis::StretchTool::loadStretchFromCube(), Isis::SunShadowTool::mouseButtonPress(), Isis::EditTool::mouseButtonRelease(), Isis::ControlNetTool::mouseButtonRelease(), Isis::FeatureNomenclatureTool::mouseButtonRelease(), Isis::FindTool::mouseButtonRelease(), Isis::MatchTool::mouseButtonRelease(), Isis::PanTool::mouseButtonRelease(), Isis::QnetTool::mouseButtonRelease(), Isis::RubberBandTool::mouseButtonRelease(), Isis::StretchTool::mouseButtonRelease(), Isis::AdvancedTrackTool::mouseLeave(), Isis::SunShadowTool::mouseMove(), Isis::TrackTool::mouseMove(), Isis::RubberBandTool::mouseMove(), Isis::ScatterPlotTool::mouseMove(), Isis::LatLonGridTool::paintViewport(), Isis::FindTool::paintViewport(), Isis::RubberBandTool::paintViewport(), Isis::SunShadowTool::paintViewport(), Isis::FileTool::print(), Isis::HistogramTool::refreshPlot(), Isis::SpatialPlotTool::refreshPlot(), Isis::SpectralPlotTool::refreshPlot(), Isis::TrackTool::removeConnections(), Isis::WindowTool::removeConnections(), Isis::EditTool::rubberBandComplete(), Isis::HistogramTool::rubberBandComplete(), Isis::MeasureTool::rubberBandComplete(), rubberBandComplete(), Isis::StretchTool::rubberBandComplete(), Isis::ZoomTool::rubberBandComplete(), Isis::FileTool::save(), Isis::FileTool::saveAs(), Isis::FileTool::saveAsCubeByOption(), Isis::FileTool::saveInfo(), Isis::StretchTool::saveStretchToCube(), Isis::ScatterPlotTool::showNewScatterPlotConfig(), Isis::StretchTool::stretchGlobal(), Isis::StretchTool::stretchGlobalAllBands(), Isis::StretchTool::stretchRegional(), Isis::StretchTool::updateAdvStretchDialogforAll(), Isis::StretchTool::updateHistograms(), Isis::MeasureTool::updateMeasure(), Isis::AbstractPlotTool::updateTool(), Isis::BandTool::updateTool(), Isis::BlinkTool::updateTool(), Isis::EditTool::updateTool(), Isis::FileTool::updateTool(), Isis::FindTool::updateTool(), Isis::LatLonGridTool::updateTool(), Isis::SpecialPixelTool::updateTool(), Isis::StretchTool::updateTool(), Isis::SunShadowTool::updateTool(), Isis::WindowTool::updateTool(), Isis::ZoomTool::updateTool(), and Isis::AbstractPlotTool::viewportsToPlot().

◆ cubeViewportList()

◆ deletePoint

void Isis::StereoTool::deletePoint ( ControlPoint * point)
slot

Delete given control point.

Parameters
pointInput Control Point to delete
History
2010-05-19 Tracie Sucharski - Fixed bug which was causing a seg fault. Set m_editPoint to NULL, also no sense loading point to be deleted. Should this be smartened up to load another Point?

References editPointChanged(), and Isis::ControlPoint::GetId().

Referenced by rubberBandComplete().

◆ detachCurves()

void Isis::StereoTool::detachCurves ( )
protectedvirtual

This will be called when the selected plot window changes.

The existing curves need to be detached (forgotten, but not deleted). The curves are being detached between the previously selected window and the tool.

Implements Isis::AbstractPlotTool.

◆ editPointChanged

void Isis::StereoTool::editPointChanged ( )
signal

◆ enableRubberBandTool()

void Isis::StereoTool::enableRubberBandTool ( )
protectedvirtual

◆ menuName()

virtual QString Isis::Tool::menuName ( ) const
inlinevirtualinherited

◆ modifyPoint

void Isis::StereoTool::modifyPoint ( ControlPoint * point)
slot

Modify given control point.

Parameters
pointInput Control Point to modify

References editPointChanged().

Referenced by rubberBandComplete().

◆ mouseButtonPress()

void Isis::Tool::mouseButtonPress ( QPoint p,
Qt::MouseButton s )
protectedvirtualinherited
Parameters
p
s

References Isis::Tool::clearWarningSignal().

◆ mouseButtonRelease()

void Isis::Tool::mouseButtonRelease ( QPoint p,
Qt::MouseButton s )
protectedvirtualinherited

Resets the Warning to Nowarning when a different activity occurs on the application.

This is called by all the mouseButtonRelease events in all the tools.

Parameters
p
s

Reimplemented in Isis::FeatureNomenclatureTool.

References Isis::Tool::clearWarningSignal().

Referenced by Isis::StretchTool::mouseButtonRelease().

◆ mouseDoubleClick()

void Isis::Tool::mouseDoubleClick ( QPoint p)
protectedvirtualinherited
Parameters
p

References Isis::Tool::clearWarningSignal().

◆ mouseEnter

virtual void Isis::Tool::mouseEnter ( )
inlineprotectedvirtualslotinherited

◆ mouseLeave

virtual void Isis::Tool::mouseLeave ( )
inlineprotectedvirtualslotinherited

◆ mouseMove [1/2]

void Isis::Tool::mouseMove ( QPoint p)
protectedvirtualslotinherited
Parameters
p

◆ mouseMove [2/2]

virtual void Isis::Tool::mouseMove ( QPoint p,
Qt::MouseButton  )
inlineprotectedvirtualslotinherited

◆ paintViewport()

void Isis::StereoTool::paintViewport ( MdiCubeViewport * vp,
QPainter * painter )
virtual

Repaint the given CubeViewport.

Parameters
vpInput CubeViewport to repain
painterInput Qt Painter

Reimplemented from Isis::AbstractPlotTool.

References Isis::SerialNumber::Compose(), Isis::ControlPoint::Free, Isis::ControlPoint::HasSerialNumber(), and Isis::AbstractPlotTool::paintViewport().

◆ plotWindows()

QList< PlotWindow * > Isis::AbstractPlotTool::plotWindows ( )
protectedinherited

Get a list of all of the instantiated plot windows.

Returns
All of the plot windows associated with this tool

Referenced by Isis::AbstractPlotTool::updateTool().

◆ registerTool()

void Isis::Tool::registerTool ( MdiCubeViewport * viewport)
protectedinherited

Registers the tool to the viewport.

Parameters
viewport

References Isis::MdiCubeViewport::registerTool(), and Isis::Tool::stretchRequested().

Referenced by Isis::Tool::addTo().

◆ removeConnections()

virtual void Isis::Tool::removeConnections ( MdiCubeViewport * cvp)
inlineprotectedvirtualinherited

Anytime a tool is created, you must be able to remove it's connections.

Parameters
cvp

Reimplemented in Isis::MeasureTool, Isis::TrackTool, and Isis::WindowTool.

◆ removeWindow

void Isis::AbstractPlotTool::removeWindow ( QObject * window)
slotinherited

When a user closes a window, we want to remove that window from our combo box for selecting the active window.

We also repaint all of the cube viewports so that the destroyed window leaves no visible artifacts.

Parameters
windowThe plot window that is to be removed

References Isis::AbstractPlotTool::repaintViewports().

Referenced by Isis::AbstractPlotTool::addWindow().

◆ repaintViewports [1/2]

void Isis::AbstractPlotTool::repaintViewports ( )
protectedslotinherited

This method causes all of the viewports to be repainted.

This is useful because it removes visible artifacts from deleted plot windows/curves.

References Isis::Tool::cubeViewportList().

Referenced by Isis::AbstractPlotTool::addWindow(), and Isis::AbstractPlotTool::removeWindow().

◆ repaintViewports [2/2]

void Isis::AbstractPlotTool::repaintViewports ( CubePlotCurve * pc)
slotinherited

This method causes the viewports corresponding with the given CubePlotCurve to be repainted with all of the area's of interest associated with the CubePlotCurve's PlotWindow.

Parameters
pcThe plot curve which needs to repaint

References Isis::CubeViewport::cube(), Isis::Tool::cubeViewportList(), and Isis::Cube::fileName().

◆ rubberBandComplete

◆ rubberBandTool()

◆ scaleChanged()

virtual void Isis::Tool::scaleChanged ( )
inlineprotectedvirtualinherited

Reimplemented in Isis::RubberBandTool.

◆ screenPixelsChanged

virtual void Isis::Tool::screenPixelsChanged ( )
inlineprotectedvirtualslotinherited

This is called when actions change which pixels from the cube are displayed.

◆ selectedWindow()

PlotWindow * Isis::AbstractPlotTool::selectedWindow ( bool createIfNeeded = true)
protectedinherited

Get the 'active' plot window (the window selected by the user to contain new curves).

This may return NULL if and only if createIfNeeded is false. Windows are created by child classes.

Parameters
createIfNeededIf this is true, and no window is selected in the active window combo box, then a window will be created and selected before this method returns.
Returns
The user-selected active plot window

References Isis::AbstractPlotTool::addWindow().

Referenced by Isis::HistogramTool::refreshPlot(), Isis::SpatialPlotTool::refreshPlot(), Isis::SpectralPlotTool::refreshPlot(), Isis::HistogramTool::rubberBandComplete(), Isis::SpatialPlotTool::rubberBandComplete(), Isis::SpectralPlotTool::rubberBandComplete(), and Isis::AbstractPlotTool::showPlotWindow().

◆ setCubeViewport

void Isis::Tool::setCubeViewport ( MdiCubeViewport * cvp)
slotinherited

Sets the current viewport to the given cvp.

Parameters
cvp

References Isis::Tool::updateTool(), and Isis::Tool::viewportChanged().

Referenced by Isis::Tool::addTo(), and Isis::FileTool::closeAll().

◆ setList()

void Isis::Tool::setList ( ToolList * currentList)
inherited

◆ showPlotWindow

void Isis::AbstractPlotTool::showPlotWindow ( )
slotinherited

◆ stretchChipViewport

void Isis::StereoTool::stretchChipViewport ( Stretch * ,
CubeViewport *  )
signal

◆ stretchRequested()

virtual void Isis::Tool::stretchRequested ( MdiCubeViewport * ,
int  )
inlineprotectedvirtualinherited

Reimplemented in Isis::StretchTool.

Referenced by Isis::Tool::registerTool().

◆ tieToolSave

void Isis::StereoTool::tieToolSave ( )
signal

◆ toolActivated

◆ toolIconDir()

◆ toolPadAction()

QAction * Isis::StereoTool::toolPadAction ( ToolPad * pad)
protectedvirtual

Put the StereoTool icon on the main window Toolpad.

Parameters
padInput Toolpad for the main window

Reimplemented from Isis::Tool.

References Isis::Tool::toolIconDir().

◆ updateMeasure()

virtual void Isis::Tool::updateMeasure ( )
inlineprotectedvirtualinherited

◆ updateTool()

void Isis::AbstractPlotTool::updateTool ( )
protectedvirtualinherited

◆ viewportChanged

◆ viewportsToPlot()

QList< MdiCubeViewport * > Isis::AbstractPlotTool::viewportsToPlot ( )
protectedinherited

Get a list of linked viewports that should be plotting when a new plot is requested.

This is a utility for child classes. For example, a spatial plot will make a curve for each viewport.

Returns
A list of viewports containing the active one and any that are linked to the active viewport.

References Isis::Tool::cubeViewport(), Isis::Tool::cubeViewportList(), and Isis::MdiCubeViewport::isLinked().

Referenced by Isis::SpatialPlotTool::refreshPlot(), Isis::SpectralPlotTool::refreshPlot(), Isis::SpatialPlotTool::updateTool(), and Isis::SpectralPlotTool::updateTool().

◆ workspace()

Member Data Documentation

◆ lastPtIdValue

QString Isis::StereoTool::lastPtIdValue = ""
static

Referenced by createPoint().


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