Isis 3 Programmer Reference
Isis::IndependentCubeViewport Class Reference

General purpose Cube display widget. More...

#include <IndependentCubeViewport.h>

Inheritance diagram for Isis::IndependentCubeViewport:
Inheritance graph
Collaboration diagram for Isis::IndependentCubeViewport:
Collaboration graph

Public Slots

void resetKnownGlobal ()
 
QSize sizeHint () const
 Make viewports show up as 512 by 512. More...
 
void setScale (double scale)
 Change the scale of the cube to the given parameter value. More...
 
void setScale (double scale, double sample, double line)
 Change the scale of the cube after moving samp/line to the center. More...
 
void setScale (double scale, int x, int y)
 Change the scale of the cube after moving x,y to the center. More...
 
void center (int x, int y)
 Bring the cube pixel under viewport x/y to the center. More...
 
void center (double sample, double line)
 Bring the cube sample/line the center. More...
 
virtual void viewRGB (int redBand, int greenBand, int blueBand)
 View cube as color. More...
 
virtual void viewGray (int band)
 View cube as gray. More...
 
void stretchGray (const QString &string)
 Apply stretch pairs to gray band. More...
 
void stretchGray (const Stretch &stretch)
 Sets the stretch for gray mode. More...
 
void stretchRed (const QString &string)
 Apply stretch pairs to red bands. More...
 
void stretchRed (const Stretch &stretch)
 Sets the stretch for red in rgb mode. More...
 
void stretchGreen (const QString &string)
 Apply stretch pairs to green bands. More...
 
void stretchGreen (const Stretch &stretch)
 Sets the stretch for green in rgb mode. More...
 
void stretchBlue (const QString &string)
 Apply stretch pairs to blue bands. More...
 
void stretchBlue (const Stretch &stretch)
 Sets the stretch for blue in rgb mode. More...
 
void stretchKnownGlobal ()
 List<Tool *> p This stretches to the global stretch. More...
 
void cubeChanged (bool changed)
 This method is called when the cube has changed or changes have been finalized. More...
 
void scrollBy (int dx, int dy)
 Move the scrollbars by dx/dy screen pixels. More...
 
void changeCursor (QCursor cursor)
 Allows users to change the cursor type on the viewport. More...
 
void onProgressTimer ()
 This updates the progress bar visually. More...
 
void enableProgress ()
 This restarts the progress bar. More...
 

Signals

void synchronize (IndependentCubeViewport *)
 
void trackingChanged (double sample, double line, double lat, double lon, double dn, IndependentCubeViewport *)
 
void trackingChanged (double samp, double line, double dn, IndependentCubeViewport *)
 
void cantTrack (QString, IndependentCubeViewport *)
 
void viewportUpdated ()
 Emitted when viewport updated. More...
 
void viewportClosed (CubeViewport *)
 Emitted when viewport is closed. More...
 
void mouseEnter ()
 Emitted when the mouse enters the viewport. More...
 
void mouseMove (QPoint)
 Emitted when the mouse moves. More...
 
void mouseMove (QPoint, Qt::MouseButton)
 Emitted when the mouse moves. More...
 
void mouseLeave ()
 Emitted when the mouse leaves the viewport. More...
 
void mouseButtonPress (QPoint, Qt::MouseButton)
 Emitted when mouse button pressed. More...
 
void mouseButtonRelease (QPoint, Qt::MouseButton)
 Emitted when mouse button released. More...
 
void mouseDoubleClick (QPoint)
 Emitted when double click happens. More...
 
void windowTitleChanged ()
 Emitted when window title changes. More...
 
void scaleChanged ()
 Emitted when zoom factor changed just before the repaint event. More...
 
void saveChanges (CubeViewport *)
 Emitted when changes should be saved. More...
 
void discardChanges (CubeViewport *)
 Emitted when changes should be discarded. More...
 
void screenPixelsChanged ()
 Emitted when cube pixels that should be on the screen change. More...
 
void progressChanged (int)
 Emitted with current progress (0 to 100) when working. More...
 
void progressComplete ()
 Emitted when the current progress is complete (100) More...
 
void doneWithData (int, const Isis::Brick *)
 Emitted when a brick is no longer needed, should only be sent to cube data thread. More...
 

Public Member Functions

 IndependentCubeViewport (Cube *cube, CubeDataThread *cdt=0, QWidget *parent=0)
 
bool eventFilter (QObject *o, QEvent *e)
 Event filter to watch for mouse events on viewport. More...
 
void paintEvent (QPaintEvent *e)
 Repaint the viewport. More...
 
void restretch (ViewportBuffer *)
 This is called by internal viewport buffers when a stretch action should be performed. More...
 
virtual void showEvent (QShowEvent *e)
 
void setCube (Cube *cube)
 This method sets the viewports cube. More...
 
int cubeSamples () const
 Return the number of samples in the cube. More...
 
int cubeLines () const
 Return the number of lines in the cube. More...
 
int cubeBands () const
 Return the number of bands in the cube. More...
 
bool isColor () const
 
bool isGray () const
 
int grayBand () const
 
int redBand () const
 
int greenBand () const
 
int blueBand () const
 
double scale () const
 
bool cubeShown () const
 
int comboCount () const
 
int comboIndex () const
 
void cubeContentsChanged (QRect rect)
 Calle dhwen the contents of the cube changes. More...
 
double fitScale () const
 Determine the scale that causes the full cube to fit in the viewport. More...
 
double fitScaleWidth () const
 Determine the scale of cube in the width to fit in the viewport. More...
 
double fitScaleHeight () const
 Determine the scale of cube in heighth to fit in the viewport. More...
 
void viewportToCube (int x, int y, double &sample, double &line) const
 Turns a viewport into a cube. More...
 
void cubeToViewport (double sample, double line, int &x, int &y) const
 Turns a cube into a viewport. More...
 
void contentsToCube (int x, int y, double &sample, double &line) const
 Turns contents to a cube. More...
 
