Isis 3.0
Home
Isis::CubeViewport Class Referenceabstract

Widget to display Isis cubes for qt apps. More...

#include <CubeViewport.h>

Inherits QAbstractScrollArea.

Inherited by Isis::IndependentCubeViewport, and Isis::MdiCubeViewport.

Classes

class  BandInfo
 

Public Slots

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 stretchRed (const QString &string)
 Apply stretch pairs to red bands. More...
 
void stretchGreen (const QString &string)
 Apply stretch pairs to green bands. More...
 
void stretchBlue (const QString &string)
 Apply stretch pairs to blue bands. More...
 
void stretchGray (const Stretch &stretch)
 Sets the stretch for gray mode. More...
 
void stretchRed (const Stretch &stretch)
 Sets the stretch for red in rgb mode. More...
 
void stretchGreen (const Stretch &stretch)
 Sets the stretch for green in rgb mode. 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 showEvent (QShowEvent *)
 This method is called to initially show the viewport. 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 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 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

 CubeViewport (Cube *cube, CubeDataThread *cdt=0, QWidget *parent=0)
 Construct a cube viewport. More...
 
virtual ~CubeViewport ()
 Destructor. More...
 
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
 Is the viewport shown in 3-band color. More...
 
bool isGray () const
 Is the viewport shown in gray / b&w. More...
 
int grayBand () const
 Return the gray band currently viewed. More...
 
int redBand () const
 Return the red band currently viewed. More...
 
int greenBand () const
 Return the green band currently viewed. More...
 
int blueBand () const
 Return the blue band currently viewed. More...
 
double scale () const
 Return the scale. More...
 
bool cubeShown () const
 Return if the cube is visible. More...
 
int comboCount () const
 Return the BandBin combo box count. More...
 
int comboIndex () const
 Return the BandBin combo box index. More...
 
void cubeContentsChanged (QRect rect)
 Cube changed, repaint given area. 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
 Convert a viewport x/y to a cube sample/line (may be outside the cube) More...
 
void cubeToViewport (double sample, double line, int &x, int &y) const
 Convert a cube sample/line to a viewport x/y (may be outside the viewport) More...
 
void contentsToCube (int x, int y, double &sample, double &line) const
 Convert a contents x/y to a cube sample/line (may be outside the cube) More...
 
void cubeToContents (double sample, double line, int &x, int &y) const
 Convert a cube sample/line to a contents x/y (should not be outside) More...
 
double redPixel (int sample, int line)
 Return the red pixel value at a sample/line. More...
 
double greenPixel (int sample, int line)
 Return the green pixel value at a sample/line. More...
 
double bluePixel (int sample, int line)
 Return the blue pixel value at a sample/line. More...
 
double grayPixel (int sample, int line)
 Return the gray pixel value at a sample/line. More...
 
Stretch grayStretch () const
 Return the gray band stretch. More...
 
Stretch redStretch () const
 Return the red band stretch. More...
 
Stretch greenStretch () const
 Return the green band stretch. More...
 
Stretch blueStretch () const
 Return the blue band stretch. More...
 
Cubecube () const
 Return the cube associated with viewport. More...
 
Projectionprojection () const
 Return the projection associated with cube (NULL implies none) More...
 
Cameracamera () const
 Return the camera associated with the cube (NULL implies none) More...
 
UniversalGroundMapuniversalGroundMap () const
 Return the universal ground map associated with the cube (NULL implies none) More...
 
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...
 
virtual void restretch (ViewportBuffer *buffer)=0
 This is called by internal viewport buffers when a stretch action should be performed. 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...
 

Protected Slots

virtual void cubeDataChanged (int cubeId, const Isis::Brick *)
 This method updates the internal viewport buffer based on changes in cube DN values. More...
 

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 bool eventFilter (QObject *o, QEvent *e)
 Event filter to watch for mouse events on viewport. More...
 
virtual void keyPressEvent (QKeyEvent *e)
 Process arrow keystrokes on cube. More...
 
virtual void paintEvent (QPaintEvent *e)
 Repaint the viewport. 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...
 

Detailed Description

Widget to display Isis cubes for qt apps.

Author
????-??-?? Jeff Anderson

Constructor & Destructor Documentation

Isis::CubeViewport::~CubeViewport ( )
virtual

Member Function Documentation

int Isis::CubeViewport::blueBand ( ) const
inline
ViewportBuffer* Isis::CubeViewport::blueBuffer ( )
inline
double Isis::CubeViewport::bluePixel ( int  sample,
int  line 
)

Return the blue pixel value at a sample/line.

Parameters
sample
line
Returns
double

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

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

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 paintPixmap(), and Isis::ViewportBuffer::working().

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

