Isis 3 Programmer 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. 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 | 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 | |
CubeViewport (Cube *cube, CubeDataThread *cdt=0, QWidget *parent=0) | |
Constructor for the CubeViewport. More... | |
virtual | ~CubeViewport () |
Deconstructor for the Cubeviewport. 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 |
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... | |
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... | |
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. 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... | |
ViewportBuffer * | grayBuffer () |
Returns the gray viewport buffer (Will be NULL if in RGB mode.) More... | |
ViewportBuffer * | redBuffer () |
Returns the red viewport buffer (Will be NULL if in Gray mode.) More... | |
ViewportBuffer * | greenBuffer () |
Returns the green viewport buffer (Will be NULL if in Gray mode.) More... | |
ViewportBuffer * | blueBuffer () |
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... | |
CubeDataThread * | cubeDataThread () |
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 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... | |
Private Member Functions | |
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 | |
ViewportBuffer * | p_grayBuffer |
Viewport Buffer to manage gray band. More... | |
ViewportBuffer * | p_redBuffer |
Viewport Buffer to manage red band. More... | |
ViewportBuffer * | p_greenBuffer |
Viewport Buffer to manage green band. More... | |
ViewportBuffer * | p_blueBuffer |
Viewport Buffer to manage blue band. More... | |
QColor | p_bgColor |
The color to paint the background of the viewport. More... | |
Cube * | p_cube |
The cube associated with the viewport. More... | |
Camera * | p_camera |
The camera from the cube. More... | |
Projection * | p_projection |
The projection from the cube. More... | |
UniversalGroundMap * | p_groundMap |
The universal ground map from the cube. More... | |
Cube * | p_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... | |
Brick * | p_redBrick |
Bricks for every color. More... | |
Brick * | p_grnBrick |
Bricks for every color. More... | |
Brick * | p_bluBrick |
Bricks for every color. More... | |
Brick * | p_gryBrick |
Bricks for every color. More... | |
Brick * | p_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... | |
CubeDataThread * | p_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... | |
Widget to display Isis cubes for qt apps.
2007-01-30 Tracie Sucharski, Add information message if spice not found.
2007-02-07 Tracie Sucharski, Remove error message, decided it was more of a hassle to click ok when displaying many images without spice.
2007-03-20 Tracie Sucharski, Add fitScaleMinDimension, fitScaleWidth and fitScaleHeight methods. Change cursor to wait cursor in paintPixmap.
2007-04-13 Tracie Sucharski, Remove fitScaleMinDimension, turns out it was not needed.
2007-09-11 Steven Lambright, Added double click signal
2007-12-11 Steven Lambright, Added 1x1xn cube auto stretch support
2008-06-19 Noah Hilt, Added a close event for saving and discarding changes and a method to set the cube.
2008-12-04 Jeannie Walldren, Fixed a bug in computeStretch() method for comparing precision difference on 32 bit Linux system. Added try/catch in showCube() to set p_cubeShown = false if this fails.
2009-03-09 Steven Lambright - Changed the way we do floating point math in autoStretch to work better in order to allow more cubes to open.
2009-03-27 Noah Hilt/Steven Lambright - Removed old rubber band methods and variables. Added new ViewportBuffer to read and store visible dn values in the viewport.
2009-10-23 Steven Lambright - Camera::SetBand is now called when switching the band being shown.
2010-04-08 Steven Lambright and Eric Hyer - Now supports ViewportBuffer using threaded cube I/O
2010-04-30 Steven Lambright - Bug fixes and better support for threaded cube I/O
2010-05-20 Steven Lambright - Added memory of global stretches
2010-05-24 Eric Hyer - Fixed bug where QPainter construction was being attempted with a potentially null pixmap
2010-06-26 Eric Hyer - Moved MDI specific code to new child class called MdiCubeViewport. Fixed many include mistakes.
2010-07-12 Jeannie Walldren - Changed setScale() method's maximum value from hard-coded 16 to the max of the viewport width and height. Added setScale() minimum value of 1/min(samps,lines). Added exceptions to ViewportBuffer to help track errors.
2010-11-08 Eric Hyer - Added better mouseMove signal
2010-12-01 Steven Lambright - The initial scale now uses fitScale so that it is consistent with the zoom tool.
2011-03-30 Sharmila Prasad - Set the frame shadow and style to remove border around the image
2011-03-31 Sharmila Prasad - Added band info to "whatsthis" API to store the whatsthis info in a PVL format
2011-04-25 Steven Lambright - Fixed "center" and added more safety checks.
2012-03-22 Steven Lambright and Jai Rideout - Fixed bug where screenPixelsChanged was not correctly emitted on resize.
2012-05-29 Steven Lambright - Changed destructor to clean up the cube when necessary.
2012-06-28 Steven Lambright - Stretching gray no longer removes stretch special pixel values from the RGB stretches. References #684.
2012-07-27 Tracie Sucharski - Added viewportClosed signal so that tools can respond to the user closing a viewport rather than when the application exits.
2013-11-04 Janet Barrett - Added the p_comboCount and p_comboIndex variables to store the current state of the band bin combo box. Also added comboCount(), comboIndex(), setComboCount(), and setComboIndex() accessors and setters to allow the BandTool class to retain the settings for each cube viewport. Fixes #1612.
2017-05-10 Ian Humphrey - Modified showEvent() so that when the cube viewport is initially shown, the image is centered properly in the viewport. Modified center(double, double) to no longer increment the cubeToContents x,y by 1. This was causing some images to be off-centered by 1 pixel (the bottom and right side of viewport would be a thin strip of non-pixel space). Fixes #4756.
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.
2018-07-31 Kaitlyn Lee - Added setTrackingCube() and trackingCube() so that a tracking cube is stored when needed and we do not have to open it in AdvancedTrackTool every time the cursor is moved.
Definition at line 132 of file CubeViewport.h.
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 |
Definition at line 70 of file CubeViewport.cpp.
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_bgColor, p_bluBrick, p_blueBuffer, p_camera, p_color, p_comboCount, p_comboIndex, p_cube, p_cubeData, p_cubeId, p_cubeShown, p_cubeWhatsThisText, p_globalStretches, p_grayBuffer, p_greenBuffer, p_grnBrick, p_groundMap, p_gryBrick, p_image, p_knownStretches, p_paintPixmap, p_pixmapPaintRects, p_pntBrick, p_progressTimer, p_projection, p_redBrick, p_redBuffer, p_saveEnabled, p_scale, p_thisOwnsCubeData, p_updatingBuffers, p_whatsThisText, Isis::Cube::pixelType(), Isis::IException::Programmer, Isis::UniversalGroundMap::Projection(), Isis::Cube::projection(), Isis::Cube::sampleCount(), Isis::ViewportBuffer::setBand(), setCaption(), and setTrackingCube().
|
virtual |
Deconstructor for the Cubeviewport.
Destructor.
Definition at line 317 of file CubeViewport.cpp.
References p_bluBrick, p_blueBuffer, p_cube, p_cubeData, p_globalStretches, p_grayBuffer, p_greenBuffer, p_grnBrick, p_groundMap, p_gryBrick, p_image, p_knownStretches, p_pixmapPaintRects, p_pntBrick, p_progressTimer, p_redBrick, p_redBuffer, p_thisOwnsCubeData, and Isis::CubeDataThread::RemoveChangeListener().
|
inline |
Definition at line 219 of file CubeViewport.h.
References Isis::CubeViewport::BandInfo::band, and p_blue.
Referenced by Isis::BandTool::changeView(), Isis::BandTool::copyAllViewports(), Isis::BandTool::copyLinkedViewports(), Isis::SpectralPlotWindow::drawBandMarkers(), Isis::StretchTool::stretchBand(), stretchBlue(), stretchKnownGlobal(), and Isis::BandTool::updateTool().
|
inline |
Returns the blue viewport buffer (Will be NULL if in Gray mode.)
Definition at line 451 of file CubeViewport.h.
References p_blueBuffer.
Referenced by Isis::MdiCubeViewport::restretch(), Isis::StretchTool::setCubeViewport(), Isis::StretchTool::stretchRect(), Isis::StretchTool::stretchRequested(), Isis::StretchTool::updateAdvStretchDialogforAll(), Isis::StretchTool::updateHistograms(), and Isis::TrackTool::updateLabels().
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 |
Definition at line 1640 of file CubeViewport.cpp.
References Isis::CubeViewport::BandInfo::band, p_blue, p_cube, p_pntBrick, Isis::Cube::read(), and Isis::Brick::SetBasePosition().
Stretch Isis::CubeViewport::blueStretch | ( | ) | const |
Return the blue band stretch.
Definition at line 1682 of file CubeViewport.cpp.
References Isis::CubeViewport::BandInfo::getStretch(), and p_blue.
Referenced by Isis::StretchTool::advancedStretchChanged(), Isis::SpecialPixelTool::apply(), Isis::StretchTool::changeStretch(), Isis::StretchTool::setCubeViewport(), Isis::StretchTool::setStretchAcrossBands(), Isis::StretchTool::setStretchAllViewports(), Isis::StretchTool::stretchBand(), Isis::StretchTool::stretchChanged(), Isis::StretchTool::stretchRect(), Isis::StretchTool::stretchRequested(), Isis::StretchTool::updateAdvStretchDialogforAll(), and Isis::AdvancedStretchDialog::updateStretch().
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 |
Definition at line 1114 of file CubeViewport.cpp.
References p_blueBuffer, p_grayBuffer, p_greenBuffer, p_redBuffer, paintPixmap(), and Isis::ViewportBuffer::working().
|
inline |
Definition at line 358 of file CubeViewport.h.
References p_camera.
Referenced by Isis::FeatureNomenclatureTool::findMissingNomenclature(), Isis::MeasureTool::rubberBandComplete(), Isis::MeasureTool::updateDist(), Isis::TrackTool::updateLabels(), Isis::AdvancedTrackTool::updateRow(), and Isis::FindTool::updateTool().
|
slot |
Bring the cube pixel under viewport x/y to the center.
x | |
y |
Definition at line 740 of file CubeViewport.cpp.
References viewportToCube().
Referenced by setScale().
|
slot |
Bring the cube sample/line the center.
sample | Value of the sample to center on. |
line | Value of the line to center on. |
Definition at line 753 of file CubeViewport.cpp.
References cubeToContents(), p_blueBuffer, p_grayBuffer, p_greenBuffer, p_redBuffer, p_updatingBuffers, paintPixmapRects(), Isis::ViewportBuffer::pan(), screenPixelsChanged(), shiftPixmap(), and updateScrollBars().
|
slot |
Allows users to change the cursor type on the viewport.
cursor |
Definition at line 2394 of file CubeViewport.cpp.
|
inline |
Definition at line 234 of file CubeViewport.h.
References p_comboCount.
Referenced by Isis::BandTool::setBandBin().
|
inline |
Definition at line 239 of file CubeViewport.h.
References p_comboIndex.
Referenced by Isis::BandTool::setBandBin().
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.
Definition at line 535 of file CubeViewport.cpp.
References cube(), discardChanges(), p_saveEnabled, 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 |
Definition at line 808 of file CubeViewport.cpp.
References p_scale.
Referenced by setScale(), and viewportToCube().
|
inline |
Definition at line 348 of file CubeViewport.h.
References p_cube.
Referenced by confirmClose(), Isis::MatchTool::createPoint(), cubeContentsChanged(), cubeDataChanged(), Isis::Workspace::cubeToMdiWidget(), CubeViewport(), 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::SunShadowTool::mouseButtonPress(), Isis::ControlNetTool::mouseButtonRelease(), Isis::EditTool::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::saveAsCubeByOption(), Isis::FileTool::saveAsReducedCube(), Isis::ScatterPlotConfigDialog::ScatterPlotConfigDialog(), Isis::MatchTool::serialNumberList(), 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::SunShadowTool::updateTool(), Isis::SpectralPlotTool::updateTool(), Isis::CubeDnView::workspaceActiveCube(), Isis::EditTool::writeToCube(), Isis::ScatterPlotConfigDialog::xAxisCubeViewport(), and Isis::ScatterPlotConfigDialog::yAxisCubeViewport().
int Isis::CubeViewport::cubeBands | ( | ) | const |
Return the number of bands in the cube.
Definition at line 455 of file CubeViewport.cpp.
References Isis::Cube::bandCount(), and p_cube.
Referenced by Isis::BandTool::copyAllViewports(), and Isis::BandTool::copyLinkedViewports().
|
slot |
This method is called when the cube has changed or changes have been finalized.
changed |
Definition at line 571 of file CubeViewport.cpp.
References p_saveEnabled.
Referenced by Isis::EditTool::redoEdit(), Isis::EditTool::save(), Isis::EditTool::undoEdit(), and Isis::EditTool::writeToCube().
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. |
Definition at line 2314 of file CubeViewport.cpp.
References cube(), cubeToViewport(), Isis::ViewportBuffer::fillBuffer(), Isis::Cube::lineCount(), p_blueBuffer, p_grayBuffer, p_greenBuffer, p_redBuffer, p_updatingBuffers, paintPixmapRects(), and Isis::Cube::sampleCount().
Referenced by Isis::EditTool::redoEdit(), Isis::EditTool::undoEdit(), and Isis::EditTool::writeToCube().
|
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 |
Definition at line 467 of file CubeViewport.cpp.
References cube(), cubeToViewport(), doneWithData(), Isis::ViewportBuffer::fillBuffer(), Isis::Buffer::Line(), Isis::Cube::lineCount(), Isis::Buffer::LineDimension(), p_blueBuffer, p_cubeId, p_grayBuffer, p_greenBuffer, p_redBuffer, p_updatingBuffers, paintPixmapRects(), Isis::Buffer::Sample(), Isis::Cube::sampleCount(), and Isis::Buffer::SampleDimension().
Referenced by CubeViewport().
|
inline |
Definition at line 483 of file CubeViewport.h.
References p_cubeData.
|
inline |
Definition at line 490 of file CubeViewport.h.
References p_cubeId.
int Isis::CubeViewport::cubeLines | ( | ) | const |
Return the number of lines in the cube.
Definition at line 449 of file CubeViewport.cpp.
References Isis::Cube::lineCount(), and p_cube.
Referenced by fitScale(), fitScaleHeight(), getCubeArea(), Isis::StatisticsTool::getStatistics(), Isis::EditTool::LineToPoints(), Isis::EditTool::mouseButtonRelease(), Isis::EditTool::rubberBandComplete(), setScale(), showEvent(), Isis::TrackTool::updateLabels(), Isis::AdvancedTrackTool::updateRow(), updateScrollBars(), Isis::ZoomTool::zoomFit(), Isis::ZoomTool::zoomFitHeight(), and Isis::ZoomTool::zoomFitWidth().
int Isis::CubeViewport::cubeSamples | ( | ) | const |
Return the number of samples in the cube.
Definition at line 443 of file CubeViewport.cpp.
References p_cube, and Isis::Cube::sampleCount().
Referenced by fitScale(), fitScaleWidth(), getCubeArea(), Isis::StatisticsTool::getStatistics(), Isis::EditTool::mouseButtonRelease(), Isis::EditTool::rubberBandComplete(), setScale(), showEvent(), Isis::TrackTool::updateLabels(), Isis::AdvancedTrackTool::updateRow(), updateScrollBars(), Isis::ZoomTool::zoomFit(), Isis::ZoomTool::zoomFitHeight(), and Isis::ZoomTool::zoomFitWidth().
|
inline |
Definition at line 229 of file CubeViewport.h.
References p_cubeShown.
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 |
Definition at line 845 of file CubeViewport.cpp.
References p_scale.
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 |
Definition at line 862 of file CubeViewport.cpp.
References cubeToContents().
Referenced by cubeContentsChanged(), cubeDataChanged(), Isis::ControlNetTool::drawAllMeasurements(), Isis::MatchTool::drawAllMeasurments(), Isis::QnetTool::drawAllMeasurments(), Isis::ControlNetTool::drawGroundMeasures(), Isis::QnetTool::drawGroundMeasures(), Isis::FindTool::handleRecordClicked(), Isis::CubePlotCurve::paint(), Isis::SunShadowTool::paintViewport(), Isis::StereoTool::paintViewport(), Isis::FindTool::paintViewport(), and Isis::HistogramTool::refreshPlot().
bool Isis::CubeViewport::cursorInside | ( | ) | const |
QPoint Isis::CubeViewport::cursorPosition | ( | ) | const |
Return the cursor position in the viewport.
Definition at line 1836 of file CubeViewport.cpp.
|
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 |
This restarts the progress bar.
Does nothing if already loading.
Definition at line 982 of file CubeViewport.cpp.
References p_progressTimer, and progressChanged().
|
protectedvirtual |
Event filter to watch for mouse events on viewport.
o | |
e |
Reimplemented in Isis::IndependentCubeViewport.
Definition at line 1696 of file CubeViewport.cpp.
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.
Definition at line 2272 of file CubeViewport.cpp.
References cubeLines(), cubeSamples(), and scale().
Referenced by showEvent(), and Isis::ZoomTool::zoomFit().
double Isis::CubeViewport::fitScaleHeight | ( | ) | const |
Determine the scale of cube in heighth to fit in the viewport.
Definition at line 2300 of file CubeViewport.cpp.
References cubeLines(), and scale().
Referenced by Isis::ZoomTool::zoomFitHeight().
double Isis::CubeViewport::fitScaleWidth | ( | ) | const |
Determine the scale of cube in the width to fit in the viewport.
Definition at line 2287 of file CubeViewport.cpp.
References cubeSamples(), and scale().
Referenced by Isis::ZoomTool::zoomFitWidth().
void Isis::CubeViewport::forgetStretches | ( | ) |
Resets all remembered stretches.
Definition at line 1975 of file CubeViewport.cpp.
References p_knownStretches.
Referenced by Isis::StretchTool::stretchGlobalAllBands().
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 |
Definition at line 1374 of file CubeViewport.cpp.
References Isis::Cube::bandCount(), Isis::Cube::fileName(), Isis::ViewportBuffer::getBand(), getBandFilterName(), getCubeArea(), Isis::Cube::lineCount(), p_blueBuffer, p_color, p_cube, p_grayBuffer, p_greenBuffer, p_redBuffer, 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.
pFilterNameKey | - FilterName keyword containing the corresponding keyword from the Isis Cube label |
pFilterNameKey | - FilterName keyword containing the corresponding keyword from the Isis Cube label |
Definition at line 1476 of file CubeViewport.cpp.
References Isis::PvlObject::findGroup(), Isis::PvlContainer::findKeyword(), Isis::PvlObject::findObject(), Isis::PvlObject::hasGroup(), Isis::PvlContainer::hasKeyword(), Isis::Cube::label(), and p_cube.
Referenced by getAllWhatsThisInfo(), and updateWhatsThis().
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 |
Definition at line 1497 of file CubeViewport.cpp.
References cubeLines(), cubeSamples(), and viewportToCube().
Referenced by getAllWhatsThisInfo(), and updateWhatsThis().
|
inline |
Definition at line 204 of file CubeViewport.h.
References Isis::CubeViewport::BandInfo::band, and p_gray.
Referenced by Isis::BandTool::changeView(), Isis::BandTool::copyAllViewports(), Isis::BandTool::copyLinkedViewports(), Isis::SpectralPlotWindow::drawBandMarkers(), Isis::SpatialPlotTool::getSpatialStatistics(), Isis::StatisticsTool::getStatistics(), Isis::ScatterPlotWindow::isXCube(), Isis::ScatterPlotWindow::isYCube(), Isis::EditTool::mouseButtonRelease(), Isis::EditTool::redoEdit(), Isis::HistogramTool::refreshPlot(), Isis::SpatialPlotTool::refreshPlot(), Isis::StretchTool::stretchBand(), stretchGray(), stretchKnownGlobal(), Isis::EditTool::undoEdit(), Isis::AdvancedTrackTool::updateRow(), Isis::BandTool::updateTool(), and Isis::EditTool::writeToCube().
|
inline |
Returns the gray viewport buffer (Will be NULL if in RGB mode.)
Definition at line 421 of file CubeViewport.h.
References p_grayBuffer.
Referenced by Isis::ScatterPlotWindow::paint(), Isis::MdiCubeViewport::restretch(), Isis::StretchTool::setCubeViewport(), Isis::StretchTool::stretchRect(), Isis::StretchTool::stretchRequested(), Isis::StretchTool::updateHistograms(), and Isis::TrackTool::updateLabels().
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 |
Definition at line 1656 of file CubeViewport.cpp.
References Isis::CubeViewport::BandInfo::band, p_cube, p_gray, p_pntBrick, Isis::Cube::read(), and Isis::Brick::SetBasePosition().
Referenced by Isis::AdvancedTrackTool::updateRow().
Stretch Isis::CubeViewport::grayStretch | ( | ) | const |
Return the gray band stretch.
Definition at line 1664 of file CubeViewport.cpp.
References Isis::CubeViewport::BandInfo::getStretch(), and p_gray.
Referenced by Isis::StretchTool::advancedStretchChanged(), Isis::StretchTool::changeStretch(), Isis::StretchTool::setCubeViewport(), Isis::StretchTool::setStretchAcrossBands(), Isis::StretchTool::setStretchAllViewports(), Isis::StretchTool::stretchBand(), Isis::StretchTool::stretchChanged(), Isis::StretchTool::stretchRect(), Isis::StretchTool::stretchRequested(), and Isis::AdvancedStretchDialog::updateStretch().
|
inline |
Definition at line 214 of file CubeViewport.h.
References Isis::CubeViewport::BandInfo::band, and p_green.
Referenced by Isis::BandTool::changeView(), Isis::BandTool::copyAllViewports(), Isis::BandTool::copyLinkedViewports(), Isis::SpectralPlotWindow::drawBandMarkers(), Isis::StretchTool::stretchBand(), stretchGreen(), stretchKnownGlobal(), and Isis::BandTool::updateTool().
|
inline |
Returns the green viewport buffer (Will be NULL if in Gray mode.)
Definition at line 441 of file CubeViewport.h.
References p_greenBuffer.
Referenced by Isis::MdiCubeViewport::restretch(), Isis::StretchTool::setCubeViewport(), Isis::StretchTool::stretchRect(), Isis::StretchTool::stretchRequested(), Isis::StretchTool::updateAdvStretchDialogforAll(), Isis::StretchTool::updateHistograms(), and Isis::TrackTool::updateLabels().
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 |
Definition at line 1624 of file CubeViewport.cpp.
References Isis::CubeViewport::BandInfo::band, p_cube, p_green, p_pntBrick, Isis::Cube::read(), and Isis::Brick::SetBasePosition().
Stretch Isis::CubeViewport::greenStretch | ( | ) | const |
Return the green band stretch.
Definition at line 1676 of file CubeViewport.cpp.
References Isis::CubeViewport::BandInfo::getStretch(), and p_green.
Referenced by Isis::StretchTool::advancedStretchChanged(), Isis::SpecialPixelTool::apply(), Isis::StretchTool::changeStretch(), Isis::StretchTool::setCubeViewport(), Isis::StretchTool::setStretchAcrossBands(), Isis::StretchTool::setStretchAllViewports(), Isis::StretchTool::stretchBand(), Isis::StretchTool::stretchChanged(), Isis::StretchTool::stretchRect(), Isis::StretchTool::stretchRequested(), Isis::StretchTool::updateAdvStretchDialogforAll(), and Isis::AdvancedStretchDialog::updateStretch().
|
inline |
Definition at line 194 of file CubeViewport.h.
References p_color.
Referenced by Isis::BandTool::changeView(), Isis::BandTool::copyAllViewports(), Isis::BandTool::copyLinkedViewports(), Isis::SpectralPlotWindow::drawBandMarkers(), Isis::EditTool::mouseButtonRelease(), and Isis::EditTool::rubberBandComplete().
|
inline |
Definition at line 199 of file CubeViewport.h.
References p_color.
Referenced by Isis::StretchTool::changeStretch(), Isis::BandTool::changeView(), Isis::BandTool::copyAllViewports(), Isis::BandTool::copyLinkedViewports(), Isis::SpatialPlotTool::getSpatialStatistics(), Isis::ScatterPlotWindow::isXCube(), Isis::ScatterPlotWindow::isYCube(), Isis::SpatialPlotTool::refreshPlot(), Isis::StretchTool::setCubeViewport(), Isis::StretchTool::setStretchAcrossBands(), Isis::StretchTool::setStretchAllViewports(), Isis::StretchTool::stretchChanged(), stretchKnownGlobal(), Isis::StretchTool::stretchRect(), Isis::StretchTool::updateAdvStretchDialogforAll(), Isis::StretchTool::updateHistograms(), Isis::TrackTool::updateLabels(), Isis::AdvancedTrackTool::updateRow(), Isis::BandTool::updateTool(), and Isis::StretchTool::updateTool().
|
protectedvirtual |
Process arrow keystrokes on cube.
e |
Definition at line 1761 of file CubeViewport.cpp.
References Isis::Cube::fileName(), moveCursor(), p_cube, p_scale, 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().
|
signal |
Emitted when the mouse leaves the viewport.
Referenced by eventFilter().
|
signal |
Emitted when the mouse moves.
Referenced by eventFilter().
|
signal |
Emitted when the mouse moves.
void Isis::CubeViewport::moveCursor | ( | int | x, |
int | y | ||
) |
Move the cursor by x,y if possible.
x | |
y |
Definition at line 1849 of file CubeViewport.cpp.
Referenced by keyPressEvent().
|
slot |
This updates the progress bar visually.
Conceptually it emits the progressChanged signal with the current progress.
Definition at line 273 of file CubeViewport.cpp.
References Isis::ViewportBuffer::currentProgress(), p_blueBuffer, p_grayBuffer, p_greenBuffer, p_progressTimer, p_redBuffer, 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.
Definition at line 1099 of file CubeViewport.cpp.
References p_cubeShown.
Referenced by Isis::IndependentCubeViewport::paintEvent(), and Isis::MdiCubeViewport::paintEvent().
void Isis::CubeViewport::paintPixmap | ( | ) |
Paint the whole pixmap.
Definition at line 1139 of file CubeViewport.cpp.
References p_image.
Referenced by bufferUpdated(), paintPixmapRects(), resizeEvent(), scrollContentsBy(), setScale(), shiftPixmap(), showEvent(), stretchBlue(), stretchGray(), stretchGreen(), and stretchRed().
|
private |
Paint a region of the pixmap.
rect |
Definition at line 1151 of file CubeViewport.cpp.
References _FILEINFO_, Isis::ViewportBuffer::bufferXYRect(), Isis::ViewportBuffer::enabled(), Isis::ViewportBuffer::getLine(), Isis::CubeViewport::BandInfo::getStretch(), Isis::Stretch::Map(), p_bgColor, p_blue, p_blueBuffer, p_grayBuffer, p_green, p_greenBuffer, p_image, p_paintPixmap, p_pixmap, p_pixmapPaintRects, p_red, p_redBuffer, p_updatingBuffers, Isis::IException::Programmer, updateWhatsThis(), and Isis::ViewportBuffer::working().
|
private |
Goes through the list of requested paints, from the viewport buffer, and paints them.
Definition at line 789 of file CubeViewport.cpp.
References p_pixmapPaintRects, and paintPixmap().
Referenced by center(), cubeContentsChanged(), cubeDataChanged(), resizeEvent(), and setScale().
|
inline |
Returns the pixmap.
Definition at line 411 of file CubeViewport.h.
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 |
Definition at line 353 of file CubeViewport.h.
References p_projection.
Referenced by Isis::FeatureNomenclatureTool::findMissingNomenclature(), Isis::MeasureTool::rubberBandComplete(), Isis::MeasureTool::updateDist(), Isis::TrackTool::updateLabels(), Isis::AdvancedTrackTool::updateRow(), and Isis::FindTool::updateTool().
|
inline |
Definition at line 209 of file CubeViewport.h.
References Isis::CubeViewport::BandInfo::band, and p_red.
Referenced by Isis::BandTool::changeView(), Isis::BandTool::copyAllViewports(), Isis::BandTool::copyLinkedViewports(), Isis::SpectralPlotWindow::drawBandMarkers(), Isis::SpatialPlotTool::getSpatialStatistics(), Isis::SpatialPlotTool::refreshPlot(), Isis::StretchTool::stretchBand(), stretchKnownGlobal(), stretchRed(), Isis::AdvancedTrackTool::updateRow(), and Isis::BandTool::updateTool().
|
inline |
Returns the red viewport buffer (Will be NULL if in Gray mode.)
Definition at line 431 of file CubeViewport.h.
References p_redBuffer.
Referenced by Isis::MdiCubeViewport::restretch(), Isis::StretchTool::setCubeViewport(), Isis::StretchTool::stretchRect(), Isis::StretchTool::stretchRequested(), Isis::StretchTool::updateAdvStretchDialogforAll(), Isis::StretchTool::updateHistograms(), and Isis::TrackTool::updateLabels().
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 |
Definition at line 1608 of file CubeViewport.cpp.
References Isis::CubeViewport::BandInfo::band, p_cube, p_pntBrick, p_red, Isis::Cube::read(), and Isis::Brick::SetBasePosition().
Referenced by Isis::AdvancedTrackTool::updateRow().
Stretch Isis::CubeViewport::redStretch | ( | ) | const |
Return the red band stretch.
Definition at line 1670 of file CubeViewport.cpp.
References Isis::CubeViewport::BandInfo::getStretch(), and p_red.
Referenced by Isis::StretchTool::advancedStretchChanged(), Isis::SpecialPixelTool::apply(), Isis::StretchTool::changeStretch(), Isis::StretchTool::setCubeViewport(), Isis::StretchTool::setStretchAcrossBands(), Isis::StretchTool::setStretchAllViewports(), Isis::StretchTool::stretchBand(), Isis::StretchTool::stretchChanged(), Isis::StretchTool::stretchRect(), Isis::StretchTool::stretchRequested(), Isis::StretchTool::updateAdvStretchDialogforAll(), and Isis::AdvancedStretchDialog::updateStretch().
|
protectedvirtual |
The viewport is being resized.
e |
Definition at line 1033 of file CubeViewport.cpp.
References p_blueBuffer, p_grayBuffer, p_greenBuffer, p_image, p_paintPixmap, p_pixmap, p_redBuffer, p_updatingBuffers, p_viewportWhatsThisText, paintPixmap(), paintPixmapRects(), Isis::ViewportBuffer::resizedViewport(), screenPixelsChanged(), and updateScrollBars().
|
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 |
Definition at line 224 of file CubeViewport.h.
References p_scale.
Referenced by Isis::FindTool::centerLinkedViewports(), fitScale(), fitScaleHeight(), fitScaleWidth(), keyPressEvent(), Isis::ZoomTool::rubberBandComplete(), Isis::ZoomTool::setScale(), setScale(), Isis::MeasureTool::updateDist(), Isis::ZoomTool::updateTool(), and Isis::ZoomTool::zoomBy().
|
signal |
Emitted when zoom factor changed just before the repaint event.
Referenced by setScale(), and updateScrollBars().
|
signal |
Emitted when cube pixels that should be on the screen change.
Referenced by center(), onProgressTimer(), resizeEvent(), scrollContentsBy(), and setScale().
|
slot |
Move the scrollbars by dx/dy screen pixels.
dx | |
dy |
Definition at line 879 of file CubeViewport.cpp.
References scrollContentsBy(), and updateScrollBars().
|
protected |
Scroll the viewport contents by dx/dy screen pixels.
dx | |
dy |
Definition at line 919 of file CubeViewport.cpp.
References Isis::ViewportBuffer::bufferXYRect(), p_blueBuffer, p_grayBuffer, p_greenBuffer, p_pixmapPaintRects, p_redBuffer, p_updatingBuffers, paintPixmap(), Isis::ViewportBuffer::pan(), screenPixelsChanged(), shiftPixmap(), and Isis::ViewportBuffer::working().
Referenced by scrollBy().
void Isis::CubeViewport::setAllBandStretches | ( | Stretch | stretch | ) |
Sets a stretch for all bands.
stretch |
Definition at line 1985 of file CubeViewport.cpp.
References p_knownStretches.
Referenced by Isis::StretchTool::setStretchAcrossBands().
|
inline |
Sets the background color.
color |
Definition at line 383 of file CubeViewport.h.
References p_bgColor.
Referenced by Isis::SpecialPixelTool::apply().
void Isis::CubeViewport::setCaption | ( | ) |
Change the caption on the viewport title bar.
Definition at line 995 of file CubeViewport.cpp.
References Isis::CubeViewport::BandInfo::band, Isis::Cube::fileName(), p_blue, p_color, p_cube, p_gray, p_green, p_red, p_saveEnabled, p_scale, and windowTitleChanged().
Referenced by CubeViewport(), Isis::EditTool::redoEdit(), Isis::EditTool::save(), setCube(), setScale(), Isis::EditTool::undoEdit(), viewGray(), viewRGB(), and Isis::EditTool::writeToCube().
|
inline |
Sets the band bin combo box count.
count |
Definition at line 392 of file CubeViewport.h.
References p_comboCount.
Referenced by Isis::BandTool::setBandBin(), and Isis::BandTool::setList().
|
inline |
Sets the band bin combo box index.
index |
Definition at line 401 of file CubeViewport.h.
References p_comboIndex.
Referenced by Isis::BandTool::setBandBin(), and Isis::BandTool::setList().
void Isis::CubeViewport::setCube | ( | Cube * | cube | ) |
This method sets the viewports cube.
cube | The cube to set the CubeViewport window to |
cube |
Definition at line 436 of file CubeViewport.cpp.
References cube(), p_cube, and setCaption().
void Isis::CubeViewport::setCursorPosition | ( | int | x, |
int | y | ||
) |
Set the cursor position to x/y in the viewport.
x | |
y |
Definition at line 1876 of file CubeViewport.cpp.
|
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. |
Definition at line 598 of file CubeViewport.cpp.
References contentsToCube(), cubeLines(), cubeSamples(), cubeToContents(), p_blueBuffer, p_grayBuffer, p_greenBuffer, p_redBuffer, p_scale, p_updatingBuffers, paintPixmap(), paintPixmapRects(), scale(), Isis::ViewportBuffer::scaleChanged(), scaleChanged(), screenPixelsChanged(), setCaption(), and updateScrollBars().
Referenced by Isis::FindTool::centerLinkedViewports(), keyPressEvent(), Isis::ZoomTool::setScale(), setScale(), and showEvent().
|
slot |
Change the scale of the cube after moving samp/line to the center.
scale | |
sample | |
line |
Definition at line 681 of file CubeViewport.cpp.
References center(), Isis::ViewportBuffer::enable(), Isis::ViewportBuffer::enabled(), p_blueBuffer, p_grayBuffer, p_greenBuffer, p_paintPixmap, p_redBuffer, paintPixmap(), scale(), screenPixelsChanged(), and setScale().
|
slot |
Change the scale of the cube after moving x,y to the center.
scale | |
x | |
y |
Definition at line 665 of file CubeViewport.cpp.
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.
Definition at line 2377 of file CubeViewport.cpp.
References Isis::Cube::fileName(), Isis::PvlContainer::findKeyword(), Isis::Cube::group(), p_cube, and trackingCube().
Referenced by CubeViewport().
|
private |
Shifts the pixels on the pixmap without reading new data.
dx | |
dy |
Definition at line 1294 of file CubeViewport.cpp.
References p_bgColor, p_paintPixmap, p_pixmap, and paintPixmap().
Referenced by center(), and scrollContentsBy().
|
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. |
Definition at line 243 of file CubeViewport.cpp.
References Isis::ViewportBuffer::addStretchAction(), cubeLines(), cubeSamples(), Isis::ViewportBuffer::enable(), Isis::ViewportBuffer::enabled(), fitScale(), p_grayBuffer, p_paintPixmap, p_scale, paintPixmap(), and setScale().
|
slot |
|
slot |
Apply stretch pairs to blue bands.
string |
Definition at line 2145 of file CubeViewport.cpp.
References Isis::Stretch::Parse().
Referenced by Isis::StretchTool::advancedStretchChanged(), Isis::SpecialPixelTool::apply(), Isis::StretchTool::changeStretch(), Isis::StretchTool::setStretchAcrossBands(), Isis::StretchTool::setStretchAllViewports(), Isis::StretchTool::stretchChanged(), stretchKnownGlobal(), Isis::StretchTool::stretchRect(), and Isis::StretchTool::stretchRequested().
|
slot |
Sets the stretch for blue in rgb mode.
stretch |
Definition at line 2252 of file CubeViewport.cpp.
References blueBand(), Isis::CubeViewport::BandInfo::getStretch(), p_blue, p_globalStretches, paintPixmap(), Isis::Stretch::Pairs(), and Isis::CubeViewport::BandInfo::setStretch().
|
slot |
Apply stretch pairs to gray band.
string |
Definition at line 2109 of file CubeViewport.cpp.
References Isis::Stretch::Parse().
Referenced by Isis::StretchTool::advancedStretchChanged(), Isis::StretchTool::changeStretch(), Isis::StretchTool::setStretchAllViewports(), Isis::StretchTool::stretchChanged(), stretchKnownGlobal(), Isis::StretchTool::stretchRect(), Isis::StretchTool::stretchRequested(), and viewGray().
|
slot |
Sets the stretch for gray mode.
stretch |
Definition at line 2186 of file CubeViewport.cpp.
References Isis::Stretch::CopyPairs(), Isis::CubeViewport::BandInfo::getStretch(), grayBand(), p_blue, p_globalStretches, p_gray, p_green, p_red, paintPixmap(), Isis::Stretch::Pairs(), and Isis::CubeViewport::BandInfo::setStretch().
|
slot |
Apply stretch pairs to green bands.
string | the stretch |
Definition at line 2133 of file CubeViewport.cpp.
References Isis::Stretch::Parse().
Referenced by Isis::StretchTool::advancedStretchChanged(), Isis::SpecialPixelTool::apply(), Isis::StretchTool::changeStretch(), Isis::StretchTool::setStretchAcrossBands(), Isis::StretchTool::setStretchAllViewports(), Isis::StretchTool::stretchChanged(), stretchKnownGlobal(), Isis::StretchTool::stretchRect(), and Isis::StretchTool::stretchRequested().
|
slot |
Sets the stretch for green in rgb mode.
stretch |
Definition at line 2234 of file CubeViewport.cpp.
References Isis::CubeViewport::BandInfo::getStretch(), greenBand(), p_globalStretches, p_green, paintPixmap(), Isis::Stretch::Pairs(), and Isis::CubeViewport::BandInfo::setStretch().
|
slot |
List<Tool *> p This stretches to the global stretch.
Definition at line 2155 of file CubeViewport.cpp.
References blueBand(), grayBand(), greenBand(), isGray(), p_globalStretches, redBand(), stretchBlue(), stretchGray(), stretchGreen(), and stretchRed().
Referenced by Isis::StretchTool::stretchChanged(), and Isis::StretchTool::stretchGlobal().
|
slot |
Apply stretch pairs to red bands.
string | The stretch |
Definition at line 2121 of file CubeViewport.cpp.
References Isis::Stretch::Parse().
Referenced by Isis::StretchTool::advancedStretchChanged(), Isis::SpecialPixelTool::apply(), Isis::StretchTool::changeStretch(), Isis::StretchTool::setStretchAcrossBands(), Isis::StretchTool::setStretchAllViewports(), Isis::StretchTool::stretchChanged(), stretchKnownGlobal(), Isis::StretchTool::stretchRect(), and Isis::StretchTool::stretchRequested().
|
slot |
Sets the stretch for red in rgb mode.
stretch |
Definition at line 2216 of file CubeViewport.cpp.
References Isis::CubeViewport::BandInfo::getStretch(), p_globalStretches, p_red, paintPixmap(), Isis::Stretch::Pairs(), redBand(), and Isis::CubeViewport::BandInfo::setStretch().
|
inline |
Definition at line 368 of file CubeViewport.h.
Referenced by setTrackingCube(), and Isis::AdvancedTrackTool::TrackMosaicOrigin().
|
inline |
Definition at line 363 of file CubeViewport.h.
References p_groundMap.
Referenced by Isis::FindTool::centerLinkedViewports(), Isis::FindTool::distancePerPixel(), Isis::FeatureNomenclatureTool::FeaturePosition::FeaturePosition(), Isis::FeatureNomenclatureTool::findMissingNomenclature(), Isis::SpatialPlotTool::getSpatialStatistics(), Isis::FindTool::handleLinkClicked(), Isis::FindTool::handleRecordClicked(), Isis::ControlNetTool::mouseButtonRelease(), Isis::FindTool::mouseButtonRelease(), Isis::QnetTool::mouseButtonRelease(), Isis::FindTool::paintViewport(), Isis::SpatialPlotTool::updateTool(), and Isis::FindTool::updateTool().
|
private |
Update the scroll bar.
x | |
y |
Definition at line 1890 of file CubeViewport.cpp.
References cubeLines(), cubeSamples(), p_scale, and scaleChanged().
Referenced by center(), resizeEvent(), scrollBy(), and setScale().
|
private |
Update the What's This text.
Definition at line 1522 of file CubeViewport.cpp.
References Isis::ViewportBuffer::getBand(), getBandFilterName(), getCubeArea(), p_blueBuffer, p_color, p_cube, p_cubeWhatsThisText, p_grayBuffer, p_greenBuffer, p_redBuffer, p_viewportWhatsThisText, p_whatsThisText, Isis::Cube::physicalBand(), and Isis::PvlKeyword::size().
Referenced by paintPixmap().
|
virtualslot |
View cube as gray.
band |
Definition at line 1920 of file CubeViewport.cpp.
References Isis::ViewportBuffer::addStretchAction(), Isis::CubeViewport::BandInfo::band, Isis::ViewportBuffer::getBand(), Isis::CubeViewport::BandInfo::getStretch(), p_blueBuffer, p_camera, p_color, p_cubeData, p_cubeId, p_gray, p_grayBuffer, p_greenBuffer, p_knownStretches, p_redBuffer, Isis::ViewportBuffer::setBand(), Isis::Camera::SetBand(), setCaption(), and stretchGray().
|
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 |
Definition at line 825 of file CubeViewport.cpp.
References contentsToCube().
Referenced by center(), getCubeArea(), Isis::SpatialPlotTool::getSpatialStatistics(), Isis::SpectralPlotTool::getSpectralStatistics(), Isis::StatisticsTool::getStatistics(), Isis::SunShadowTool::mouseButtonPress(), Isis::ControlNetTool::mouseButtonRelease(), Isis::EditTool::mouseButtonRelease(), Isis::FindTool::mouseButtonRelease(), Isis::MatchTool::mouseButtonRelease(), Isis::QnetTool::mouseButtonRelease(), Isis::SunShadowTool::mouseMove(), Isis::ScatterPlotWindow::paint(), Isis::ScatterPlotConfigDialog::range(), Isis::HistogramTool::refreshPlot(), Isis::EditTool::rubberBandComplete(), Isis::ScatterPlotWindow::setMousePosition(), setScale(), Isis::HistogramItem::setVertices(), Isis::MeasureTool::updateDist(), Isis::TrackTool::updateLabels(), and Isis::AdvancedTrackTool::updateRow().
|
signal |
Emitted when viewport updated.
Referenced by Isis::MdiCubeViewport::paintEvent().
|
virtualslot |
View cube as color.
rband | |
gband | |
bband |
Definition at line 2004 of file CubeViewport.cpp.
References Isis::ViewportBuffer::addStretchAction(), Isis::CubeViewport::BandInfo::band, Isis::ViewportBuffer::getBand(), Isis::CubeViewport::BandInfo::getStretch(), p_blue, p_blueBuffer, p_camera, p_color, p_cubeData, p_cubeId, p_grayBuffer, p_green, p_greenBuffer, p_knownStretches, p_red, p_redBuffer, Isis::ViewportBuffer::setBand(), Isis::Camera::SetBand(), setCaption(), and Isis::CubeViewport::BandInfo::setStretch().
|
signal |
Emitted when window title changes.
Referenced by setCaption().
|
private |
The color to paint the background of the viewport.
Definition at line 635 of file CubeViewport.h.
Referenced by CubeViewport(), paintPixmap(), setBackground(), and shiftPixmap().
|
private |
Bricks for every color.
Definition at line 659 of file CubeViewport.h.
Referenced by CubeViewport(), and ~CubeViewport().
|
private |
Blue band info.
Definition at line 652 of file CubeViewport.h.
Referenced by blueBand(), bluePixel(), blueStretch(), paintPixmap(), setCaption(), stretchBlue(), stretchGray(), and viewRGB().
|
private |
Viewport Buffer to manage blue band.
Definition at line 633 of file CubeViewport.h.
Referenced by blueBuffer(), bufferUpdated(), center(), cubeContentsChanged(), cubeDataChanged(), CubeViewport(), getAllWhatsThisInfo(), onProgressTimer(), paintPixmap(), resizeEvent(), scrollContentsBy(), setScale(), updateWhatsThis(), viewGray(), viewRGB(), and ~CubeViewport().
|
private |
The camera from the cube.
Definition at line 638 of file CubeViewport.h.
Referenced by camera(), CubeViewport(), viewGray(), and viewRGB().
|
private |
Is the viewport in color?
Definition at line 648 of file CubeViewport.h.
Referenced by CubeViewport(), getAllWhatsThisInfo(), isColor(), isGray(), setCaption(), updateWhatsThis(), viewGray(), and viewRGB().
|
private |
Number of elements in band bin combo box.
Definition at line 654 of file CubeViewport.h.
Referenced by comboCount(), CubeViewport(), and setComboCount().
|
private |
Current element chosen from combo box.
Definition at line 655 of file CubeViewport.h.
Referenced by comboIndex(), CubeViewport(), and setComboIndex().
|
private |
The cube associated with the viewport.
Definition at line 637 of file CubeViewport.h.
Referenced by bluePixel(), cube(), cubeBands(), cubeLines(), cubeSamples(), CubeViewport(), getAllWhatsThisInfo(), getBandFilterName(), grayPixel(), greenPixel(), keyPressEvent(), redPixel(), setCaption(), setCube(), setTrackingCube(), updateWhatsThis(), and ~CubeViewport().
|
private |
Does all the cube I/O.
Definition at line 676 of file CubeViewport.h.
Referenced by cubeDataThread(), CubeViewport(), viewGray(), viewRGB(), and ~CubeViewport().
|
private |
Cube ID given from cube data thread for I/O.
Definition at line 677 of file CubeViewport.h.
Referenced by cubeDataChanged(), cubeID(), CubeViewport(), viewGray(), and viewRGB().
|
private |
Is the cube visible?
Definition at line 663 of file CubeViewport.h.
Referenced by cubeShown(), CubeViewport(), and paintEvent().
|
private |
The text for the cube's What's this.
Definition at line 669 of file CubeViewport.h.
Referenced by CubeViewport(), and updateWhatsThis().
Global stretches for each stretched band.
Definition at line 626 of file CubeViewport.h.
Referenced by CubeViewport(), stretchBlue(), stretchGray(), stretchGreen(), stretchKnownGlobal(), stretchRed(), and ~CubeViewport().
|
private |
Gray band info.
Definition at line 649 of file CubeViewport.h.
Referenced by grayBand(), grayPixel(), grayStretch(), setCaption(), stretchGray(), and viewGray().
|
private |
Viewport Buffer to manage gray band.
Definition at line 630 of file CubeViewport.h.
Referenced by bufferUpdated(), center(), cubeContentsChanged(), cubeDataChanged(), CubeViewport(), getAllWhatsThisInfo(), grayBuffer(), onProgressTimer(), paintPixmap(), resizeEvent(), scrollContentsBy(), setScale(), showEvent(), updateWhatsThis(), viewGray(), viewRGB(), and ~CubeViewport().
|
private |
Green band info.
Definition at line 651 of file CubeViewport.h.
Referenced by greenBand(), greenPixel(), greenStretch(), paintPixmap(), setCaption(), stretchGray(), stretchGreen(), and viewRGB().
|
private |
Viewport Buffer to manage green band.
Definition at line 632 of file CubeViewport.h.
Referenced by bufferUpdated(), center(), cubeContentsChanged(), cubeDataChanged(), CubeViewport(), getAllWhatsThisInfo(), greenBuffer(), onProgressTimer(), paintPixmap(), resizeEvent(), scrollContentsBy(), setScale(), updateWhatsThis(), viewGray(), viewRGB(), and ~CubeViewport().
|
private |
Bricks for every color.
Definition at line 658 of file CubeViewport.h.
Referenced by CubeViewport(), and ~CubeViewport().
|
private |
The universal ground map from the cube.
Definition at line 640 of file CubeViewport.h.
Referenced by CubeViewport(), universalGroundMap(), and ~CubeViewport().
|
private |
Bricks for every color.
Definition at line 660 of file CubeViewport.h.
Referenced by CubeViewport(), and ~CubeViewport().
|
private |
The qimage.
Definition at line 664 of file CubeViewport.h.
Referenced by CubeViewport(), paintPixmap(), resizeEvent(), and ~CubeViewport().
Stretches for each previously stretched band.
Definition at line 623 of file CubeViewport.h.
Referenced by CubeViewport(), forgetStretches(), setAllBandStretches(), viewGray(), viewRGB(), and ~CubeViewport().
|
private |
Paint the pixmap?
Definition at line 665 of file CubeViewport.h.
Referenced by CubeViewport(), paintPixmap(), resizeEvent(), setScale(), shiftPixmap(), and showEvent().
|
protected |
The qpixmap.
Definition at line 620 of file CubeViewport.h.
Referenced by Isis::MdiCubeViewport::paintEvent(), paintPixmap(), pixmap(), resizeEvent(), and shiftPixmap().
|
private |
A list of rects that the viewport buffers have requested painted.
Definition at line 674 of file CubeViewport.h.
Referenced by CubeViewport(), paintPixmap(), paintPixmapRects(), scrollContentsBy(), and ~CubeViewport().
|
private |
Bricks for every color.
Definition at line 661 of file CubeViewport.h.
Referenced by bluePixel(), CubeViewport(), grayPixel(), greenPixel(), redPixel(), and ~CubeViewport().
|
private |
Activated to update progress bar.
Definition at line 644 of file CubeViewport.h.
Referenced by CubeViewport(), enableProgress(), onProgressTimer(), and ~CubeViewport().
|
private |
The projection from the cube.
Definition at line 639 of file CubeViewport.h.
Referenced by CubeViewport(), and projection().
|
private |
Red band info.
Definition at line 650 of file CubeViewport.h.
Referenced by paintPixmap(), redBand(), redPixel(), redStretch(), setCaption(), stretchGray(), stretchRed(), and viewRGB().
|
private |
Bricks for every color.
Definition at line 657 of file CubeViewport.h.
Referenced by CubeViewport(), and ~CubeViewport().
|
private |
Viewport Buffer to manage red band.
Definition at line 631 of file CubeViewport.h.
Referenced by bufferUpdated(), center(), cubeContentsChanged(), cubeDataChanged(), CubeViewport(), getAllWhatsThisInfo(), onProgressTimer(), paintPixmap(), redBuffer(), resizeEvent(), scrollContentsBy(), setScale(), updateWhatsThis(), viewGray(), viewRGB(), and ~CubeViewport().
|
private |
Has the cube changed?
Definition at line 662 of file CubeViewport.h.
Referenced by confirmClose(), cubeChanged(), CubeViewport(), and setCaption().
|
private |
The scale number.
Definition at line 646 of file CubeViewport.h.
Referenced by contentsToCube(), cubeToContents(), CubeViewport(), keyPressEvent(), scale(), setCaption(), setScale(), showEvent(), and updateScrollBars().
|
private |
if true then this owns the CubeDataThread, and should thus delete it
Definition at line 683 of file CubeViewport.h.
Referenced by CubeViewport(), and ~CubeViewport().
|
private |
Changing RGB and need to not repaint pixmap?
Definition at line 666 of file CubeViewport.h.
Referenced by center(), cubeContentsChanged(), cubeDataChanged(), CubeViewport(), paintPixmap(), resizeEvent(), scrollContentsBy(), and setScale().
|
private |
The text for the viewport's what's this.
Definition at line 670 of file CubeViewport.h.
Referenced by resizeEvent(), and updateWhatsThis().
|
private |
The text for What's this.
Definition at line 668 of file CubeViewport.h.
Referenced by CubeViewport(), and updateWhatsThis().