void cubeToContents (double sample, double line, int &x, int &y) const
 Turns a cube into contents. More...
 
double redPixel (int sample, int line)
 Gets the red pixel. More...
 
double greenPixel (int sample, int line)
 Gets the green pixel. More...
 
double bluePixel (int sample, int line)
 Gets the blue pixel. More...
 
double grayPixel (int sample, int line)
 Gets the gray pixel. More...
 
CubeStretch grayStretch () const
 Return the gray band stretch. More...
 
CubeStretch redStretch () const
 Return the red band stretch. More...
 
CubeStretch greenStretch () const
 Return the green band stretch. More...
 
CubeStretch blueStretch () const
 Return the blue band stretch. More...
 
Cubecube () const
 
Projectionprojection () const
 
Cameracamera () const
 
UniversalGroundMapuniversalGroundMap () const
 
CubetrackingCube () const
 
void moveCursor (int x, int y)
 Move the cursor by x,y if possible. More...
 
bool cursorInside () const
 Is cursor inside viewport. More...
 
QPoint cursorPosition () const
 Return the cursor position in the viewport. More...
 
void setCursorPosition (int x, int y)
 Set the cursor position to x/y in the viewport. More...
 
void setCaption ()
 Change the caption on the viewport title bar. More...
 
void setBackground (QColor color)
 Sets the background color. More...
 
void setComboCount (int count)
 Sets the band bin combo box count. More...
 
void setComboIndex (int index)
 Sets the band bin combo box index. More...
 
QPixmap pixmap ()
 Returns the pixmap. More...
 
ViewportBuffergrayBuffer ()
 Returns the gray viewport buffer (Will be NULL if in RGB mode.) More...
 
ViewportBufferredBuffer ()
 Returns the red viewport buffer (Will be NULL if in Gray mode.) More...
 
ViewportBuffergreenBuffer ()
 Returns the green viewport buffer (Will be NULL if in Gray mode.) More...
 
ViewportBufferblueBuffer ()
 Returns the blue viewport buffer (Will be NULL if in Gray mode.) More...
 
void bufferUpdated (QRect rect)
 This method is called by ViewportBuffer upon successful completion of all operations and gives the appropriate rect to be repainted. More...
 
void paintPixmap ()
 Paint the whole pixmap. More...
 
void forgetStretches ()
 Resets all remembered stretches. More...
 
void setAllBandStretches (Stretch stretch)
 Sets a stretch for all bands. More...
 
CubeDataThreadcubeDataThread ()
 
int cubeID ()
 
void getAllWhatsThisInfo (Pvl &pWhatsThisPvl)
 Get All WhatsThis info - viewport, cube, area in PVL format. More...
 
void getBandFilterName (PvlKeyword &pFilterNameKey)
 Get Band Filter name from the Isis cube label. More...
 
void getCubeArea (double &pdStartSample, double &pdEndSample, double &pdStartLine, double &pdEndLine)
 Get Cube area corresponding to the viewport's dimension. More...
 
bool confirmClose ()
 This method should be called during a close event that would cause this viewport to close. More...
 
void setTrackingCube ()
 Finds the Tracking group from p_cube and stores the tracking cube name so that we can grab it in AdvancedTrackTool and get mosaic information. More...
 

Protected Slots

virtual void cubeDataChanged (int cubeId, const Brick *)
 

Protected Member Functions

void scrollContentsBy (int dx, int dy)
 Scroll the viewport contents by dx/dy screen pixels. More...
 
virtual void resizeEvent (QResizeEvent *e)
 The viewport is being resized. More...
 
virtual void keyPressEvent (QKeyEvent *e)
 Process arrow keystrokes on cube. More...
 

Protected Attributes

QPixmap p_pixmap
 The qpixmap. More...
 
QVector< Stretch * > * p_knownStretches
 Stretches for each previously stretched band. More...
 
QVector< Stretch * > * p_globalStretches
 Global stretches for each stretched band. More...
 

Private Slots

void handleMouseMove (QPoint)
 
void handleMousePress (QPoint, Qt::MouseButton b)
 
void handleMouseRelease (QPoint)
 
void handleSynchronization (IndependentCubeViewport *)
 

Private Member Functions

QRect bandingRect ()
 
void stretch ()
 
void track (const QPoint &)
 
void zoom ()
 
bool trackBuffer (ViewportBuffer *, const QPoint &, double &)
 
void paintPixmap (QRect rect)
 Paint a region of the pixmap. More...
 
void shiftPixmap (int dx, int dy)
 Shifts the pixels on the pixmap without reading new data. More...
 
void updateScrollBars (int x, int y)
 Update the scroll bar. More...
 
void paintPixmapRects ()
 Goes through the list of requested paints, from the viewport buffer, and paints them. More...
 
void updateWhatsThis ()
 Update the What's This text. More...
 

Private Attributes

bool banding
 
bool panning
 
bool stretching
 
bool zooming
 
bool leftClick
 
QPoint * bandingPoint1
 
QPoint * bandingPoint2
 
QPoint * panningPrevPoint
 
ViewportBufferp_grayBuffer
 Viewport Buffer to manage gray band. More...
 
ViewportBufferp_redBuffer
 Viewport Buffer to manage red band. More...
 
ViewportBufferp_greenBuffer
 Viewport Buffer to manage green band. More...
 
ViewportBufferp_blueBuffer
 Viewport Buffer to manage blue band. More...
 
QColor p_bgColor
 The color to paint the background of the viewport. More...
 
Cubep_cube
 The cube associated with the viewport. More...
 
Camerap_camera
 The camera from the cube. More...
 
Projectionp_projection
 The projection from the cube. More...
 
UniversalGroundMapp_groundMap
 The universal ground map from the cube. More...
 
Cubep_trackingCube
 
QTimer * p_progressTimer
 Activated to update progress bar. More...
 
double p_scale
 The scale number. More...
 
bool p_color
 Is the viewport in color? More...
 