Return the camera associated with the cube (NULL implies none)

Referenced by Isis::MeasureTool::rubberBandComplete(), and Isis::FindTool::updateTool().

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

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

Parameters
x
y

References viewportToCube().

Referenced by Isis::PanTool::mouseButtonRelease(), and setScale().

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

Bring the cube sample/line the center.

Parameters
sample
line

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

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

Allows users to change the cursor type on the viewport.

Parameters
cursor
int Isis::CubeViewport::comboCount ( ) const
inline

Return the BandBin combo box count.

int Isis::CubeViewport::comboIndex ( ) const
inline

Return the BandBin combo box index.

bool Isis::CubeViewport::confirmClose ( )

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 cube(), discardChanges(), and saveChanges().

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

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

Parameters
x
y
sample
line

Referenced by setScale(), and viewportToCube().

int Isis::CubeViewport::cubeBands ( ) const

Return the number of bands in the cube.

References Isis::Cube::bandCount().

Referenced by Isis::IndependentCubeViewport::resetKnownGlobal().

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

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

Parameters
changed
void Isis::CubeViewport::cubeContentsChanged ( QRect  cubeRect)

Cube changed, repaint given area.

Parameters
[in]cubeRect(QRect rect) Rectange containing portion of cube (sample/line) that changed.

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

void Isis::CubeViewport::cubeDataChanged ( int  cubeId,
const Isis::Brick data 
)
protectedvirtualslot

This method updates the internal viewport buffer based on changes in cube DN values.

Parameters
cubeIdCube that the changed brick belongs to
dataNew data

References cube(), cubeToViewport(), doneWithData(), Isis::ViewportBuffer::fillBuffer(), Isis::Buffer::Line(), Isis::Cube::lineCount(), Isis::Buffer::LineDimension(), Isis::Buffer::Sample(), Isis::Cube::sampleCount(), and Isis::Buffer::SampleDimension().

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

CubeDataThread* Isis::CubeViewport::cubeDataThread ( )
inline
int Isis::CubeViewport::cubeID ( )
inline
int Isis::CubeViewport::cubeSamples ( ) const
bool Isis::CubeViewport::cubeShown ( ) const
inline

Return if the cube is visible.

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

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

Parameters
sample
line
x
y

Referenced by center(), cubeToViewport(), and setScale().

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

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

Parameters
sample
line
x
y

References cubeToContents().

Referenced by cubeContentsChanged(), cubeDataChanged(), Isis::CubePlotCurve::paint(), Isis::SunShadowTool::paintViewport(), Isis::StereoTool::paintViewport(), Isis::FindTool::paintViewport(), and Isis::HistogramTool::refreshPlot().

bool Isis::CubeViewport::cursorInside ( ) const

Is cursor inside viewport.

Returns
bool
QPoint Isis::CubeViewport::cursorPosition ( ) const

Return the cursor position in the viewport.

Returns
QPoint
void Isis::CubeViewport::discardChanges ( CubeViewport _t1)
signal

Emitted when changes should be discarded.

Referenced by confirmClose().

void Isis::CubeViewport::doneWithData ( int  _t1,
const Isis::Brick _t2 
)
signal

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

Referenced by cubeDataChanged(), and CubeViewport().

void Isis::CubeViewport::enableProgress ( )
slot

This restarts the progress bar.

Does nothing if already loading.

References progressChanged().

bool Isis::CubeViewport::eventFilter ( QObject o,
QEvent *  e 
)
protectedvirtual

Event filter to watch for mouse events on viewport.

Parameters
o
e
Returns
bool

Reimplemented in Isis::IndependentCubeViewport.

References mouseButtonPress(), mouseButtonRelease(), mouseDoubleClick(), mouseEnter(), mouseLeave(), and mouseMove().

double Isis::CubeViewport::fitScale ( ) const

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

Returns
The scale

References cubeLines(), cubeSamples(), and scale().

Referenced by showEvent().

double Isis::CubeViewport::fitScaleHeight ( ) const

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

Returns
The scale for height

References cubeLines(), and scale().

double Isis::CubeViewport::fitScaleWidth ( ) const

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

Returns
The scale for width

References cubeSamples(), and scale().

void Isis::CubeViewport::forgetStretches ( )

Resets all remembered stretches.

References p_knownStretches.

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

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

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(), getBandFilterName(), getCubeArea(), Isis::Cube::lineCount(), Isis::Cube::physicalBand(), Isis::Cube::sampleCount(), Isis::PvlKeyword::size(), and Isis::toString().

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

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

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
PvlKeyword&pFilterNameKey - FilterName keyword containing the corresponding keyword from the Isis Cube label

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

