Isis Developer Reference
|
Widget to display Isis cubes for qt apps. More...
#include <CubeViewport.h>
Classes | |
class | BandInfo |
Public Slots | |
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 | stretchRed (const QString &string) |
Apply stretch pairs to red bands. | |
void | stretchGreen (const QString &string) |
Apply stretch pairs to green bands. | |
void | stretchBlue (const QString &string) |
Apply stretch pairs to blue bands. | |
void | stretchGray (const Stretch &stretch) |
Sets the stretch for gray mode. | |
void | stretchRed (const Stretch &stretch) |
Sets the stretch for red in rgb mode. | |
void | stretchGreen (const Stretch &stretch) |
Sets the stretch for green in rgb mode. | |
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 | showEvent (QShowEvent *) |
This method is called to initially show the viewport. | |
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 | 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 | |
CubeViewport (Cube *cube, CubeDataThread *cdt=0, QWidget *parent=0) | |
Constructor for the CubeViewport. | |
virtual | ~CubeViewport () |
Deconstructor for the Cubeviewport. | |
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. | |
Cube * | cube () const |
Projection * | projection () const |
Camera * | camera () const |
UniversalGroundMap * | universalGroundMap () const |
Cube * | trackingCube () 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. | |
ViewportBuffer * | grayBuffer () |
Returns the gray viewport buffer (Will be NULL if in RGB mode.) | |
ViewportBuffer * | redBuffer () |
Returns the red viewport buffer (Will be NULL if in Gray mode.) | |
ViewportBuffer * | greenBuffer () |
Returns the green viewport buffer (Will be NULL if in Gray mode.) | |
ViewportBuffer * | blueBuffer () |
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. | |
virtual void | restretch (ViewportBuffer *buffer)=0 |
This is called by internal viewport buffers when a stretch action should be performed. | |
void | paintPixmap () |
Paint the whole pixmap. | |
void | forgetStretches () |
Resets all remembered stretches. | |
void | setAllBandStretches (Stretch stretch) |
Sets a stretch for all bands. | |
CubeDataThread * | cubeDataThread () |
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 Isis::Brick *) |
This method updates the internal viewport buffer based on changes in cube DN values. | |
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 bool | eventFilter (QObject *o, QEvent *e) |
Event filter to watch for mouse events on viewport. | |
virtual void | keyPressEvent (QKeyEvent *e) |
Process arrow keystrokes on cube. | |
virtual void | paintEvent (QPaintEvent *e) |
Repaint the viewport. | |
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. | |
Widget to display Isis cubes for qt apps.
Isis::CubeViewport::CubeViewport | ( | Cube * | cube, |
CubeDataThread * | cubeData = 0, | ||
QWidget * | parent = 0 ) |
Constructor for the CubeViewport.
Construct a cube viewport.
cube | The cube to load into a CubeViewport |
cubeData | The Cube Data Thread |
parent | The parent widget to this Viewport |
cube | |
parent |
References _FILEINFO_, Isis::CubeDataThread::AddChangeListener(), Isis::CubeDataThread::AddCube(), Isis::Cube::bandCount(), Isis::UniversalGroundMap::Camera(), cube(), cubeDataChanged(), doneWithData(), Isis::ViewportBuffer::enable(), Isis::Cube::fileName(), Isis::CubeDataThread::FindCubeId(), Isis::Cube::hasGroup(), Isis::Camera::HasProjection(), Isis::Cube::isOpen(), Isis::Cube::lineCount(), onProgressTimer(), p_globalStretches, p_knownStretches, Isis::Cube::pixelType(), Isis::IException::Programmer, Isis::Cube::projection(), Isis::UniversalGroundMap::Projection(), Isis::Cube::sampleCount(), Isis::ViewportBuffer::setBand(), setCaption(), and setTrackingCube().
|
virtual |
Deconstructor for the Cubeviewport.
Destructor.
References p_globalStretches, p_knownStretches, and Isis::CubeDataThread::RemoveChangeListener().
|
inline |
References Isis::CubeViewport::BandInfo::band.
Referenced by stretchBlue(), and stretchKnownGlobal().
|
inline |
Returns the blue viewport buffer (Will be NULL if in Gray mode.)
Referenced by Isis::MdiCubeViewport::restretch().
double Isis::CubeViewport::bluePixel | ( | int | sample, |
int | line ) |
Gets the blue pixel.
Return the blue pixel value at a sample/line.
sample | The sample |
line | The line |
sample | |
line |
References Isis::CubeViewport::BandInfo::band, Isis::Cube::read(), and Isis::Brick::SetBasePosition().
CubeStretch Isis::CubeViewport::blueStretch | ( | ) | const |
Return the blue band stretch.
References Isis::CubeViewport::BandInfo::getStretch().
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.
rect | Area to update screen |
References paintPixmap(), and Isis::ViewportBuffer::working().
|
inline |
|
slot |
Bring the cube sample/line the center.
sample | Value of the sample to center on. |
line | Value of the line to center on. |
References cubeToContents(), Isis::ViewportBuffer::pan(), and screenPixelsChanged().
|
slot |
Bring the cube pixel under viewport x/y to the center.
x | |
y |
References center(), and viewportToCube().
Referenced by center(), and setScale().
|
slot |
Allows users to change the cursor type on the viewport.
cursor |
|
inline |
|
inline |
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.
References cube(), discardChanges(), and saveChanges().
void Isis::CubeViewport::contentsToCube | ( | int | x, |
int | y, | ||
double & | sample, | ||
double & | line ) const |
Turns contents to a cube.
Convert a contents x/y to a cube sample/line (may be outside the cube)
x | |
y | |
sample | |
line |
Referenced by setScale(), and viewportToCube().
|
inline |
Referenced by confirmClose(), cubeContentsChanged(), cubeDataChanged(), Isis::Workspace::cubeToMdiWidget(), CubeViewport(), Isis::FileTool::exportToList(), Isis::SunShadowTool::mouseButtonPress(), Isis::AbstractPlotTool::repaintViewports(), Isis::FileTool::save(), setCube(), Isis::CubeDnView::viewportContainsShape(), Isis::ScatterPlotConfigDialog::xAxisCubeViewport(), and Isis::ScatterPlotConfigDialog::yAxisCubeViewport().
int Isis::CubeViewport::cubeBands | ( | ) | const |
Return the number of bands in the cube.
References Isis::Cube::bandCount().
Referenced by Isis::IndependentCubeViewport::resetKnownGlobal().
|
slot |
This method is called when the cube has changed or changes have been finalized.
changed |
void Isis::CubeViewport::cubeContentsChanged | ( | QRect | rect | ) |
Calle dhwen the contents of the cube changes.
Cube changed, repaint given area.
rect | The QRect |
rect | Rectangle containing portion of cube (sample/line) that changed. |
References cube(), cubeToViewport(), Isis::ViewportBuffer::fillBuffer(), Isis::Cube::lineCount(), and Isis::Cube::sampleCount().
|
protectedvirtualslot |
This method updates the internal viewport buffer based on changes in cube DN values.
cubeId | Cube that the changed brick belongs to |
* | data New 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().
|
inline |
|
inline |
Referenced by Isis::IndependentCubeViewport::cubeDataChanged().
int Isis::CubeViewport::cubeLines | ( | ) | const |
Return the number of lines in the cube.
References Isis::Cube::lineCount().
Referenced by Isis::IndependentCubeViewport::cubeDataChanged(), fitScale(), fitScaleHeight(), getCubeArea(), Isis::ViewportBuffer::hasEntireCube(), setScale(), and showEvent().
int Isis::CubeViewport::cubeSamples | ( | ) | const |
Return the number of samples in the cube.
References Isis::Cube::sampleCount().
Referenced by Isis::IndependentCubeViewport::cubeDataChanged(), fitScale(), fitScaleWidth(), getCubeArea(), Isis::ViewportBuffer::hasEntireCube(), setScale(), and showEvent().
|
inline |
void Isis::CubeViewport::cubeToContents | ( | double | sample, |
double | line, | ||
int & | x, | ||
int & | y ) const |
Turns a cube into contents.
Convert a cube sample/line to a contents x/y (should not be outside)
x | |
y | |
sample | |
line | |
sample | |
line | |
x | |
y |
Referenced by center(), cubeToViewport(), and setScale().
void Isis::CubeViewport::cubeToViewport | ( | double | sample, |
double | line, | ||
int & | x, | ||
int & | y ) const |
Turns a cube into a viewport.
Convert a cube sample/line to a viewport x/y (may be outside the viewport)
x | |
y | |
sample | |
line | |
sample | |
line | |
x | |
y |
References cubeToContents().
Referenced by cubeContentsChanged(), and cubeDataChanged().
bool Isis::CubeViewport::cursorInside | ( | ) | const |
Is cursor inside viewport.
QPoint Isis::CubeViewport::cursorPosition | ( | ) | const |
Return the cursor position in the viewport.
|
signal |
Emitted when changes should be discarded.
Referenced by confirmClose().
|
signal |
Emitted when a brick is no longer needed, should only be sent to cube data thread.
Referenced by cubeDataChanged(), and CubeViewport().
|
slot |
|
protectedvirtual |
Event filter to watch for mouse events on viewport.
o | |
e |
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.
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.
References cubeLines(), and scale().
double Isis::CubeViewport::fitScaleWidth | ( | ) | const |
Determine the scale of cube in the width to fit in the viewport.
References cubeSamples(), and scale().
void Isis::CubeViewport::forgetStretches | ( | ) |
Resets all remembered stretches.
References p_knownStretches.
void Isis::CubeViewport::getAllWhatsThisInfo | ( | Pvl & | pWhatsThisPvl | ) |
Get All WhatsThis info - viewport, cube, area in PVL format.
pWhatsThisPvl | - Pvl for all whatsthis info |
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(), and Isis::toString().
Referenced by Isis::FileTool::saveInfo().
void Isis::CubeViewport::getBandFilterName | ( | PvlKeyword & | pFilterNameKey | ) |
Get Band Filter name from the Isis cube label.
pFilterNameKey | - FilterName keyword containing the corresponding keyword from the Isis Cube label |
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 getAllWhatsThisInfo().
void Isis::CubeViewport::getCubeArea | ( | double & | pdStartSample, |
double & | pdEndSample, | ||
double & | pdStartLine, | ||
double & | pdEndLine ) |
Get Cube area corresponding to the viewport's dimension.
pdStartSample | - Cube Start Sample |
pdEndSample | - Cube End Sample |
pdStartLine | - Cube Start Line |
pdEndLine | - Cube End Line |
References cubeLines(), cubeSamples(), and viewportToCube().
Referenced by getAllWhatsThisInfo().
|
inline |
References Isis::CubeViewport::BandInfo::band.
Referenced by Isis::IndependentCubeViewport::cubeDataChanged(), Isis::SpatialPlotTool::refreshPlot(), stretchGray(), and stretchKnownGlobal().
|
inline |
Returns the gray viewport buffer (Will be NULL if in RGB mode.)
Referenced by Isis::IndependentCubeViewport::resetKnownGlobal(), Isis::MdiCubeViewport::restretch(), and Isis::IndependentCubeViewport::showEvent().
double Isis::CubeViewport::grayPixel | ( | int | sample, |
int | line ) |
Gets the gray pixel.
Return the gray pixel value at a sample/line.
sample | The sample |
line | The line |
sample | |
line |
References Isis::CubeViewport::BandInfo::band, Isis::Cube::read(), and Isis::Brick::SetBasePosition().
CubeStretch Isis::CubeViewport::grayStretch | ( | ) | const |
Return the gray band stretch.
References Isis::CubeViewport::BandInfo::getStretch().
Referenced by Isis::IndependentCubeViewport::cubeDataChanged(), and Isis::IndependentCubeViewport::restretch().
|
inline |
References Isis::CubeViewport::BandInfo::band.
Referenced by stretchGreen(), and stretchKnownGlobal().
|
inline |
Returns the green viewport buffer (Will be NULL if in Gray mode.)
Referenced by Isis::MdiCubeViewport::restretch().
double Isis::CubeViewport::greenPixel | ( | int | sample, |
int | line ) |
Gets the green pixel.
Return the green pixel value at a sample/line.
sample | The sample |
line | The line |
sample | |
line |
References Isis::CubeViewport::BandInfo::band, Isis::Cube::read(), and Isis::Brick::SetBasePosition().
CubeStretch Isis::CubeViewport::greenStretch | ( | ) | const |
Return the green band stretch.
References Isis::CubeViewport::BandInfo::getStretch().
|
inline |
|
inline |
Referenced by Isis::SpatialPlotTool::refreshPlot(), and stretchKnownGlobal().
|
protectedvirtual |
Process arrow keystrokes on cube.
e |
References Isis::Cube::fileName(), moveCursor(), scale(), and setScale().
|
signal |
Emitted when mouse button pressed.
Referenced by eventFilter().
|
signal |
Emitted when mouse button released.
Referenced by eventFilter().
|
signal |
Emitted when double click happens.
Referenced by eventFilter().
|
signal |
Emitted when the mouse enters the viewport.
Referenced by eventFilter(), and Isis::IndependentCubeViewport::eventFilter().
|
signal |
Emitted when the mouse leaves the viewport.
Referenced by eventFilter(), and Isis::IndependentCubeViewport::eventFilter().
|
signal |
Emitted when the mouse moves.
Referenced by eventFilter().
|
signal |
Emitted when the mouse moves.
void Isis::CubeViewport::moveCursor | ( | int | x, |
int | y ) |
|
slot |
This updates the progress bar visually.
Conceptually it emits the progressChanged signal with the current progress.
References Isis::ViewportBuffer::currentProgress(), progressChanged(), progressComplete(), screenPixelsChanged(), and Isis::ViewportBuffer::working().
Referenced by CubeViewport().
|
protectedvirtual |
Repaint the viewport.
e | [in] (QPaintEvent *) event |
Reimplemented in Isis::IndependentCubeViewport, and Isis::MdiCubeViewport.
Referenced by Isis::IndependentCubeViewport::paintEvent(), and Isis::MdiCubeViewport::paintEvent().
void Isis::CubeViewport::paintPixmap | ( | ) |
Paint the whole pixmap.
References paintPixmap().
Referenced by bufferUpdated(), paintPixmap(), resizeEvent(), scrollContentsBy(), setScale(), setScale(), showEvent(), stretchBlue(), stretchGray(), stretchGreen(), and stretchRed().
|
inline |
Returns the pixmap.
References p_pixmap.
Referenced by Isis::BlinkTool::eventFilter().
|
signal |
Emitted with current progress (0 to 100) when working.
Referenced by enableProgress(), and onProgressTimer().
|
signal |
Emitted when the current progress is complete (100)
Referenced by onProgressTimer().
|
inline |
|
inline |
References Isis::CubeViewport::BandInfo::band.
Referenced by Isis::SpatialPlotTool::refreshPlot(), stretchKnownGlobal(), and stretchRed().
|
inline |
Returns the red viewport buffer (Will be NULL if in Gray mode.)
Referenced by Isis::MdiCubeViewport::restretch().
double Isis::CubeViewport::redPixel | ( | int | sample, |
int | line ) |
Gets the red pixel.
Return the red pixel value at a sample/line.
sample | The sample |
line | The line |
sample | |
line |
References Isis::CubeViewport::BandInfo::band, Isis::Cube::read(), and Isis::Brick::SetBasePosition().
CubeStretch Isis::CubeViewport::redStretch | ( | ) | const |
Return the red band stretch.
References Isis::CubeViewport::BandInfo::getStretch().
|
protectedvirtual |
The viewport is being resized.
e |
References p_pixmap, paintPixmap(), Isis::ViewportBuffer::resizedViewport(), and screenPixelsChanged().
|
pure virtual |
This is called by internal viewport buffers when a stretch action should be performed.
The buffer passes itself as the argument.
buffer |
Implemented in Isis::IndependentCubeViewport, and Isis::MdiCubeViewport.
|
signal |
Emitted when changes should be saved.
Referenced by confirmClose().
|
inline |
Referenced by fitScale(), fitScaleHeight(), fitScaleWidth(), keyPressEvent(), Isis::ViewportBuffer::pan(), Isis::ViewportBuffer::resizedViewport(), setScale(), setScale(), setScale(), and Isis::ZoomTool::updateTool().
|
signal |
Emitted when zoom factor changed just before the repaint event.
Referenced by setScale().
|
signal |
Emitted when cube pixels that should be on the screen change.
Referenced by center(), onProgressTimer(), resizeEvent(), scrollContentsBy(), setScale(), and setScale().
|
slot |
|
protected |
Scroll the viewport contents by dx/dy screen pixels.
dx | |
dy |
References Isis::ViewportBuffer::bufferXYRect(), paintPixmap(), Isis::ViewportBuffer::pan(), screenPixelsChanged(), and Isis::ViewportBuffer::working().
Referenced by scrollBy().
void Isis::CubeViewport::setAllBandStretches | ( | Stretch | stretch | ) |
|
inline |
Sets the background color.
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().
|
inline |
Sets the band bin combo box count.
count |
|
inline |
Sets the band bin combo box index.
index |
void Isis::CubeViewport::setCube | ( | Cube * | cube | ) |
This method sets the viewports cube.
cube | The cube to set the CubeViewport window to |
cube |
References cube(), and setCaption().
void Isis::CubeViewport::setCursorPosition | ( | int | x, |
int | y ) |
Set the cursor position to x/y in the viewport.
x | |
y |
|
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.
scale | Value by which to scale the image. |
References contentsToCube(), cubeLines(), cubeSamples(), cubeToContents(), paintPixmap(), scale(), scaleChanged(), Isis::ViewportBuffer::scaleChanged(), screenPixelsChanged(), and setCaption().
Referenced by keyPressEvent(), setScale(), setScale(), and showEvent().
|
slot |
Change the scale of the cube after moving samp/line to the center.
scale | |
sample | |
line |
References center(), Isis::ViewportBuffer::enable(), Isis::ViewportBuffer::enabled(), paintPixmap(), scale(), screenPixelsChanged(), and setScale().
|
slot |
Change the scale of the cube after moving x,y to the center.
scale | |
x | |
y |
References scale(), setScale(), and viewportToCube().
void Isis::CubeViewport::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.
This way, we are not opening the tracking cube every time the cursor is moved.
References Isis::Cube::fileName(), Isis::Cube::group(), and trackingCube().
Referenced by CubeViewport().
|
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.
event | Show event being received. |
References Isis::ViewportBuffer::addStretchAction(), cubeLines(), cubeSamples(), Isis::ViewportBuffer::enable(), Isis::ViewportBuffer::enabled(), fitScale(), paintPixmap(), and setScale().
Referenced by Isis::IndependentCubeViewport::showEvent().
|
slot |
Make viewports show up as 512 by 512.
|
slot |
Apply stretch pairs to blue bands.
string |
References Isis::Stretch::Parse(), and stretchBlue().
Referenced by stretchBlue(), and stretchKnownGlobal().
|
slot |
Sets the stretch for blue in rgb mode.
stretch |
References blueBand(), Isis::CubeViewport::BandInfo::getStretch(), p_globalStretches, paintPixmap(), Isis::Stretch::Pairs(), and Isis::CubeViewport::BandInfo::setStretch().
|
slot |
Apply stretch pairs to gray band.
string |
References Isis::Stretch::Parse(), and stretchGray().
Referenced by Isis::IndependentCubeViewport::cubeDataChanged(), Isis::IndependentCubeViewport::restretch(), stretchGray(), stretchKnownGlobal(), and viewGray().
|
slot |
Sets the stretch for gray mode.
stretch |
References Isis::CubeViewport::BandInfo::getStretch(), grayBand(), p_globalStretches, paintPixmap(), Isis::Stretch::Pairs(), and Isis::CubeViewport::BandInfo::setStretch().
|
slot |
Apply stretch pairs to green bands.
string | the stretch |
References Isis::Stretch::Parse(), and stretchGreen().
Referenced by stretchGreen(), and stretchKnownGlobal().
|
slot |
Sets the stretch for green in rgb mode.
stretch |
References Isis::CubeViewport::BandInfo::getStretch(), greenBand(), p_globalStretches, paintPixmap(), Isis::Stretch::Pairs(), and Isis::CubeViewport::BandInfo::setStretch().
|
slot |
List<Tool *> p This stretches to the global stretch.
References blueBand(), grayBand(), greenBand(), isGray(), p_globalStretches, redBand(), stretchBlue(), stretchGray(), stretchGreen(), and stretchRed().
|
slot |
Apply stretch pairs to red bands.
string | The stretch |
References Isis::Stretch::Parse(), and stretchRed().
Referenced by stretchKnownGlobal(), and stretchRed().
|
slot |
Sets the stretch for red in rgb mode.
stretch |
References Isis::CubeViewport::BandInfo::getStretch(), p_globalStretches, paintPixmap(), Isis::Stretch::Pairs(), redBand(), and Isis::CubeViewport::BandInfo::setStretch().
|
inline |
Referenced by setTrackingCube().
|
inline |
|
virtualslot |
View cube as gray.
band |
References Isis::ViewportBuffer::addStretchAction(), Isis::CubeViewport::BandInfo::band, Isis::ViewportBuffer::getBand(), Isis::CubeViewport::BandInfo::getStretch(), p_knownStretches, Isis::Camera::SetBand(), Isis::ViewportBuffer::setBand(), setCaption(), and stretchGray().
Referenced by Isis::MdiCubeViewport::viewGray().
|
signal |
Emitted when viewport is closed.
void Isis::CubeViewport::viewportToCube | ( | int | x, |
int | y, | ||
double & | sample, | ||
double & | line ) const |
Turns a viewport into a cube.
Convert a viewport x/y to a cube sample/line (may be outside the cube)
x | |
y | |
sample | |
line |
References contentsToCube().
Referenced by center(), getCubeArea(), Isis::SunShadowTool::mouseButtonPress(), Isis::SunShadowTool::mouseMove(), setScale(), and Isis::HistogramItem::setVertices().
|
signal |
Emitted when viewport updated.
Referenced by Isis::MdiCubeViewport::paintEvent().
|
virtualslot |
View cube as color.
rband | |
gband | |
bband |
References Isis::ViewportBuffer::addStretchAction(), Isis::CubeViewport::BandInfo::band, Isis::ViewportBuffer::getBand(), Isis::CubeViewport::BandInfo::getStretch(), p_knownStretches, Isis::Camera::SetBand(), Isis::ViewportBuffer::setBand(), setCaption(), and Isis::CubeViewport::BandInfo::setStretch().
Referenced by Isis::MdiCubeViewport::viewRGB().
|
signal |
Emitted when window title changes.
Referenced by setCaption().
Global stretches for each stretched band.
Referenced by CubeViewport(), Isis::IndependentCubeViewport::resetKnownGlobal(), stretchBlue(), stretchGray(), stretchGreen(), stretchKnownGlobal(), stretchRed(), and ~CubeViewport().
Stretches for each previously stretched band.
Referenced by CubeViewport(), forgetStretches(), setAllBandStretches(), viewGray(), viewRGB(), and ~CubeViewport().
|
protected |
The qpixmap.
Referenced by Isis::IndependentCubeViewport::paintEvent(), Isis::MdiCubeViewport::paintEvent(), pixmap(), and resizeEvent().