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

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.
 
void viewportClosed (CubeViewport *)
 Emitted when viewport is closed.
 
void mouseEnter ()
 Emitted when the mouse enters the viewport.
 
void mouseMove (QPoint)
 Emitted when the mouse moves.
 
void mouseMove (QPoint, Qt::MouseButton)
 Emitted when the mouse moves.
 
void mouseLeave ()
 Emitted when the mouse leaves the viewport.
 
void mouseButtonPress (QPoint, Qt::MouseButton)
 Emitted when mouse button pressed.
 
void mouseButtonRelease (QPoint, Qt::MouseButton)
 Emitted when mouse button released.
 
void mouseDoubleClick (QPoint)
 Emitted when double click happens.
 
void windowTitleChanged ()
 Emitted when window title changes.
 
void scaleChanged ()
 Emitted when zoom factor changed just before the repaint event.
 
void saveChanges (CubeViewport *)
 Emitted when changes should be saved.
 
void discardChanges (CubeViewport *)
 Emitted when changes should be discarded.
 
void screenPixelsChanged ()
 Emitted when cube pixels that should be on the screen change.
 
void progressChanged (int)
 Emitted with current progress (0 to 100) when working.
 
void progressComplete ()
 Emitted when the current progress is complete (100)
 
void doneWithData (int, const Isis::Brick *)
 Emitted when a brick is no longer needed, should only be sent to cube data thread.
 

Public Member Functions

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

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.
 
virtual void resizeEvent (QResizeEvent *e)
 The viewport is being resized.
 
virtual void keyPressEvent (QKeyEvent *e)
 Process arrow keystrokes on cube.
 

Protected Attributes

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

Detailed Description

General purpose Cube display widget.

Author
????-??-?? Eric Hyer

Constructor & Destructor Documentation

◆ IndependentCubeViewport()

Isis::IndependentCubeViewport::IndependentCubeViewport ( Cube * cube,
CubeDataThread * cdt = 0,
QWidget * parent = 0 )

◆ ~IndependentCubeViewport()

Isis::IndependentCubeViewport::~IndependentCubeViewport ( )

Member Function Documentation

◆ blueBand()

int Isis::CubeViewport::blueBand ( ) const
inlineinherited
Returns
the blue band currently viewed

References Isis::CubeViewport::BandInfo::band.

Referenced by Isis::CubeViewport::stretchBlue(), and Isis::CubeViewport::stretchKnownGlobal().

◆ blueBuffer()

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

Returns the blue viewport buffer (Will be NULL if in Gray mode.)

Returns
ViewportBuffer*

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

◆ 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

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

◆ blueStretch()

CubeStretch Isis::CubeViewport::blueStretch ( ) const
inherited

Return the blue band stretch.

Returns
The blue Strech

References Isis::CubeViewport::BandInfo::getStretch().

◆ 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

References Isis::CubeViewport::paintPixmap(), and Isis::ViewportBuffer::working().

◆ camera()

Camera * Isis::CubeViewport::camera ( ) const
inlineinherited
Returns
The camera associated with the cube (NULL implies none)

◆ cantTrack

void Isis::IndependentCubeViewport::cantTrack ( QString ,
IndependentCubeViewport *  )
signal

◆ center [1/2]

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

Bring the cube sample/line the center.

Parameters
sampleValue of the sample to center on.
lineValue of the line to center on.

References Isis::CubeViewport::cubeToContents(), Isis::ViewportBuffer::pan(), and Isis::CubeViewport::screenPixelsChanged().

◆ 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

References Isis::CubeViewport::center(), and Isis::CubeViewport::viewportToCube().

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

◆ changeCursor

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

Allows users to change the cursor type on the viewport.

Parameters
cursor

◆ comboCount()

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

◆ comboIndex()

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

◆ 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.

References Isis::CubeViewport::cube(), Isis::CubeViewport::discardChanges(), 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

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

◆ cube()

◆ cubeBands()

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

Return the number of bands in the cube.

Returns
The number of bands in the cube

References Isis::Cube::bandCount().

Referenced by resetKnownGlobal().

◆ cubeChanged

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

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

Parameters
changed

◆ cubeContentsChanged()

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

Calle dhwen the contents of the cube changes.

Cube changed, repaint given area.

Parameters
rectThe QRect
rectRectangle containing portion of cube (sample/line) that changed.

References Isis::CubeViewport::cube(), Isis::CubeViewport::cubeToViewport(), Isis::ViewportBuffer::fillBuffer(), Isis::Cube::lineCount(), and Isis::Cube::sampleCount().

◆ cubeDataChanged

◆ cubeDataThread()

CubeDataThread * Isis::CubeViewport::cubeDataThread ( )
inlineinherited

◆ cubeID()

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

Referenced by cubeDataChanged().

◆ cubeLines()

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