BandInfo p_gray
 Gray band info. More...
 
BandInfo p_red
 Red band info. More...
 
BandInfo p_green
 Green band info. More...
 
BandInfo p_blue
 Blue band info. More...
 
int p_comboCount
 Number of elements in band bin combo box. More...
 
int p_comboIndex
 Current element chosen from combo box. More...
 
Brickp_redBrick
 Bricks for every color. More...
 
Brickp_grnBrick
 Bricks for every color. More...
 
Brickp_bluBrick
 Bricks for every color. More...
 
Brickp_gryBrick
 Bricks for every color. More...
 
Brickp_pntBrick
 Bricks for every color. More...
 
bool p_saveEnabled
 Has the cube changed? More...
 
bool p_cubeShown
 Is the cube visible? More...
 
QImage * p_image
 The qimage. More...
 
bool p_paintPixmap
 Paint the pixmap? More...
 
bool p_updatingBuffers
 Changing RGB and need to not repaint pixmap? More...
 
QString p_whatsThisText
 The text for What's this. More...
 
QString p_cubeWhatsThisText
 The text for the cube's What's this. More...
 
QString p_viewportWhatsThisText
 The text for the viewport's what's this. More...
 
QList< QRect * > * p_pixmapPaintRects
 A list of rects that the viewport buffers have requested painted. More...
 
CubeDataThreadp_cubeData
 Does all the cube I/O. More...
 
int p_cubeId
 Cube ID given from cube data thread for I/O. More...
 
bool p_thisOwnsCubeData
 if true then this owns the CubeDataThread, and should thus delete it More...
 

Detailed Description

General purpose Cube display widget.

Author
????-??-?? Eric Hyer
See also
CubeViewport
History:
2013-02-20 Debbie A. Cook - Changed to use new projection types. References #775.

Definition at line 45 of file IndependentCubeViewport.h.

Member Function Documentation

◆ blueBand()

◆ blueBuffer()

ViewportBuffer* Isis::CubeViewport::blueBuffer ( )
inlineinherited

◆ bluePixel()

double Isis::CubeViewport::bluePixel ( int  sample,
int  line 
)
inherited

Gets the blue pixel.

Return the blue pixel value at a sample/line.

Parameters
sampleThe sample
lineThe line
Returns
The bluePixel value
Parameters
sample
line
Returns
double

Definition at line 1638 of file CubeViewport.cpp.

References Isis::CubeViewport::BandInfo::band, Isis::CubeViewport::p_blue, Isis::CubeViewport::p_cube, Isis::CubeViewport::p_pntBrick, Isis::Cube::read(), and Isis::Brick::SetBasePosition().

◆ blueStretch()

◆ bufferUpdated()

void Isis::CubeViewport::bufferUpdated ( QRect  rect)
inherited

This method is called by ViewportBuffer upon successful completion of all operations and gives the appropriate rect to be repainted.

This is intended to update the screen once all data is done and ready to be displayed.

Parameters
rectArea to update screen

Definition at line 1104 of file CubeViewport.cpp.

References Isis::CubeViewport::p_blueBuffer, Isis::CubeViewport::p_grayBuffer, Isis::CubeViewport::p_greenBuffer, Isis::CubeViewport::p_redBuffer, Isis::CubeViewport::paintPixmap(), and Isis::ViewportBuffer::working().

◆ camera()

Camera* Isis::CubeViewport::camera ( ) const
inlineinherited

◆ center [1/2]

void Isis::CubeViewport::center ( double  sample,
double  line 
)
slotinherited

◆ center [2/2]

void Isis::CubeViewport::center ( int  x,
int  y 
)
slotinherited

Bring the cube pixel under viewport x/y to the center.

Parameters
x
y

Definition at line 730 of file CubeViewport.cpp.

References Isis::CubeViewport::viewportToCube().

Referenced by Isis::CubeViewport::setScale().

◆ changeCursor

void Isis::CubeViewport::changeCursor ( QCursor  cursor)
slotinherited

Allows users to change the cursor type on the viewport.

Parameters
cursor

Definition at line 2392 of file CubeViewport.cpp.

◆ comboCount()

int Isis::CubeViewport::comboCount ( ) const
inlineinherited
Returns
the BandBin combo box count

Definition at line 224 of file CubeViewport.h.

References Isis::CubeViewport::p_comboCount.

Referenced by Isis::BandTool::setBandBin().

◆ comboIndex()

int Isis::CubeViewport::comboIndex ( ) const
inlineinherited
Returns
the BandBin combo box index

Definition at line 229 of file CubeViewport.h.

References Isis::CubeViewport::p_comboIndex.

Referenced by Isis::BandTool::setBandBin().

◆ confirmClose()

bool Isis::CubeViewport::confirmClose ( )
inherited

This method should be called during a close event that would cause this viewport to close.

If changes have been made to this viewport it opens an information dialog that asks the user if they want to save, discard changes, or cancel.

Returns
True if closing is OK, false if it needs to be cancelled.

Definition at line 525 of file CubeViewport.cpp.

References Isis::CubeViewport::cube(), Isis::CubeViewport::discardChanges(), Isis::CubeViewport::p_saveEnabled, and Isis::CubeViewport::saveChanges().

◆ contentsToCube()

void Isis::CubeViewport::contentsToCube ( int  x,
int  y,
double &  sample,
double &  line 
) const
inherited

Turns contents to a cube.

Convert a contents x/y to a cube sample/line (may be outside the cube)

Parameters
x
y
sample
line

Definition at line 798 of file CubeViewport.cpp.

References Isis::CubeViewport::p_scale.

Referenced by Isis::CubeViewport::setScale(), and Isis::CubeViewport::viewportToCube().

◆ cube()

Cube* Isis::CubeViewport::cube ( ) const
inlineinherited
Returns
The cube associated with viewport

Definition at line 338 of file CubeViewport.h.

References Isis::CubeViewport::p_cube.

