14#include <QAbstractScrollArea>
29 class UniversalGroundMap;
256 double &sample,
double &line)
const;
267 int &x,
int &y)
const;
277 double &sample,
double &line)
const;
287 int &x,
int &y)
const;
297 double redPixel(
int sample,
int line);
359 return p_trackingCube;
383 p_comboCount = count;
392 p_comboIndex = index;
432 return p_greenBuffer;
508 void getCubeArea(
double & pdStartSample,
double & pdEndSample,
509 double & pdStartLine,
double & pdEndLine);
552 void center(
int x,
int y);
553 void center(
double sample,
double line);
597 void shiftPixmap(
int dx,
int dy);
599 void updateScrollBars(
int x,
int y);
600 void paintPixmapRects();
631 Cube *p_trackingCube;
634 QTimer *p_progressTimer;
656 bool p_updatingBuffers;
658 QString p_whatsThisText;
659 QString p_cubeWhatsThisText;
660 QString p_viewportWhatsThisText;
661 void updateWhatsThis();
673 bool p_thisOwnsCubeData;
Buffer for containing a three dimensional section of an image.
Definition Brick.h:45
Encapsulation of Cube I/O with Change Notifications.
Definition CubeDataThread.h:59
IO Handler for Isis Cubes.
Definition Cube.h:168
Stores stretch information for a cube.
Definition CubeStretch.h:27
Definition CubeViewport.h:147
BandInfo()
Definition CubeViewport.cpp:2396
int band
The band.
Definition CubeViewport.h:168
const BandInfo & operator=(BandInfo other)
The BandInfo for the Cube.
Definition CubeViewport.cpp:2433
~BandInfo()
Deconstructor.
Definition CubeViewport.cpp:2415
CubeStretch getStretch() const
Definition CubeViewport.cpp:2423
void setStretch(const Stretch &newStretch)
Definition CubeViewport.cpp:2428
Widget to display Isis cubes for qt apps.
Definition CubeViewport.h:122
void stretchGray(const QString &string)
Apply stretch pairs to gray band.
Definition CubeViewport.cpp:2106
void getCubeArea(double &pdStartSample, double &pdEndSample, double &pdStartLine, double &pdEndLine)
Get Cube area corresponding to the viewport's dimension.
Definition CubeViewport.cpp:1494
void setBackground(QColor color)
Sets the background color.
Definition CubeViewport.h:373
double bluePixel(int sample, int line)
Gets the blue pixel.
Definition CubeViewport.cpp:1637
CubeViewport(Cube *cube, CubeDataThread *cdt=0, QWidget *parent=0)
Constructor for the CubeViewport.
Definition CubeViewport.cpp:59
double scale() const
Definition CubeViewport.h:214
void stretchBlue(const QString &string)
Apply stretch pairs to blue bands.
Definition CubeViewport.cpp:2142
int comboCount() const
Definition CubeViewport.h:224
CubeStretch grayStretch() const
Return the gray band stretch.
Definition CubeViewport.cpp:1661
void doneWithData(int, const Isis::Brick *)
Emitted when a brick is no longer needed, should only be sent to cube data thread.
void showEvent(QShowEvent *)
This method is called to initially show the viewport.
Definition CubeViewport.cpp:232
void viewportClosed(CubeViewport *)
Emitted when viewport is closed.
void getBandFilterName(PvlKeyword &pFilterNameKey)
Get Band Filter name from the Isis cube label.
Definition CubeViewport.cpp:1473
int cubeLines() const
Return the number of lines in the cube.
Definition CubeViewport.cpp:438
void discardChanges(CubeViewport *)
Emitted when changes should be discarded.
double greenPixel(int sample, int line)
Gets the green pixel.
Definition CubeViewport.cpp:1621
int greenBand() const
Definition CubeViewport.h:204
int cubeBands() const
Return the number of bands in the cube.
Definition CubeViewport.cpp:444
virtual void restretch(ViewportBuffer *buffer)=0
This is called by internal viewport buffers when a stretch action should be performed.
void mouseMove(QPoint, Qt::MouseButton)
Emitted when the mouse moves.
void setCursorPosition(int x, int y)
Set the cursor position to x/y in the viewport.
Definition CubeViewport.cpp:1873
CubeStretch redStretch() const
Return the red band stretch.
Definition CubeViewport.cpp:1667
void scaleChanged()
Emitted when zoom factor changed just before the repaint event.
int redBand() const
Definition CubeViewport.h:199
void setComboCount(int count)
Sets the band bin combo box count.
Definition CubeViewport.h:382
void setCube(Cube *cube)
This method sets the viewports cube.
Definition CubeViewport.cpp:425
virtual void resizeEvent(QResizeEvent *e)
The viewport is being resized.
Definition CubeViewport.cpp:1022
bool isColor() const
Definition CubeViewport.h:184
virtual void paintEvent(QPaintEvent *e)
Repaint the viewport.
Definition CubeViewport.cpp:1088
void contentsToCube(int x, int y, double &sample, double &line) const
Turns contents to a cube.
Definition CubeViewport.cpp:797
QSize sizeHint() const
Make viewports show up as 512 by 512.
Definition CubeViewport.cpp:570
void changeCursor(QCursor cursor)
Allows users to change the cursor type on the viewport.
Definition CubeViewport.cpp:2391
virtual bool eventFilter(QObject *o, QEvent *e)
Event filter to watch for mouse events on viewport.
Definition CubeViewport.cpp:1693
bool cursorInside() const
Is cursor inside viewport.
Definition CubeViewport.cpp:1808
QPoint cursorPosition() const
Return the cursor position in the viewport.
Definition CubeViewport.cpp:1833
ViewportBuffer * grayBuffer()
Returns the gray viewport buffer (Will be NULL if in RGB mode.)
Definition CubeViewport.h:411
virtual ~CubeViewport()
Deconstructor for the Cubeviewport.
Definition CubeViewport.cpp:306
virtual void viewRGB(int redBand, int greenBand, int blueBand)
View cube as color.
Definition CubeViewport.cpp:2001
double fitScaleHeight() const
Determine the scale of cube in heighth to fit in the viewport.
Definition CubeViewport.cpp:2297
int cubeSamples() const
Return the number of samples in the cube.
Definition CubeViewport.cpp:432
void mouseDoubleClick(QPoint)
Emitted when double click happens.
void progressComplete()
Emitted when the current progress is complete (100)
void stretchKnownGlobal()
List<Tool *> p This stretches to the global stretch.
Definition CubeViewport.cpp:2152
QPixmap p_pixmap
The qpixmap.
Definition CubeViewport.h:610
void stretchGreen(const QString &string)
Apply stretch pairs to green bands.
Definition CubeViewport.cpp:2130
void scrollContentsBy(int dx, int dy)
Scroll the viewport contents by dx/dy screen pixels.
Definition CubeViewport.cpp:908
double grayPixel(int sample, int line)
Gets the gray pixel.
Definition CubeViewport.cpp:1653
Cube * trackingCube() const
Definition CubeViewport.h:358
void setTrackingCube()
Finds the Tracking group from p_cube and stores the tracking cube name so that we can grab it in Adva...
Definition CubeViewport.cpp:2374
void cubeChanged(bool changed)
This method is called when the cube has changed or changes have been finalized.
Definition CubeViewport.cpp:560
void cubeToContents(double sample, double line, int &x, int &y) const
Turns a cube into contents.
Definition CubeViewport.cpp:834
virtual void keyPressEvent(QKeyEvent *e)
Process arrow keystrokes on cube.
Definition CubeViewport.cpp:1758
void viewportToCube(int x, int y, double &sample, double &line) const
Turns a viewport into a cube.
Definition CubeViewport.cpp:814
void cubeToViewport(double sample, double line, int &x, int &y) const
Turns a cube into a viewport.
Definition CubeViewport.cpp:851
void mouseButtonRelease(QPoint, Qt::MouseButton)
Emitted when mouse button released.
void mouseButtonPress(QPoint, Qt::MouseButton)
Emitted when mouse button pressed.
void mouseLeave()
Emitted when the mouse leaves the viewport.
double fitScale() const
Determine the scale that causes the full cube to fit in the viewport.
Definition CubeViewport.cpp:2269
void stretchRed(const QString &string)
Apply stretch pairs to red bands.
Definition CubeViewport.cpp:2118
bool confirmClose()
This method should be called during a close event that would cause this viewport to close.
Definition CubeViewport.cpp:524
CubeStretch greenStretch() const
Return the green band stretch.
Definition CubeViewport.cpp:1673
void saveChanges(CubeViewport *)
Emitted when changes should be saved.
void setScale(double scale)
Change the scale of the cube to the given parameter value.
Definition CubeViewport.cpp:587
Camera * camera() const
Definition CubeViewport.h:348
void forgetStretches()
Resets all remembered stretches.
Definition CubeViewport.cpp:1972
int grayBand() const
Definition CubeViewport.h:194
int cubeID()
Definition CubeViewport.h:480
void paintPixmap()
Paint the whole pixmap.
Definition CubeViewport.cpp:1128
void getAllWhatsThisInfo(Pvl &pWhatsThisPvl)
Get All WhatsThis info - viewport, cube, area in PVL format.
Definition CubeViewport.cpp:1371
Cube * cube() const
Definition CubeViewport.h:338
int comboIndex() const
Definition CubeViewport.h:229
void mouseEnter()
Emitted when the mouse enters the viewport.
double redPixel(int sample, int line)
Gets the red pixel.
Definition CubeViewport.cpp:1605
ViewportBuffer * greenBuffer()
Returns the green viewport buffer (Will be NULL if in Gray mode.)
Definition CubeViewport.h:431
void enableProgress()
This restarts the progress bar.
Definition CubeViewport.cpp:971
virtual void viewGray(int band)
View cube as gray.
Definition CubeViewport.cpp:1917
ViewportBuffer * redBuffer()
Returns the red viewport buffer (Will be NULL if in Gray mode.)
Definition CubeViewport.h:421
void windowTitleChanged()
Emitted when window title changes.
void scrollBy(int dx, int dy)
Move the scrollbars by dx/dy screen pixels.
Definition CubeViewport.cpp:868
QVector< Stretch * > * p_globalStretches
Global stretches for each stretched band.
Definition CubeViewport.h:616
void progressChanged(int)
Emitted with current progress (0 to 100) when working.
QVector< Stretch * > * p_knownStretches
Stretches for each previously stretched band.
Definition CubeViewport.h:613
void onProgressTimer()
This updates the progress bar visually.
Definition CubeViewport.cpp:262
void screenPixelsChanged()
Emitted when cube pixels that should be on the screen change.
void setAllBandStretches(Stretch stretch)
Sets a stretch for all bands.
Definition CubeViewport.cpp:1982
void viewportUpdated()
Emitted when viewport updated.
void moveCursor(int x, int y)
Move the cursor by x,y if possible.
Definition CubeViewport.cpp:1846
void cubeContentsChanged(QRect rect)
Calle dhwen the contents of the cube changes.
Definition CubeViewport.cpp:2311
void setComboIndex(int index)
Sets the band bin combo box index.
Definition CubeViewport.h:391
QPixmap pixmap()
Returns the pixmap.
Definition CubeViewport.h:401
ViewportBuffer * blueBuffer()
Returns the blue viewport buffer (Will be NULL if in Gray mode.)
Definition CubeViewport.h:441
bool isGray() const
Definition CubeViewport.h:189
void setCaption()
Change the caption on the viewport title bar.
Definition CubeViewport.cpp:984
UniversalGroundMap * universalGroundMap() const
Definition CubeViewport.h:353
bool cubeShown() const
Definition CubeViewport.h:219
virtual void cubeDataChanged(int cubeId, const Isis::Brick *)
This method updates the internal viewport buffer based on changes in cube DN values.
Definition CubeViewport.cpp:456
int blueBand() const
Definition CubeViewport.h:209
Projection * projection() const
Definition CubeViewport.h:343
void mouseMove(QPoint)
Emitted when the mouse moves.
double fitScaleWidth() const
Determine the scale of cube in the width to fit in the viewport.
Definition CubeViewport.cpp:2284
CubeStretch blueStretch() const
Return the blue band stretch.
Definition CubeViewport.cpp:1679
void center(int x, int y)
Bring the cube pixel under viewport x/y to the center.
Definition CubeViewport.cpp:729
CubeDataThread * cubeDataThread()
Definition CubeViewport.h:473
void bufferUpdated(QRect rect)
This method is called by ViewportBuffer upon successful completion of all operations and gives the ap...
Definition CubeViewport.cpp:1103
Base class for Map Projections.
Definition Projection.h:155
Container for cube-like labels.
Definition Pvl.h:119
A single keyword-value pair.
Definition PvlKeyword.h:87
Pixel value mapper.
Definition Stretch.h:58
Universal Ground Map.
Definition UniversalGroundMap.h:69
Reads and stores visible DN values.
Definition ViewportBuffer.h:63
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16