Referenced by getAllWhatsThisInfo().

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

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 cubeLines(), cubeSamples(), and viewportToCube().

Referenced by getAllWhatsThisInfo().

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

Return the gray pixel value at a sample/line.

Parameters
sample
line
Returns
double

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

int Isis::CubeViewport::greenBand ( ) const
inline
ViewportBuffer* Isis::CubeViewport::greenBuffer ( )
inline
double Isis::CubeViewport::greenPixel ( int  sample,
int  line 
)

Return the green pixel value at a sample/line.

Parameters
sample
line
Returns
double

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

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

Is the viewport shown in 3-band color.

Referenced by Isis::EditTool::mouseButtonRelease(), and Isis::EditTool::rubberBandComplete().

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

Process arrow keystrokes on cube.

Parameters
e

References moveCursor(), scale(), and setScale().

void Isis::CubeViewport::mouseButtonPress ( QPoint  _t1,
Qt::MouseButton  _t2 
)
signal

Emitted when mouse button pressed.

Referenced by eventFilter().

void Isis::CubeViewport::mouseButtonRelease ( QPoint  _t1,
Qt::MouseButton  _t2 
)
signal

Emitted when mouse button released.

Referenced by eventFilter().

void Isis::CubeViewport::mouseDoubleClick ( QPoint  _t1)
signal

Emitted when double click happens.

Referenced by eventFilter().

void Isis::CubeViewport::mouseEnter ( )
signal

Emitted when the mouse enters the viewport.

Referenced by Isis::IndependentCubeViewport::eventFilter(), and eventFilter().

void Isis::CubeViewport::mouseLeave ( )
signal

Emitted when the mouse leaves the viewport.

Referenced by Isis::IndependentCubeViewport::eventFilter(), and eventFilter().

void Isis::CubeViewport::mouseMove ( QPoint  _t1)
signal

Emitted when the mouse moves.

Referenced by eventFilter().

void Isis::CubeViewport::mouseMove ( QPoint  _t1,
Qt::MouseButton  _t2 
)
signal

Emitted when the mouse moves.

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

Move the cursor by x,y if possible.

Parameters
x
y

Referenced by keyPressEvent().

void Isis::CubeViewport::onProgressTimer ( )
slot

This updates the progress bar visually.

Conceptually it emits the progressChanged signal with the current progress.

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

Referenced by CubeViewport().

void Isis::CubeViewport::paintEvent ( QPaintEvent *  e)
protectedvirtual

Repaint the viewport.

Parameters
e[in] (QPaintEvent *) event

Reimplemented in Isis::IndependentCubeViewport, and Isis::MdiCubeViewport.

Referenced by Isis::IndependentCubeViewport::paintEvent(), and Isis::MdiCubeViewport::paintEvent().

void Isis::CubeViewport::paintPixmap ( )
QPixmap Isis::CubeViewport::pixmap ( )
inline

Returns the pixmap.

Returns
QPixmap

References p_pixmap.

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

void Isis::CubeViewport::progressChanged ( int  _t1)
signal

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

Referenced by enableProgress(), and onProgressTimer().

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

Return the projection associated with cube (NULL implies none)

Referenced by Isis::MeasureTool::rubberBandComplete(), and Isis::FindTool::updateTool().

int Isis::CubeViewport::redBand ( ) const
inline
ViewportBuffer* Isis::CubeViewport::redBuffer ( )
inline
double Isis::CubeViewport::redPixel ( int  sample,
int  line 
)

Return the red pixel value at a sample/line.

Parameters
sample
line
Returns
double

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

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

The viewport is being resized.

Parameters
e

References p_pixmap, paintPixmap(), Isis::ViewportBuffer::resizedViewport(), and screenPixelsChanged().

virtual void Isis::CubeViewport::restretch ( ViewportBuffer buffer)
pure virtual

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

The buffer passes itself as the argument.

Parameters
buffer

Implemented in Isis::IndependentCubeViewport, and Isis::MdiCubeViewport.

void Isis::CubeViewport::saveChanges ( CubeViewport _t1)
signal

Emitted when changes should be saved.

Referenced by confirmClose().

double Isis::CubeViewport::scale ( ) const
inline
void Isis::CubeViewport::scaleChanged ( )
signal

Emitted when zoom factor changed just before the repaint event.

Referenced by setScale().

void Isis::CubeViewport::screenPixelsChanged ( )
signal

Emitted when cube pixels that should be on the screen change.

Referenced by center(), onProgressTimer(), resizeEvent(), scrollContentsBy(), and setScale().

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

Move the scrollbars by dx/dy screen pixels.

Parameters
dx
dy

References scrollContentsBy().

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