Referenced by Isis::CubeViewport::confirmClose(), Isis::MatchTool::createPoint(), Isis::CubeViewport::cubeContentsChanged(), Isis::CubeViewport::cubeDataChanged(), Isis::Workspace::cubeToMdiWidget(), Isis::CubeViewport::CubeViewport(), Isis::StretchTool::deleteFromCube(), Isis::ControlNetTool::drawAllMeasurements(), Isis::QnetTool::drawAllMeasurments(), Isis::SpectralPlotWindow::drawBandMarkers(), Isis::FileTool::exportToList(), Isis::FeatureNomenclatureTool::featuresForViewportFound(), Isis::FeatureNomenclatureTool::findMissingNomenclature(), Isis::SpatialPlotTool::getSpatialStatistics(), Isis::SpectralPlotTool::getSpectralStatistics(), Isis::StatisticsTool::getStatistics(), Isis::ScatterPlotWindow::isXCube(), Isis::ScatterPlotWindow::isYCube(), Isis::StretchTool::loadStretchFromCube(), Isis::SunShadowTool::mouseButtonPress(), Isis::EditTool::mouseButtonRelease(), Isis::ControlNetTool::mouseButtonRelease(), Isis::MatchTool::mouseButtonRelease(), Isis::QnetTool::mouseButtonRelease(), Isis::CubeDnView::onCubeViewportActivated(), Isis::CubeDnView::onCubeViewportDeleted(), Isis::QnetTool::openGround(), Isis::CubePlotCurve::paint(), Isis::StereoTool::paintViewport(), Isis::SunShadowTool::recalculateShadowHeight(), Isis::EditTool::redoEdit(), Isis::HistogramTool::refreshPlot(), Isis::ScatterPlotConfigDialog::refreshWidgetStates(), Isis::AbstractPlotTool::repaintViewports(), Isis::EditTool::rubberBandComplete(), Isis::FileTool::save(), Isis::FileTool::saveAsReducedCube(), Isis::StretchTool::saveStretchToCube(), Isis::ScatterPlotConfigDialog::ScatterPlotConfigDialog(), Isis::MatchTool::serialNumberList(), Isis::CubeViewport::setCube(), Isis::StretchTool::stretchBand(), Isis::ChipViewport::stretchFromCubeViewport(), Isis::AdvancedTrackTool::TrackMosaicOrigin(), Isis::EditTool::undoAll(), Isis::EditTool::undoEdit(), Isis::MeasureTool::updateDist(), Isis::AdvancedTrackTool::updateRow(), Isis::BandTool::updateTool(), Isis::SpectralPlotTool::updateTool(), Isis::SunShadowTool::updateTool(), Isis::CubeDnView::workspaceActiveCube(), Isis::EditTool::writeToCube(), Isis::ScatterPlotConfigDialog::xAxisCubeViewport(), and Isis::ScatterPlotConfigDialog::yAxisCubeViewport().

◆ cubeBands()

int Isis::CubeViewport::cubeBands ( ) const
inherited

Return the number of bands in the cube.

Returns
The number of bands in the cube

Definition at line 445 of file CubeViewport.cpp.

References Isis::Cube::bandCount(), and Isis::CubeViewport::p_cube.

Referenced by Isis::BandTool::copyAllViewports(), and Isis::BandTool::copyLinkedViewports().

◆ cubeChanged

void Isis::CubeViewport::cubeChanged ( bool  changed)
slotinherited

This method is called when the cube has changed or changes have been finalized.

Parameters
changed

Definition at line 561 of file CubeViewport.cpp.

References Isis::CubeViewport::p_saveEnabled.

Referenced by Isis::EditTool::redoEdit(), Isis::EditTool::save(), Isis::EditTool::undoEdit(), and Isis::EditTool::writeToCube().

◆ cubeContentsChanged()

void Isis::CubeViewport::cubeContentsChanged ( QRect  rect)
inherited

◆ cubeDataThread()

CubeDataThread* Isis::CubeViewport::cubeDataThread ( )
inlineinherited
Returns
this CubeViewport's CubeDataThread

Definition at line 473 of file CubeViewport.h.

References Isis::CubeViewport::p_cubeData.

◆ cubeID()

int Isis::CubeViewport::cubeID ( )
inlineinherited
Returns
the CubeViewport's cube id

Definition at line 480 of file CubeViewport.h.

References Isis::CubeViewport::p_cubeId.

◆ cubeLines()

◆ cubeSamples()

◆ cubeShown()

bool Isis::CubeViewport::cubeShown ( ) const
inlineinherited
Returns
if the cube is visible

Definition at line 219 of file CubeViewport.h.

References Isis::CubeViewport::p_cubeShown.

◆ cubeToContents()

void Isis::CubeViewport::cubeToContents ( double  sample,
double  line,
int &  x,
int &  y 
) const
inherited

Turns a cube into contents.

Convert a cube sample/line to a contents x/y (should not be outside)

Parameters
x
y
sample
line
sample
line
x
y

Definition at line 835 of file CubeViewport.cpp.

References Isis::CubeViewport::p_scale.

Referenced by Isis::CubeViewport::center(), Isis::CubeViewport::cubeToViewport(), and Isis::CubeViewport::setScale().

◆ cubeToViewport()

void Isis::CubeViewport::cubeToViewport ( double  sample,
double  line,
int &  x,
int &  y 
) const
inherited

◆ cursorInside()

bool Isis::CubeViewport::cursorInside ( ) const
inherited

Is cursor inside viewport.

Returns
bool

Definition at line 1809 of file CubeViewport.cpp.

◆ cursorPosition()

QPoint Isis::CubeViewport::cursorPosition ( ) const
inherited

Return the cursor position in the viewport.

Returns
QPoint

Definition at line 1834 of file CubeViewport.cpp.

◆ discardChanges

void Isis::CubeViewport::discardChanges ( CubeViewport )
signalinherited

Emitted when changes should be discarded.