◆ cubeSamples()

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

◆ cubeShown()

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

◆ 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

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

Turns a cube into a viewport.

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

Parameters
x
y
sample
line
sample
line
x
y

References Isis::CubeViewport::cubeToContents().

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

◆ cursorInside()

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

Is cursor inside viewport.

Returns
bool

◆ cursorPosition()

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

Return the cursor position in the viewport.

Returns
QPoint

◆ 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.

References 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.

References Isis::CubeViewport::mouseEnter(), Isis::CubeViewport::mouseLeave(), and synchronize().

◆ 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

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

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

◆ 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

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

◆ 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

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

◆ forgetStretches()

void Isis::CubeViewport::forgetStretches ( )
inherited

Resets all remembered stretches.

References Isis::CubeViewport::p_knownStretches.

◆ getAllWhatsThisInfo()

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

Get All WhatsThis info - viewport, cube, area in PVL format.

Parameters
pWhatsThisPvl- Pvl for all whatsthis info
Author
Sharmila Prasad (4/5/2011)
Parameters
pWhatsThisPvl- Pvl for all whatsthis info

References Isis::Cube::bandCount(), Isis::Cube::fileName(), Isis::ViewportBuffer::getBand(), Isis::CubeViewport::getBandFilterName(), Isis::CubeViewport::getCubeArea(), Isis::Cube::lineCount(), Isis::Cube::physicalBand(), Isis::Cube::sampleCount(), and Isis::toString().

Referenced by Isis::FileTool::saveInfo().

◆ 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

References Isis::PvlContainer::findKeyword(), Isis::PvlObject::findObject(), and Isis::Cube::label().

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

◆ 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

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

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

◆ grayBand()

int Isis::CubeViewport::grayBand ( ) const
inlineinherited

◆ grayBuffer()

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

Returns the gray viewport buffer (Will be NULL if in RGB mode.)

Returns
ViewportBuffer*

Referenced by resetKnownGlobal(), Isis::MdiCubeViewport::restretch(), and showEvent().

◆ 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

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

◆ grayStretch()

CubeStretch Isis::CubeViewport::grayStretch ( ) const
inherited

Return the gray band stretch.

Returns
The gray Stretch

References Isis::CubeViewport::BandInfo::getStretch().

Referenced by cubeDataChanged(), and restretch().

◆ greenBand()

int Isis::CubeViewport::greenBand ( ) const
inlineinherited
Returns
the green band currently viewed

References Isis::CubeViewport::BandInfo::band.

Referenced by Isis::CubeViewport::stretchGreen(), and Isis::CubeViewport::stretchKnownGlobal().

◆ greenBuffer()

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

Returns the green viewport buffer (Will be NULL if in Gray mode.)

Returns
ViewportBuffer*

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

◆ 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

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

◆ greenStretch()

CubeStretch Isis::CubeViewport::greenStretch ( ) const
inherited

Return the green band stretch.

Returns
The green Stretch

References Isis::CubeViewport::BandInfo::getStretch().

◆ isColor()

bool Isis::CubeViewport::isColor ( ) const
inlineinherited
Returns
Is the viewport shown in 3-band color

◆ isGray()

bool Isis::CubeViewport::isGray ( ) const
inlineinherited
Returns
Is the viewport shown in gray / b&w

Referenced by Isis::SpatialPlotTool::refreshPlot(), and Isis::CubeViewport::stretchKnownGlobal().

◆ 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.

References Isis::Cube::fileName(), Isis::CubeViewport::moveCursor(), 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(), and eventFilter().

◆ mouseLeave

void Isis::CubeViewport::mouseLeave ( )
signalinherited

Emitted when the mouse leaves the viewport.

Referenced by Isis::CubeViewport::eventFilter(), and 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

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

◆ onProgressTimer

void Isis::CubeViewport::onProgressTimer ( )
slotinherited

This updates the progress bar visually.

Conceptually it emits the progressChanged signal with the current progress.

References Isis::ViewportBuffer::currentProgress(), Isis::CubeViewport::progressChanged(), Isis::CubeViewport::progressComplete(), Isis::CubeViewport::screenPixelsChanged(), and Isis::ViewportBuffer::working().

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

◆ paintEvent()

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

Repaint the viewport.

Parameters
e[in] (QPaintEvent *) event

Reimplemented from Isis::CubeViewport.

References Isis::CubeViewport::p_pixmap, and Isis::CubeViewport::paintEvent().

◆ paintPixmap()

◆ pixmap()

QPixmap Isis::CubeViewport::pixmap ( )
inlineinherited

Returns the pixmap.

Returns
QPixmap

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
Returns
The projection associated with cube (NULL implies none)

◆ redBand()

int Isis::CubeViewport::redBand ( ) const
inlineinherited

◆ redBuffer()

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

Returns the red viewport buffer (Will be NULL if in Gray mode.)