Scroll the viewport contents by dx/dy screen pixels.

Parameters
dx
dy

References Isis::ViewportBuffer::bufferXYRect(), paintPixmap(), Isis::ViewportBuffer::pan(), screenPixelsChanged(), and Isis::ViewportBuffer::working().

Referenced by scrollBy().

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

Sets a stretch for all bands.

Parameters
stretch

References p_knownStretches.

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

Sets the background color.

Parameters
color
void Isis::CubeViewport::setCaption ( )

Change the caption on the viewport title bar.

References Isis::CubeViewport::BandInfo::band, Isis::Cube::fileName(), and windowTitleChanged().

Referenced by CubeViewport(), setCube(), setScale(), viewGray(), and viewRGB().

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

Sets the band bin combo box count.

Parameters
count
void Isis::CubeViewport::setComboIndex ( int  index)
inline

Sets the band bin combo box index.

Parameters
index
void Isis::CubeViewport::setCube ( Cube cube)

This method sets the viewports cube.

Parameters
cube

References cube(), and setCaption().

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

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

Parameters
x
y
void Isis::CubeViewport::setScale ( double  scale)
slot

Change the scale of the cube to the given parameter value.

This method will reset the scale value if the value passed in is too large or too small.

Parameters
scaleValue by which to scale the image.

References contentsToCube(), cubeLines(), cubeSamples(), cubeToContents(), paintPixmap(), scale(), Isis::ViewportBuffer::scaleChanged(), scaleChanged(), screenPixelsChanged(), and setCaption().

Referenced by keyPressEvent(), setScale(), and showEvent().

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

Change the scale of the cube after moving samp/line to the center.

Parameters
scale
sample
line

References center(), Isis::ViewportBuffer::enable(), Isis::ViewportBuffer::enabled(), paintPixmap(), screenPixelsChanged(), and setScale().

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

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

Parameters
scale
x
y

References setScale(), and viewportToCube().

void Isis::CubeViewport::showEvent ( QShowEvent *  event)
slot

This method is called to initially show the viewport.

It will set the scale to show the entire cube and enable the gray buffer.

References Isis::ViewportBuffer::addStretchAction(), cubeLines(), cubeSamples(), Isis::ViewportBuffer::enable(), Isis::ViewportBuffer::enabled(), fitScale(), paintPixmap(), and setScale().

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

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

Make viewports show up as 512 by 512.

Returns
QSize
void Isis::CubeViewport::stretchBlue ( const QString &  string)
slot

Apply stretch pairs to blue bands.

Parameters
stretch

References Isis::Stretch::Parse().

Referenced by stretchKnownGlobal(), and Isis::StretchTool::stretchRequested().

void Isis::CubeViewport::stretchBlue ( const Stretch stretch)
slot
void Isis::CubeViewport::stretchGray ( const QString &  string)
slot
void Isis::CubeViewport::stretchGray ( const Stretch stretch)
slot
void Isis::CubeViewport::stretchGreen ( const QString &  string)
slot

Apply stretch pairs to green bands.

Parameters
stretch

References Isis::Stretch::Parse().

Referenced by stretchKnownGlobal(), and Isis::StretchTool::stretchRequested().

void Isis::CubeViewport::stretchGreen ( const Stretch stretch)
slot
void Isis::CubeViewport::stretchKnownGlobal ( )
slot

List<Tool *> p This stretches to the global stretch.

References blueBand(), grayBand(), greenBand(), isGray(), p_globalStretches, redBand(), stretchBlue(), stretchGray(), stretchGreen(), and stretchRed().

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

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

Apply stretch pairs to red bands.

Parameters
stretch

References Isis::Stretch::Parse().

Referenced by stretchKnownGlobal(), and Isis::StretchTool::stretchRequested().

void Isis::CubeViewport::stretchRed ( const Stretch stretch)
slot
UniversalGroundMap* Isis::CubeViewport::universalGroundMap ( ) const
inline
void Isis::CubeViewport::viewportClosed ( CubeViewport _t1)
signal

Emitted when viewport is closed.

void Isis::CubeViewport::viewportUpdated ( )
signal

Emitted when viewport updated.

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

void Isis::CubeViewport::windowTitleChanged ( )
signal

Emitted when window title changes.

Referenced by setCaption().

Member Data Documentation

QVector< Stretch * >* Isis::CubeViewport::p_globalStretches
protected
QVector< Stretch * >* Isis::CubeViewport::p_knownStretches
protected

Stretches for each previously stretched band.

Referenced by CubeViewport(), forgetStretches(), setAllBandStretches(), viewGray(), viewRGB(), and ~CubeViewport().

QPixmap Isis::CubeViewport::p_pixmap
protected

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