Referenced by Isis::CubeViewport::confirmClose().

◆ doneWithData

void Isis::CubeViewport::doneWithData ( int  ,
const Isis::Brick  
)
signalinherited

Emitted when a brick is no longer needed, should only be sent to cube data thread.

Referenced by Isis::CubeViewport::cubeDataChanged(), and Isis::CubeViewport::CubeViewport().

◆ enableProgress

void Isis::CubeViewport::enableProgress ( )
slotinherited

This restarts the progress bar.

Does nothing if already loading.

Definition at line 972 of file CubeViewport.cpp.

References Isis::CubeViewport::p_progressTimer, and Isis::CubeViewport::progressChanged().

◆ eventFilter()

bool Isis::IndependentCubeViewport::eventFilter ( QObject o,
QEvent *  e 
)
virtual

Event filter to watch for mouse events on viewport.

Parameters
o
e
Returns
bool

Reimplemented from Isis::CubeViewport.

Definition at line 77 of file IndependentCubeViewport.cpp.

◆ fitScale()

double Isis::CubeViewport::fitScale ( ) const
inherited

Determine the scale that causes the full cube to fit in the viewport.

Returns
The fitScale of the Viewport
The scale

Definition at line 2270 of file CubeViewport.cpp.

References Isis::CubeViewport::cubeLines(), Isis::CubeViewport::cubeSamples(), and Isis::CubeViewport::scale().

Referenced by Isis::CubeViewport::showEvent(), and Isis::ZoomTool::zoomFit().

◆ fitScaleHeight()

double Isis::CubeViewport::fitScaleHeight ( ) const
inherited

Determine the scale of cube in heighth to fit in the viewport.

Returns
The height of the Viewport/
The scale for height

Definition at line 2298 of file CubeViewport.cpp.

References Isis::CubeViewport::cubeLines(), and Isis::CubeViewport::scale().

Referenced by Isis::ZoomTool::zoomFitHeight().

◆ fitScaleWidth()

double Isis::CubeViewport::fitScaleWidth ( ) const
inherited

Determine the scale of cube in the width to fit in the viewport.

Returns
The width of the Viewport
The scale for width

Definition at line 2285 of file CubeViewport.cpp.

References Isis::CubeViewport::cubeSamples(), and Isis::CubeViewport::scale().

Referenced by Isis::ZoomTool::zoomFitWidth().

◆ forgetStretches()

void Isis::CubeViewport::forgetStretches ( )
inherited

Resets all remembered stretches.

Definition at line 1973 of file CubeViewport.cpp.

References Isis::CubeViewport::p_knownStretches.

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

◆ getAllWhatsThisInfo()

void Isis::CubeViewport::getAllWhatsThisInfo ( Pvl pWhatsThisPvl)
inherited

◆ getBandFilterName()

void Isis::CubeViewport::getBandFilterName ( PvlKeyword pFilterNameKey)
inherited

Get Band Filter name from the Isis cube label.

Parameters
pFilterNameKey- FilterName keyword containing the corresponding keyword from the Isis Cube label
Author
Sharmila Prasad (4/5/2011)
Parameters
pFilterNameKey- FilterName keyword containing the corresponding keyword from the Isis Cube label

Definition at line 1474 of file CubeViewport.cpp.

References Isis::PvlObject::findGroup(), Isis::PvlContainer::findKeyword(), Isis::PvlObject::findObject(), Isis::PvlObject::hasGroup(), Isis::PvlContainer::hasKeyword(), Isis::Cube::label(), and Isis::CubeViewport::p_cube.

Referenced by Isis::CubeViewport::getAllWhatsThisInfo(), and Isis::CubeViewport::updateWhatsThis().

◆ getCubeArea()

void Isis::CubeViewport::getCubeArea ( double &  pdStartSample,
double &  pdEndSample,
double &  pdStartLine,
double &  pdEndLine 
)
inherited

Get Cube area corresponding to the viewport's dimension.

Parameters
pdStartSample- Cube Start Sample
pdEndSample- Cube End Sample
pdStartLine- Cube Start Line
pdEndLine- Cube End Line

Definition at line 1495 of file CubeViewport.cpp.

References Isis::CubeViewport::cubeLines(), Isis::CubeViewport::cubeSamples(), and Isis::CubeViewport::viewportToCube().

Referenced by Isis::CubeViewport::getAllWhatsThisInfo(), and Isis::CubeViewport::updateWhatsThis().

◆ grayBand()

◆ grayBuffer()

ViewportBuffer* Isis::CubeViewport::grayBuffer ( )
inlineinherited

◆ grayPixel()

double Isis::CubeViewport::grayPixel ( int  sample,
int  line 
)
inherited

Gets the gray pixel.

Return the gray pixel value at a sample/line.

Parameters
sampleThe sample
lineThe line
Returns
The grayPixel value
Parameters
sample
line
Returns
double

Definition at line 1654 of file CubeViewport.cpp.

References Isis::CubeViewport::BandInfo::band, Isis::CubeViewport::p_cube, Isis::CubeViewport::p_gray, Isis::CubeViewport::p_pntBrick, Isis::Cube::read(), and Isis::Brick::SetBasePosition().

Referenced by Isis::AdvancedTrackTool::updateRow().

◆ grayStretch()

◆ greenBand()

◆ greenBuffer()

ViewportBuffer* Isis::CubeViewport::greenBuffer ( )
inlineinherited

◆ greenPixel()

double Isis::CubeViewport::greenPixel ( int  sample,
int  line 
)
inherited

Gets the green pixel.

Return the green pixel value at a sample/line.

Parameters
sampleThe sample
lineThe line
Returns
The greenPixel value
Parameters
sample
line
Returns
double

Definition at line 1622 of file CubeViewport.cpp.

References Isis::CubeViewport::BandInfo::band, Isis::CubeViewport::p_cube, Isis::CubeViewport::p_green, Isis::CubeViewport::p_pntBrick, Isis::Cube::read(), and Isis::Brick::SetBasePosition().