Returns
ViewportBuffer*

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

◆ 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

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

◆ redStretch()

CubeStretch Isis::CubeViewport::redStretch ( ) const
inherited

Return the red band stretch.

Returns
The red Stretch

References Isis::CubeViewport::BandInfo::getStretch().

◆ resetKnownGlobal

◆ resizeEvent()

void Isis::CubeViewport::resizeEvent ( QResizeEvent * e)
protectedvirtualinherited

◆ 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.

References Isis::StretchTool::Gray, Isis::CubeViewport::grayStretch(), Isis::StretchTool::stretchBand(), and Isis::CubeViewport::stretchGray().

Referenced by showEvent().

◆ 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().

◆ 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

References Isis::CubeViewport::scrollContentsBy().

◆ scrollContentsBy()

void Isis::CubeViewport::scrollContentsBy ( int dx,
int dy )
protectedinherited

◆ setAllBandStretches()

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

Sets a stretch for all bands.

Parameters
stretch

References Isis::CubeViewport::p_knownStretches.

◆ setBackground()

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

Sets the background color.

Parameters
color

◆ setCaption()

◆ setComboCount()

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

Sets the band bin combo box count.

Parameters
count

◆ setComboIndex()

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

Sets the band bin combo box index.

Parameters
index

◆ setCube()

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

This method sets the viewports cube.

Parameters
cubeThe cube to set the CubeViewport window to
cube

References Isis::CubeViewport::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

◆ 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

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.

References Isis::Cube::fileName(), Isis::Cube::group(), and Isis::CubeViewport::trackingCube().

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

◆ showEvent()

void Isis::IndependentCubeViewport::showEvent ( QShowEvent * e)
virtual

◆ sizeHint

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

Make viewports show up as 512 by 512.

Returns
QSize

◆ stretchBlue [1/2]

void Isis::CubeViewport::stretchBlue ( const QString & string)
slotinherited

Apply stretch pairs to blue bands.

Parameters
string

References Isis::Stretch::Parse(), and Isis::CubeViewport::stretchBlue().

Referenced by Isis::CubeViewport::stretchBlue(), and Isis::CubeViewport::stretchKnownGlobal().

◆ stretchBlue [2/2]

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

◆ stretchGray [1/2]

void Isis::CubeViewport::stretchGray ( const QString & string)
slotinherited

◆ stretchGray [2/2]

void Isis::CubeViewport::stretchGray ( const Stretch & stretch)
slotinherited

◆ stretchGreen [1/2]

void Isis::CubeViewport::stretchGreen ( const QString & string)
slotinherited

Apply stretch pairs to green bands.

Parameters
stringthe stretch

References Isis::Stretch::Parse(), and Isis::CubeViewport::stretchGreen().

Referenced by Isis::CubeViewport::stretchGreen(), and Isis::CubeViewport::stretchKnownGlobal().

◆ stretchGreen [2/2]

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

◆ stretchKnownGlobal

◆ stretchRed [1/2]

void Isis::CubeViewport::stretchRed ( const QString & string)
slotinherited

Apply stretch pairs to red bands.

Parameters
stringThe stretch

References Isis::Stretch::Parse(), and Isis::CubeViewport::stretchRed().

Referenced by Isis::CubeViewport::stretchKnownGlobal(), and Isis::CubeViewport::stretchRed().

◆ stretchRed [2/2]

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

◆ synchronize

void Isis::IndependentCubeViewport::synchronize ( IndependentCubeViewport * )
signal

Referenced by eventFilter().

◆ trackingChanged [1/2]

void Isis::IndependentCubeViewport::trackingChanged ( double samp,
double line,
double dn,
IndependentCubeViewport *  )
signal

◆ trackingChanged [2/2]

void Isis::IndependentCubeViewport::trackingChanged ( double sample,
double line,
double lat,
double lon,
double dn,
IndependentCubeViewport *  )
signal

◆ trackingCube()

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

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

◆ universalGroundMap()

UniversalGroundMap * Isis::CubeViewport::universalGroundMap ( ) const
inlineinherited
Returns
the universal ground map associated with the cube (NULL implies none)

◆ viewGray

◆ viewportClosed

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

Emitted when viewport is closed.

◆ viewportToCube()

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

Turns a viewport into a cube.

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

Parameters
x
y
sample
line

References Isis::CubeViewport::contentsToCube().

Referenced by Isis::CubeViewport::center(), Isis::CubeViewport::getCubeArea(), Isis::SunShadowTool::mouseButtonPress(), Isis::SunShadowTool::mouseMove(), Isis::CubeViewport::setScale(), and Isis::HistogramItem::setVertices().

◆ 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_globalStretches

◆ p_knownStretches

◆ p_pixmap

QPixmap Isis::CubeViewport::p_pixmap
protectedinherited

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