28 #include <QAbstractScrollArea> 42 class UniversalGroundMap;
266 double &sample,
double &line)
const;
277 int &x,
int &y)
const;
287 double &sample,
double &line)
const;
297 int &x,
int &y)
const;
307 double redPixel(
int sample,
int line);
369 return p_trackingCube;
393 p_comboCount = count;
402 p_comboIndex = index;
442 return p_greenBuffer;
518 void getCubeArea(
double & pdStartSample,
double & pdEndSample,
519 double & pdStartLine,
double & pdEndLine);
562 void center(
int x,
int y);
563 void center(
double sample,
double line);
607 void shiftPixmap(
int dx,
int dy);
609 void updateScrollBars(
int x,
int y);
610 void paintPixmapRects();
641 Cube *p_trackingCube;
644 QTimer *p_progressTimer;
666 bool p_updatingBuffers;
668 QString p_whatsThisText;
669 QString p_cubeWhatsThisText;
670 QString p_viewportWhatsThisText;
671 void updateWhatsThis();
683 bool p_thisOwnsCubeData;
void setAllBandStretches(Stretch stretch)
Sets a stretch for all bands.
Definition: CubeViewport.cpp:1985
Stretch getStretch() const
Definition: CubeViewport.cpp:2426
QVector< Stretch *> * p_knownStretches
Stretches for each previously stretched band.
Definition: CubeViewport.h:623
void progressComplete()
Emitted when the current progress is complete (100)
Stretch redStretch() const
Return the red band stretch.
Definition: CubeViewport.cpp:1670
void progressChanged(int)
Emitted with current progress (0 to 100) when working.
ViewportBuffer * grayBuffer()
Returns the gray viewport buffer (Will be NULL if in RGB mode.)
Definition: CubeViewport.h:421
void viewportUpdated()
Emitted when viewport updated.
int cubeLines() const
Return the number of lines in the cube.
Definition: CubeViewport.cpp:449
Reads and stores visible DN values.
Definition: ViewportBuffer.h:78
QPixmap p_pixmap
The qpixmap.
Definition: CubeViewport.h:620
void scaleChanged()
Emitted when zoom factor changed just before the repaint event.
Cube * cube() const
Definition: CubeViewport.h:348
ViewportBuffer * redBuffer()
Returns the red viewport buffer (Will be NULL if in Gray mode.)
Definition: CubeViewport.h:431
int cubeBands() const
Return the number of bands in the cube.
Definition: CubeViewport.cpp:455
int greenBand() const
Definition: CubeViewport.h:214
void stretchBlue(const QString &string)
Apply stretch pairs to blue bands.
Definition: CubeViewport.cpp:2145
Universal Ground Map.
Definition: UniversalGroundMap.h:85
Stretch greenStretch() const
Return the green band stretch.
Definition: CubeViewport.cpp:1676
bool isGray() const
Definition: CubeViewport.h:199
void forgetStretches()
Resets all remembered stretches.
Definition: CubeViewport.cpp:1975
void stretchRed(const QString &string)
Apply stretch pairs to red bands.
Definition: CubeViewport.cpp:2121
QPixmap pixmap()
Returns the pixmap.
Definition: CubeViewport.h:411
void mouseLeave()
Emitted when the mouse leaves the viewport.
void getAllWhatsThisInfo(Pvl &pWhatsThisPvl)
Get All WhatsThis info - viewport, cube, area in PVL format.
Definition: CubeViewport.cpp:1374
void saveChanges(CubeViewport *)
Emitted when changes should be saved.
void cubeToContents(double sample, double line, int &x, int &y) const
Turns a cube into contents.
Definition: CubeViewport.cpp:845
BandInfo()
Definition: CubeViewport.cpp:2399
Buffer for containing a three dimensional section of an image.
Definition: Brick.h:61
void getBandFilterName(PvlKeyword &pFilterNameKey)
Get Band Filter name from the Isis cube label.
Definition: CubeViewport.cpp:1476
void center(int x, int y)
Bring the cube pixel under viewport x/y to the center.
Definition: CubeViewport.cpp:740
int blueBand() const
Definition: CubeViewport.h:219
void setScale(double scale)
Change the scale of the cube to the given parameter value.
Definition: CubeViewport.cpp:598
void cubeContentsChanged(QRect rect)
Calle dhwen the contents of the cube changes.
Definition: CubeViewport.cpp:2314
void setCursorPosition(int x, int y)
Set the cursor position to x/y in the viewport.
Definition: CubeViewport.cpp:1876
bool isColor() const
Definition: CubeViewport.h:194
double fitScale() const
Determine the scale that causes the full cube to fit in the viewport.
Definition: CubeViewport.cpp:2272
void discardChanges(CubeViewport *)
Emitted when changes should be discarded.
virtual void viewRGB(int redBand, int greenBand, int blueBand)
View cube as color.
Definition: CubeViewport.cpp:2004
Widget to display Isis cubes for qt apps.
Definition: CubeViewport.h:132
void cubeToViewport(double sample, double line, int &x, int &y) const
Turns a cube into a viewport.
Definition: CubeViewport.cpp:862
void mouseButtonPress(QPoint, Qt::MouseButton)
Emitted when mouse button pressed.
void setComboCount(int count)
Sets the band bin combo box count.
Definition: CubeViewport.h:392
void screenPixelsChanged()
Emitted when cube pixels that should be on the screen change.
int comboCount() const
Definition: CubeViewport.h:234
void paintPixmap()
Paint the whole pixmap.
Definition: CubeViewport.cpp:1139
Stretch grayStretch() const
Return the gray band stretch.
Definition: CubeViewport.cpp:1664
double greenPixel(int sample, int line)
Gets the green pixel.
Definition: CubeViewport.cpp:1624
double redPixel(int sample, int line)
Gets the red pixel.
Definition: CubeViewport.cpp:1608
void setComboIndex(int index)
Sets the band bin combo box index.
Definition: CubeViewport.h:401
double grayPixel(int sample, int line)
Gets the gray pixel.
Definition: CubeViewport.cpp:1656
void windowTitleChanged()
Emitted when window title changes.
Base class for Map Projections.
Definition: Projection.h:171
Camera * camera() const
Definition: CubeViewport.h:358
double fitScaleWidth() const
Determine the scale of cube in the width to fit in the viewport.
Definition: CubeViewport.cpp:2287
void contentsToCube(int x, int y, double &sample, double &line) const
Turns contents to a cube.
Definition: CubeViewport.cpp:808
void stretchKnownGlobal()
List<Tool *> p This stretches to the global stretch.
Definition: CubeViewport.cpp:2155
void doneWithData(int, const Isis::Brick *)
Emitted when a brick is no longer needed, should only be sent to cube data thread.
void moveCursor(int x, int y)
Move the cursor by x,y if possible.
Definition: CubeViewport.cpp:1849
void mouseDoubleClick(QPoint)
Emitted when double click happens.
bool confirmClose()
This method should be called during a close event that would cause this viewport to close...
Definition: CubeViewport.cpp:535
Pixel value mapper.
Definition: Stretch.h:72
UniversalGroundMap * universalGroundMap() const
Definition: CubeViewport.h:363
int grayBand() const
Definition: CubeViewport.h:204
void mouseMove(QPoint)
Emitted when the mouse moves.
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:1114
QSize sizeHint() const
Make viewports show up as 512 by 512.
Definition: CubeViewport.cpp:581
void enableProgress()
This restarts the progress bar.
Definition: CubeViewport.cpp:982
virtual void resizeEvent(QResizeEvent *e)
The viewport is being resized.
Definition: CubeViewport.cpp:1033
double bluePixel(int sample, int line)
Gets the blue pixel.
Definition: CubeViewport.cpp:1640
int cubeID()
Definition: CubeViewport.h:490
void mouseEnter()
Emitted when the mouse enters the viewport.
Encapsulation of Cube I/O with Change Notifications.
Definition: CubeDataThread.h:53
Container for cube-like labels.
Definition: Pvl.h:135
QPoint cursorPosition() const
Return the cursor position in the viewport.
Definition: CubeViewport.cpp:1836
virtual void viewGray(int band)
View cube as gray.
Definition: CubeViewport.cpp:1920
void getCubeArea(double &pdStartSample, double &pdEndSample, double &pdStartLine, double &pdEndLine)
Get Cube area corresponding to the viewport's dimension.
Definition: CubeViewport.cpp:1497
void scrollBy(int dx, int dy)
Move the scrollbars by dx/dy screen pixels.
Definition: CubeViewport.cpp:879
~BandInfo()
Deconstructor.
Definition: CubeViewport.cpp:2418
int cubeSamples() const
Return the number of samples in the cube.
Definition: CubeViewport.cpp:443
ViewportBuffer * blueBuffer()
Returns the blue viewport buffer (Will be NULL if in Gray mode.)
Definition: CubeViewport.h:451
Definition: Calculator.h:33
QVector< Stretch *> * p_globalStretches
Global stretches for each stretched band.
Definition: CubeViewport.h:626
void viewportClosed(CubeViewport *)
Emitted when viewport is closed.
void cubeChanged(bool changed)
This method is called when the cube has changed or changes have been finalized.
Definition: CubeViewport.cpp:571
Cube * trackingCube() const
Definition: CubeViewport.h:368
int comboIndex() const
Definition: CubeViewport.h:239
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:2433
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:467
CubeDataThread * cubeDataThread()
Definition: CubeViewport.h:483
int band
The band.
Definition: CubeViewport.h:178
void stretchGreen(const QString &string)
Apply stretch pairs to green bands.
Definition: CubeViewport.cpp:2133
CubeViewport(Cube *cube, CubeDataThread *cdt=0, QWidget *parent=0)
Constructor for the CubeViewport.
Definition: CubeViewport.cpp:70
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
virtual void paintEvent(QPaintEvent *e)
Repaint the viewport.
Definition: CubeViewport.cpp:1099
Projection * projection() const
Definition: CubeViewport.h:353
void setBackground(QColor color)
Sets the background color.
Definition: CubeViewport.h:383
virtual ~CubeViewport()
Deconstructor for the Cubeviewport.
Definition: CubeViewport.cpp:317
const BandInfo & operator=(BandInfo other)
The BandInfo for the Cube.
Definition: CubeViewport.cpp:2438
Definition: CubeViewport.h:157
void setCube(Cube *cube)
This method sets the viewports cube.
Definition: CubeViewport.cpp:436
void setCaption()
Change the caption on the viewport title bar.
Definition: CubeViewport.cpp:995
int redBand() const
Definition: CubeViewport.h:209
virtual void keyPressEvent(QKeyEvent *e)
Process arrow keystrokes on cube.
Definition: CubeViewport.cpp:1761
double fitScaleHeight() const
Determine the scale of cube in heighth to fit in the viewport.
Definition: CubeViewport.cpp:2300
void scrollContentsBy(int dx, int dy)
Scroll the viewport contents by dx/dy screen pixels.
Definition: CubeViewport.cpp:919
bool cubeShown() const
Definition: CubeViewport.h:229
void onProgressTimer()
This updates the progress bar visually.
Definition: CubeViewport.cpp:273
void stretchGray(const QString &string)
Apply stretch pairs to gray band.
Definition: CubeViewport.cpp:2109
ViewportBuffer * greenBuffer()
Returns the green viewport buffer (Will be NULL if in Gray mode.)
Definition: CubeViewport.h:441
void viewportToCube(int x, int y, double &sample, double &line) const
Turns a viewport into a cube.
Definition: CubeViewport.cpp:825
void changeCursor(QCursor cursor)
Allows users to change the cursor type on the viewport.
Definition: CubeViewport.cpp:2394
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:2377
void showEvent(QShowEvent *)
This method is called to initially show the viewport.
Definition: CubeViewport.cpp:243
void mouseButtonRelease(QPoint, Qt::MouseButton)
Emitted when mouse button released.
Stretch blueStretch() const
Return the blue band stretch.
Definition: CubeViewport.cpp:1682
virtual bool eventFilter(QObject *o, QEvent *e)
Event filter to watch for mouse events on viewport.
Definition: CubeViewport.cpp:1696
double scale() const
Definition: CubeViewport.h:224
bool cursorInside() const
Is cursor inside viewport.
Definition: CubeViewport.cpp:1811
IO Handler for Isis Cubes.
Definition: Cube.h:170