◆ greenStretch()

◆ isColor()

bool Isis::CubeViewport::isColor ( ) const
inlineinherited

◆ isGray()

◆ keyPressEvent()

void Isis::CubeViewport::keyPressEvent ( QKeyEvent *  e)
protectedvirtualinherited

Process arrow keystrokes on cube.

Parameters
e
History:
2017-08-11 Adam Goins - Added the ability to ctrl + c to copy the filename of the current cube into the system's clipboard. Fixes #5098.

Definition at line 1759 of file CubeViewport.cpp.

References Isis::Cube::fileName(), Isis::CubeViewport::moveCursor(), Isis::CubeViewport::p_cube, Isis::CubeViewport::p_scale, Isis::CubeViewport::scale(), and Isis::CubeViewport::setScale().

◆ mouseButtonPress

void Isis::CubeViewport::mouseButtonPress ( QPoint  ,
Qt::MouseButton   
)
signalinherited

Emitted when mouse button pressed.

Referenced by Isis::CubeViewport::eventFilter().

◆ mouseButtonRelease

void Isis::CubeViewport::mouseButtonRelease ( QPoint  ,
Qt::MouseButton   
)
signalinherited

Emitted when mouse button released.

Referenced by Isis::CubeViewport::eventFilter().

◆ mouseDoubleClick

void Isis::CubeViewport::mouseDoubleClick ( QPoint  )
signalinherited

Emitted when double click happens.

Referenced by Isis::CubeViewport::eventFilter().

◆ mouseEnter

void Isis::CubeViewport::mouseEnter ( )
signalinherited

Emitted when the mouse enters the viewport.

Referenced by Isis::CubeViewport::eventFilter().

◆ mouseLeave

void Isis::CubeViewport::mouseLeave ( )
signalinherited

Emitted when the mouse leaves the viewport.

Referenced by Isis::CubeViewport::eventFilter().

◆ mouseMove [1/2]

void Isis::CubeViewport::mouseMove ( QPoint  )
signalinherited

Emitted when the mouse moves.

Referenced by Isis::CubeViewport::eventFilter().

◆ mouseMove [2/2]

void Isis::CubeViewport::mouseMove ( QPoint  ,
Qt::MouseButton   
)
signalinherited

Emitted when the mouse moves.

◆ moveCursor()

void Isis::CubeViewport::moveCursor ( int  x,
int  y 
)
inherited

Move the cursor by x,y if possible.

Parameters
x
y

Definition at line 1847 of file CubeViewport.cpp.

Referenced by Isis::CubeViewport::keyPressEvent().

◆ onProgressTimer

◆ paintEvent()

void Isis::IndependentCubeViewport::paintEvent ( QPaintEvent *  e)
virtual

Repaint the viewport.

Parameters
e[in] (QPaintEvent *) event
History:
2007-04-30 Tracie Sucharski - Add the QPainter to the call to Tool::paintViewport.

Reimplemented from Isis::CubeViewport.

Definition at line 133 of file IndependentCubeViewport.cpp.

References Isis::CubeViewport::paintEvent().

◆ paintPixmap() [1/2]

◆ paintPixmap() [2/2]

◆ paintPixmapRects()

void Isis::CubeViewport::paintPixmapRects ( )
privateinherited

◆ pixmap()

QPixmap Isis::CubeViewport::pixmap ( )
inlineinherited

Returns the pixmap.

Returns
QPixmap

Definition at line 401 of file CubeViewport.h.

References Isis::CubeViewport::p_pixmap.

Referenced by Isis::BlinkTool::eventFilter().

◆ progressChanged

void Isis::CubeViewport::progressChanged ( int  )
signalinherited

Emitted with current progress (0 to 100) when working.

Referenced by Isis::CubeViewport::enableProgress(), and Isis::CubeViewport::onProgressTimer().

◆ progressComplete

void Isis::CubeViewport::progressComplete ( )
signalinherited

Emitted when the current progress is complete (100)

Referenced by Isis::CubeViewport::onProgressTimer().

◆ projection()

Projection* Isis::CubeViewport::projection ( ) const
inlineinherited

◆ redBand()

◆ redBuffer()

ViewportBuffer* Isis::CubeViewport::redBuffer ( )
inlineinherited

◆ redPixel()

double Isis::CubeViewport::redPixel ( int  sample,
int  line 
)
inherited

Gets the red pixel.

Return the red pixel value at a sample/line.

Parameters
sampleThe sample
lineThe line
Returns
The redPixel value
Parameters
sample
line
Returns
double

Definition at line 1606 of file CubeViewport.cpp.

References Isis::CubeViewport::BandInfo::band, Isis::CubeViewport::p_cube, Isis::CubeViewport::p_pntBrick, Isis::CubeViewport::p_red, Isis::Cube::read(), and Isis::Brick::SetBasePosition().

Referenced by Isis::AdvancedTrackTool::updateRow().

◆ redStretch()

◆ resizeEvent()

◆ restretch()

void Isis::IndependentCubeViewport::restretch ( ViewportBuffer buffer)
virtual

This is called by internal viewport buffers when a stretch action should be performed.

The buffer passes itself as the argument.

Parameters
buffer

Implements Isis::CubeViewport.

Definition at line 152 of file IndependentCubeViewport.cpp.

References Isis::Stretch::CopyPairs(), Isis::StretchTool::Gray, and Isis::StretchTool::stretchBand().

◆ saveChanges

void Isis::CubeViewport::saveChanges ( CubeViewport )
signalinherited

Emitted when changes should be saved.

Referenced by Isis::CubeViewport::confirmClose().

◆ scale()

◆ scaleChanged

void Isis::CubeViewport::scaleChanged ( )
signalinherited

Emitted when zoom factor changed just before the repaint event.

Referenced by Isis::CubeViewport::setScale(), and Isis::CubeViewport::updateScrollBars().

