28 #include <QAbstractScrollArea>
43 class UniversalGroundMap;
209 double &sample,
double &line)
const;
211 int &x,
int &y)
const;
213 double &sample,
double &line)
const;
215 int &x,
int &y)
const;
217 double redPixel(
int sample,
int line);
268 p_comboCount = count;
277 p_comboIndex = index;
317 return p_greenBuffer;
393 void getCubeArea(
double & pdStartSample,
double & pdEndSample,
394 double & pdStartLine,
double & pdEndLine);
431 void center(
int x,
int y);
432 void center(
double sample,
double line);
476 void shiftPixmap(
int dx,
int dy);
478 void updateScrollBars(
int x,
int y);
479 void paintPixmapRects();
512 QTimer *p_progressTimer;
534 bool p_updatingBuffers;
536 QString p_whatsThisText;
537 QString p_cubeWhatsThisText;
538 QString p_viewportWhatsThisText;
539 void updateWhatsThis();
551 bool p_thisOwnsCubeData;
void setAllBandStretches(Stretch stretch)
Sets a stretch for all bands.
Definition: CubeViewport.cpp:1960
QVector< Stretch * > * p_knownStretches
Stretches for each previously stretched band.
Definition: CubeViewport.h:492
Stretch redStretch() const
Return the red band stretch.
Definition: CubeViewport.cpp:1660
void progressChanged(int)
Emitted with current progress (0 to 100) when working.
Definition: moc_CubeViewport.cpp:534
ViewportBuffer * grayBuffer()
Returns the gray viewport buffer (Will be NULL if in RGB mode.)
Definition: CubeViewport.h:296
void viewportUpdated()
Emitted when viewport updated.
Definition: moc_CubeViewport.cpp:442
double fitScaleWidth() const
Determine the scale of cube in the width to fit in the viewport.
Definition: CubeViewport.cpp:2262
UniversalGroundMap * universalGroundMap() const
Return the universal ground map associated with the cube (NULL implies none)
Definition: CubeViewport.h:243
Stretch getStretch() const
Definition: CubeViewport.cpp:2385
Reads and stores visible DN values.
Definition: ViewportBuffer.h:78
QPixmap p_pixmap
The qpixmap.
Definition: CubeViewport.h:489
void scaleChanged()
Emitted when zoom factor changed just before the repaint event.
Definition: moc_CubeViewport.cpp:508
Stretch greenStretch() const
Return the green band stretch.
Definition: CubeViewport.cpp:1666
ViewportBuffer * redBuffer()
Returns the red viewport buffer (Will be NULL if in Gray mode.)
Definition: CubeViewport.h:306
void stretchBlue(const QString &string)
Apply stretch pairs to blue bands.
Definition: CubeViewport.cpp:2120
Universal Ground Map.
Definition: UniversalGroundMap.h:83
void forgetStretches()
Resets all remembered stretches.
Definition: CubeViewport.cpp:1950
void stretchRed(const QString &string)
Apply stretch pairs to red bands.
Definition: CubeViewport.cpp:2096
bool isGray() const
Is the viewport shown in gray / b&w.
Definition: CubeViewport.h:158
bool isColor() const
Is the viewport shown in 3-band color.
Definition: CubeViewport.h:153
QPixmap pixmap()
Returns the pixmap.
Definition: CubeViewport.h:286
void mouseLeave()
Emitted when the mouse leaves the viewport.
Definition: moc_CubeViewport.cpp:475
void getAllWhatsThisInfo(Pvl &pWhatsThisPvl)
Get All WhatsThis info - viewport, cube, area in PVL format.
Definition: CubeViewport.cpp:1364
void saveChanges(CubeViewport *)
Emitted when changes should be saved.
Definition: moc_CubeViewport.cpp:514
bool cursorInside() const
Is cursor inside viewport.
Definition: CubeViewport.cpp:1786
BandInfo()
Definition: CubeViewport.cpp:2358
int cubeSamples() const
Return the number of samples in the cube.
Definition: CubeViewport.cpp:428
Buffer for containing a three dimensional section of an image.
Definition: Brick.h:60
void getBandFilterName(PvlKeyword &pFilterNameKey)
Get Band Filter name from the Isis cube label.
Definition: CubeViewport.cpp:1466
int greenBand() const
Return the green band currently viewed.
Definition: CubeViewport.h:173
void center(int x, int y)
Bring the cube pixel under viewport x/y to the center.
Definition: CubeViewport.cpp:726
void setScale(double scale)
Change the scale of the cube to the given parameter value.
Definition: CubeViewport.cpp:583
void cubeContentsChanged(QRect rect)
Cube changed, repaint given area.
Definition: CubeViewport.cpp:2289
void setCursorPosition(int x, int y)
Set the cursor position to x/y in the viewport.
Definition: CubeViewport.cpp:1851
void discardChanges(CubeViewport *)
Emitted when changes should be discarded.
Definition: moc_CubeViewport.cpp:521
int redBand() const
Return the red band currently viewed.
Definition: CubeViewport.h:168
virtual void viewRGB(int redBand, int greenBand, int blueBand)
View cube as color.
Definition: CubeViewport.cpp:1979
QPoint cursorPosition() const
Return the cursor position in the viewport.
Definition: CubeViewport.cpp:1811
Projection * projection() const
Return the projection associated with cube (NULL implies none)
Definition: CubeViewport.h:233
Widget to display Isis cubes for qt apps.
Definition: CubeViewport.h:121
void mouseButtonPress(QPoint, Qt::MouseButton)
Emitted when mouse button pressed.
Definition: moc_CubeViewport.cpp:481
void setComboCount(int count)
Sets the band bin combo box count.
Definition: CubeViewport.h:267
void screenPixelsChanged()
Emitted when cube pixels that should be on the screen change.
Definition: moc_CubeViewport.cpp:528
void paintPixmap()
Paint the whole pixmap.
Definition: CubeViewport.cpp:1129
double greenPixel(int sample, int line)
Return the green pixel value at a sample/line.
Definition: CubeViewport.cpp:1614
double redPixel(int sample, int line)
Return the red pixel value at a sample/line.
Definition: CubeViewport.cpp:1598
void setComboIndex(int index)
Sets the band bin combo box index.
Definition: CubeViewport.h:276
double grayPixel(int sample, int line)
Return the gray pixel value at a sample/line.
Definition: CubeViewport.cpp:1646
Stretch blueStretch() const
Return the blue band stretch.
Definition: CubeViewport.cpp:1672
void windowTitleChanged()
Emitted when window title changes.
Definition: moc_CubeViewport.cpp:502
int comboCount() const
Return the BandBin combo box count.
Definition: CubeViewport.h:193
Stretch grayStretch() const
Return the gray band stretch.
Definition: CubeViewport.cpp:1654
Base class for Map Projections.
Definition: Projection.h:169
Cube * cube() const
Return the cube associated with viewport.
Definition: CubeViewport.h:228
void stretchKnownGlobal()
List<Tool *> p This stretches to the global stretch.
Definition: CubeViewport.cpp:2130
void doneWithData(int, const Isis::Brick *)
Emitted when a brick is no longer needed, should only be sent to cube data thread.
Definition: moc_CubeViewport.cpp:541
void moveCursor(int x, int y)
Move the cursor by x,y if possible.
Definition: CubeViewport.cpp:1824
int grayBand() const
Return the gray band currently viewed.
Definition: CubeViewport.h:163
int comboIndex() const
Return the BandBin combo box index.
Definition: CubeViewport.h:198
void mouseDoubleClick(QPoint)
Emitted when double click happens.
Definition: moc_CubeViewport.cpp:495
bool confirmClose()
This method should be called during a close event that would cause this viewport to close...
Definition: CubeViewport.cpp:520
Pixel value mapper.
Definition: Stretch.h:72
Camera * camera() const
Return the camera associated with the cube (NULL implies none)
Definition: CubeViewport.h:238
void mouseMove(QPoint)
Emitted when the mouse moves.
Definition: moc_CubeViewport.cpp:461
double fitScaleHeight() const
Determine the scale of cube in heighth to fit in the viewport.
Definition: CubeViewport.cpp:2275
A single keyword-value pair.
Definition: PvlKeyword.h:98
void bufferUpdated(QRect rect)
This method is called by ViewportBuffer upon successful completion of all operations and gives the ap...
Definition: CubeViewport.cpp:1104
void cubeToContents(double sample, double line, int &x, int &y) const
Convert a cube sample/line to a contents x/y (should not be outside)
Definition: CubeViewport.cpp:835
void enableProgress()
This restarts the progress bar.
Definition: CubeViewport.cpp:972
virtual void resizeEvent(QResizeEvent *e)
The viewport is being resized.
Definition: CubeViewport.cpp:1023
double bluePixel(int sample, int line)
Return the blue pixel value at a sample/line.
Definition: CubeViewport.cpp:1630
int cubeID()
Definition: CubeViewport.h:365
void mouseEnter()
Emitted when the mouse enters the viewport.
Definition: moc_CubeViewport.cpp:455
void viewportToCube(int x, int y, double &sample, double &line) const
Convert a viewport x/y to a cube sample/line (may be outside the cube)
Definition: CubeViewport.cpp:815
Encapsulation of Cube I/O with Change Notifications.
Definition: CubeDataThread.h:53
Container for cube-like labels.
Definition: Pvl.h:135
virtual void viewGray(int band)
View cube as gray.
Definition: CubeViewport.cpp:1895
void getCubeArea(double &pdStartSample, double &pdEndSample, double &pdStartLine, double &pdEndLine)
Get Cube area corresponding to the viewport's dimension.
Definition: CubeViewport.cpp:1487
void scrollBy(int dx, int dy)
Move the scrollbars by dx/dy screen pixels.
Definition: CubeViewport.cpp:869
~BandInfo()
Definition: CubeViewport.cpp:2377
ViewportBuffer * blueBuffer()
Returns the blue viewport buffer (Will be NULL if in Gray mode.)
Definition: CubeViewport.h:326
Definition: Calculator.h:33
int cubeBands() const
Return the number of bands in the cube.
Definition: CubeViewport.cpp:440
QVector< Stretch * > * p_globalStretches
Global stretches for each stretched band.
Definition: CubeViewport.h:495
void viewportClosed(CubeViewport *)
Emitted when viewport is closed.
Definition: moc_CubeViewport.cpp:448
void cubeChanged(bool changed)
This method is called when the cube has changed or changes have been finalized.
Definition: CubeViewport.cpp:556
virtual void restretch(ViewportBuffer *buffer)=0
This is called by internal viewport buffers when a stretch action should be performed.
void setStretch(const Stretch &newStretch)
Definition: CubeViewport.cpp:2392
void cubeToViewport(double sample, double line, int &x, int &y) const
Convert a cube sample/line to a viewport x/y (may be outside the viewport)
Definition: CubeViewport.cpp:852
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:452
bool cubeShown() const
Return if the cube is visible.
Definition: CubeViewport.h:188
CubeDataThread * cubeDataThread()
Definition: CubeViewport.h:358
int band
Definition: CubeViewport.h:142
void stretchGreen(const QString &string)
Apply stretch pairs to green bands.
Definition: CubeViewport.cpp:2108
CubeViewport(Cube *cube, CubeDataThread *cdt=0, QWidget *parent=0)
Construct a cube viewport.
Definition: CubeViewport.cpp:69
virtual void paintEvent(QPaintEvent *e)
Repaint the viewport.
Definition: CubeViewport.cpp:1089
void setBackground(QColor color)
Sets the background color.
Definition: CubeViewport.h:258
virtual ~CubeViewport()
Destructor.
Definition: CubeViewport.cpp:305
const BandInfo & operator=(BandInfo other)
Definition: CubeViewport.cpp:2397
Definition: CubeViewport.h:134
double scale() const
Return the scale.
Definition: CubeViewport.h:183
void contentsToCube(int x, int y, double &sample, double &line) const
Convert a contents x/y to a cube sample/line (may be outside the cube)
Definition: CubeViewport.cpp:798
QSize sizeHint() const
Make viewports show up as 512 by 512.
Definition: CubeViewport.cpp:566
void setCube(Cube *cube)
This method sets the viewports cube.
Definition: CubeViewport.cpp:421
void setCaption()
Change the caption on the viewport title bar.
Definition: CubeViewport.cpp:985
virtual void keyPressEvent(QKeyEvent *e)
Process arrow keystrokes on cube.
Definition: CubeViewport.cpp:1747
int blueBand() const
Return the blue band currently viewed.
Definition: CubeViewport.h:178
void scrollContentsBy(int dx, int dy)
Scroll the viewport contents by dx/dy screen pixels.
Definition: CubeViewport.cpp:909
void onProgressTimer()
This updates the progress bar visually.
Definition: CubeViewport.cpp:262
void stretchGray(const QString &string)
Apply stretch pairs to gray band.
Definition: CubeViewport.cpp:2084
int cubeLines() const
Return the number of lines in the cube.
Definition: CubeViewport.cpp:434
ViewportBuffer * greenBuffer()
Returns the green viewport buffer (Will be NULL if in Gray mode.)
Definition: CubeViewport.h:316
void changeCursor(QCursor cursor)
Allows users to change the cursor type on the viewport.
Definition: CubeViewport.cpp:2353
double fitScale() const
Determine the scale that causes the full cube to fit in the viewport.
Definition: CubeViewport.cpp:2247
void showEvent(QShowEvent *)
This method is called to initially show the viewport.
Definition: CubeViewport.cpp:232
void mouseButtonRelease(QPoint, Qt::MouseButton)
Emitted when mouse button released.
Definition: moc_CubeViewport.cpp:488
virtual bool eventFilter(QObject *o, QEvent *e)
Event filter to watch for mouse events on viewport.
Definition: CubeViewport.cpp:1686
IO Handler for Isis Cubes.
Definition: Cube.h:158