◆ screenPixelsChanged

void Isis::CubeViewport::screenPixelsChanged ( )
signalinherited

◆ scrollBy

void Isis::CubeViewport::scrollBy ( int  dx,
int  dy 
)
slotinherited

Move the scrollbars by dx/dy screen pixels.

Parameters
dx
dy

Definition at line 869 of file CubeViewport.cpp.

References Isis::CubeViewport::scrollContentsBy(), and Isis::CubeViewport::updateScrollBars().

◆ scrollContentsBy()

◆ setAllBandStretches()

void Isis::CubeViewport::setAllBandStretches ( Stretch  stretch)
inherited

Sets a stretch for all bands.

Parameters
stretch

Definition at line 1983 of file CubeViewport.cpp.

References Isis::CubeViewport::p_knownStretches.

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

◆ setBackground()

void Isis::CubeViewport::setBackground ( QColor  color)
inlineinherited

Sets the background color.

Parameters
color

Definition at line 373 of file CubeViewport.h.

References Isis::CubeViewport::p_bgColor.

Referenced by Isis::SpecialPixelTool::apply().

◆ setCaption()

◆ setComboCount()

void Isis::CubeViewport::setComboCount ( int  count)
inlineinherited

Sets the band bin combo box count.

Parameters
count

Definition at line 382 of file CubeViewport.h.

References Isis::CubeViewport::p_comboCount.

Referenced by Isis::BandTool::setBandBin(), and Isis::BandTool::setList().

◆ setComboIndex()

void Isis::CubeViewport::setComboIndex ( int  index)
inlineinherited

Sets the band bin combo box index.

Parameters
index

Definition at line 391 of file CubeViewport.h.

References Isis::CubeViewport::p_comboIndex.

Referenced by Isis::BandTool::setBandBin(), and Isis::BandTool::setList().

◆ setCube()

void Isis::CubeViewport::setCube ( Cube cube)
inherited

This method sets the viewports cube.

Parameters
cubeThe cube to set the CubeViewport window to
cube

Definition at line 426 of file CubeViewport.cpp.

References Isis::CubeViewport::cube(), Isis::CubeViewport::p_cube, and Isis::CubeViewport::setCaption().

◆ setCursorPosition()

void Isis::CubeViewport::setCursorPosition ( int  x,
int  y 
)
inherited

Set the cursor position to x/y in the viewport.

Parameters
x
y

Definition at line 1874 of file CubeViewport.cpp.

◆ setScale [1/3]

void Isis::CubeViewport::setScale ( double  scale)
slotinherited

◆ setScale [2/3]

void Isis::CubeViewport::setScale ( double  scale,
double  sample,
double  line 
)
slotinherited

◆ setScale [3/3]

void Isis::CubeViewport::setScale ( double  scale,
int  x,
int  y 
)
slotinherited

Change the scale of the cube after moving x,y to the center.

Parameters
scale
x
y

Definition at line 655 of file CubeViewport.cpp.

References Isis::CubeViewport::scale(), Isis::CubeViewport::setScale(), and Isis::CubeViewport::viewportToCube().

◆ setTrackingCube()

void Isis::CubeViewport::setTrackingCube ( )
inherited

Finds the Tracking group from p_cube and stores the tracking cube name so that we can grab it in AdvancedTrackTool and get mosaic information.

This way, we are not opening the tracking cube every time the cursor is moved.

Definition at line 2375 of file CubeViewport.cpp.

References Isis::Cube::fileName(), Isis::PvlContainer::findKeyword(), Isis::Cube::group(), Isis::CubeViewport::p_cube, Isis::FileName::path(), and Isis::CubeViewport::trackingCube().

Referenced by Isis::CubeViewport::CubeViewport().

◆ shiftPixmap()

void Isis::CubeViewport::shiftPixmap ( int  dx,
int  dy 
)
privateinherited

Shifts the pixels on the pixmap without reading new data.

Parameters
dx
dy

Definition at line 1292 of file CubeViewport.cpp.

References Isis::CubeViewport::p_bgColor, Isis::CubeViewport::p_paintPixmap, Isis::CubeViewport::p_pixmap, and Isis::CubeViewport::paintPixmap().

Referenced by Isis::CubeViewport::center(), and Isis::CubeViewport::scrollContentsBy().

◆ sizeHint

QSize Isis::CubeViewport::sizeHint ( ) const
slotinherited

Make viewports show up as 512 by 512.

Returns
QSize

Definition at line 571 of file CubeViewport.cpp.

◆ stretchBlue [1/2]

◆ stretchBlue [2/2]

void Isis::CubeViewport::stretchBlue ( const Stretch stretch)
slotinherited

◆ stretchGray [1/2]

◆ stretchGray [2/2]

◆ stretchGreen [1/2]

◆ stretchGreen [2/2]

void Isis::CubeViewport::stretchGreen ( const Stretch stretch)
slotinherited

◆ stretchKnownGlobal

◆ stretchRed [1/2]

◆ stretchRed [2/2]

void Isis::CubeViewport::stretchRed ( const Stretch stretch)
slotinherited

◆ trackingCube()

Cube* Isis::CubeViewport::trackingCube ( ) const
inlineinherited
Returns
The tracking cube associated with p_cube (if it has one)

Definition at line 358 of file CubeViewport.h.

Referenced by Isis::CubeViewport::setTrackingCube(), and Isis::AdvancedTrackTool::TrackMosaicOrigin().

◆ universalGroundMap()

◆ updateScrollBars()

void Isis::CubeViewport::updateScrollBars ( int  x,
int  y 
)
privateinherited

◆ updateWhatsThis()

◆ viewGray

◆ viewportClosed

void Isis::CubeViewport::viewportClosed ( CubeViewport )
signalinherited

Emitted when viewport is closed.

◆ viewportToCube()

◆ viewportUpdated

void Isis::CubeViewport::viewportUpdated ( )
signalinherited

Emitted when viewport updated.

Referenced by Isis::MdiCubeViewport::paintEvent().

◆ viewRGB

◆ windowTitleChanged

void Isis::CubeViewport::windowTitleChanged ( )
signalinherited

Emitted when window title changes.

Referenced by Isis::CubeViewport::setCaption().

Member Data Documentation

◆ p_bgColor

QColor Isis::CubeViewport::p_bgColor
privateinherited

The color to paint the background of the viewport.

Definition at line 625 of file CubeViewport.h.

Referenced by Isis::CubeViewport::CubeViewport(), Isis::CubeViewport::paintPixmap(), Isis::CubeViewport::setBackground(), and Isis::CubeViewport::shiftPixmap().

◆ p_bluBrick

Brick* Isis::CubeViewport::p_bluBrick
privateinherited

Bricks for every color.

Definition at line 649 of file CubeViewport.h.

Referenced by Isis::CubeViewport::CubeViewport(), and Isis::CubeViewport::~CubeViewport().

◆ p_blue

◆ p_blueBuffer

◆ p_camera

Camera* Isis::CubeViewport::p_camera
privateinherited

◆ p_color

◆ p_comboCount

int Isis::CubeViewport::p_comboCount
privateinherited

Number of elements in band bin combo box.

Definition at line 644 of file CubeViewport.h.

Referenced by Isis::CubeViewport::comboCount(), Isis::CubeViewport::CubeViewport(), and Isis::CubeViewport::setComboCount().

◆ p_comboIndex

int Isis::CubeViewport::p_comboIndex
privateinherited

Current element chosen from combo box.

Definition at line 645 of file CubeViewport.h.

Referenced by Isis::CubeViewport::comboIndex(), Isis::CubeViewport::CubeViewport(), and Isis::CubeViewport::setComboIndex().

◆ p_cube

◆ p_cubeData

CubeDataThread* Isis::CubeViewport::p_cubeData
privateinherited

◆ p_cubeId

int Isis::CubeViewport::p_cubeId
privateinherited

◆ p_cubeShown

bool Isis::CubeViewport::p_cubeShown
privateinherited

Is the cube visible?

Definition at line 653 of file CubeViewport.h.

Referenced by Isis::CubeViewport::cubeShown(), Isis::CubeViewport::CubeViewport(), and Isis::CubeViewport::paintEvent().

◆ p_cubeWhatsThisText

QString Isis::CubeViewport::p_cubeWhatsThisText
privateinherited

The text for the cube's What's this.

Definition at line 659 of file CubeViewport.h.

Referenced by Isis::CubeViewport::CubeViewport(), and Isis::CubeViewport::updateWhatsThis().

◆ p_globalStretches

◆ p_gray

◆ p_grayBuffer

◆ p_green

◆ p_greenBuffer

◆ p_grnBrick

Brick* Isis::CubeViewport::p_grnBrick
privateinherited

Bricks for every color.

Definition at line 648 of file CubeViewport.h.

Referenced by Isis::CubeViewport::CubeViewport(), and Isis::CubeViewport::~CubeViewport().

◆ p_groundMap

UniversalGroundMap* Isis::CubeViewport::p_groundMap
privateinherited

The universal ground map from the cube.

Definition at line 630 of file CubeViewport.h.

Referenced by Isis::CubeViewport::CubeViewport(), Isis::CubeViewport::universalGroundMap(), and Isis::CubeViewport::~CubeViewport().

◆ p_gryBrick

Brick* Isis::CubeViewport::p_gryBrick
privateinherited

Bricks for every color.

Definition at line 650 of file CubeViewport.h.

Referenced by Isis::CubeViewport::CubeViewport(), and Isis::CubeViewport::~CubeViewport().

◆ p_image

QImage* Isis::CubeViewport::p_image
privateinherited

◆ p_knownStretches

QVector< Stretch * >* Isis::CubeViewport::p_knownStretches
protectedinherited

◆ p_paintPixmap

◆ p_pixmap

QPixmap Isis::CubeViewport::p_pixmap
protectedinherited

◆ p_pixmapPaintRects

QList< QRect * >* Isis::CubeViewport::p_pixmapPaintRects
privateinherited

◆ p_pntBrick

◆ p_progressTimer

QTimer* Isis::CubeViewport::p_progressTimer
privateinherited

◆ p_projection

Projection* Isis::CubeViewport::p_projection
privateinherited

The projection from the cube.

Definition at line 629 of file CubeViewport.h.

Referenced by Isis::CubeViewport::CubeViewport(), and Isis::CubeViewport::projection().

◆ p_red

◆ p_redBrick

Brick* Isis::CubeViewport::p_redBrick
privateinherited

Bricks for every color.

Definition at line 647 of file CubeViewport.h.

Referenced by Isis::CubeViewport::CubeViewport(), and Isis::CubeViewport::~CubeViewport().

◆ p_redBuffer

◆ p_saveEnabled

bool Isis::CubeViewport::p_saveEnabled
privateinherited

◆ p_scale

◆ p_thisOwnsCubeData

bool Isis::CubeViewport::p_thisOwnsCubeData
privateinherited

if true then this owns the CubeDataThread, and should thus delete it

Definition at line 673 of file CubeViewport.h.

Referenced by Isis::CubeViewport::CubeViewport(), and Isis::CubeViewport::~CubeViewport().

◆ p_updatingBuffers

◆ p_viewportWhatsThisText

QString Isis::CubeViewport::p_viewportWhatsThisText
privateinherited

The text for the viewport's what's this.

Definition at line 660 of file CubeViewport.h.

Referenced by Isis::CubeViewport::resizeEvent(), and Isis::CubeViewport::updateWhatsThis().

◆ p_whatsThisText

QString Isis::CubeViewport::p_whatsThisText
privateinherited

The text for What's this.

Definition at line 658 of file CubeViewport.h.

Referenced by Isis::CubeViewport::CubeViewport(), and Isis::CubeViewport::updateWhatsThis().


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