Isis Developer Reference
CubeViewport.h
Go to the documentation of this file.
1 #ifndef CubeViewport_h
2 #define CubeViewport_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 
13 // parent of this class
14 #include <QAbstractScrollArea>
15 
16 class QPaintEvent;
17 
18 namespace Isis {
19  class Brick;
20  class Camera;
21  class Cube;
22  class CubeDataThread;
23  class Projection;
24  class Pvl;
25  class PvlKeyword;
26  class CubeStretch;
27  class Stretch;
28  class Tool;
29  class UniversalGroundMap;
30 
31  class ViewportBuffer;
32 
123  Q_OBJECT
124 
125  public:
134  CubeViewport(Cube *cube, CubeDataThread * cdt = 0, QWidget *parent = 0);
135 
139  virtual ~CubeViewport();
140 
141 
147  class BandInfo {
148  public:
149  BandInfo();
151  BandInfo(const BandInfo &other);
153  ~BandInfo();
154 
161  const BandInfo &operator=(BandInfo other);
162 
164  CubeStretch getStretch() const;
166  void setStretch(const Stretch &newStretch);
168  int band;
169  private:
171  CubeStretch *stretch;
172  };
173 
175  void setCube(Cube *cube);
177  int cubeSamples() const;
179  int cubeLines() const;
181  int cubeBands() const;
182 
184  bool isColor() const {
185  return p_color;
186  };
187 
189  bool isGray() const {
190  return !p_color;
191  };
192 
194  int grayBand() const {
195  return p_gray.band;
196  };
197 
199  int redBand() const {
200  return p_red.band;
201  };
202 
204  int greenBand() const {
205  return p_green.band;
206  };
207 
209  int blueBand() const {
210  return p_blue.band;
211  };
212 
214  double scale() const {
215  return p_scale;
216  };
217 
219  bool cubeShown() const {
220  return p_cubeShown;
221  };
222 
224  int comboCount() const {
225  return p_comboCount;
226  };
227 
229  int comboIndex() const {
230  return p_comboIndex;
231  }
232 
238  void cubeContentsChanged(QRect rect);
239 
241  double fitScale() const;
243  double fitScaleWidth() const;
245  double fitScaleHeight() const;
246 
255  void viewportToCube(int x, int y,
256  double &sample, double &line) const;
257 
266  void cubeToViewport(double sample, double line,
267  int &x, int &y) const;
276  void contentsToCube(int x, int y,
277  double &sample, double &line) const;
286  void cubeToContents(double sample, double line,
287  int &x, int &y) const;
288 
297  double redPixel(int sample, int line);
298 
307  double greenPixel(int sample, int line);
308 
317  double bluePixel(int sample, int line);
318 
327  double grayPixel(int sample, int line);
329  CubeStretch grayStretch() const;
331  CubeStretch redStretch() const;
333  CubeStretch greenStretch() const;
335  CubeStretch blueStretch() const;
336 
338  Cube *cube() const {
339  return p_cube;
340  };
341 
344  return p_projection;
345  };
346 
348  Camera *camera() const {
349  return p_camera;
350  };
351 
354  return p_groundMap;
355  };
356 
358  Cube *trackingCube() const {
359  return p_trackingCube;
360  };
361 
362  void moveCursor(int x, int y);
363  bool cursorInside() const;
364  QPoint cursorPosition() const;
365  void setCursorPosition(int x, int y);
366  void setCaption();
367 
373  void setBackground(QColor color) {
374  p_bgColor = color;
375  }
376 
382  void setComboCount(int count) {
383  p_comboCount = count;
384  }
385 
391  void setComboIndex(int index) {
392  p_comboIndex = index;
393  }
394 
401  QPixmap pixmap() {
402  return p_pixmap;
403  }
404 
412  return p_grayBuffer;
413  }
414 
422  return p_redBuffer;
423  }
424 
432  return p_greenBuffer;
433  }
434 
442  return p_blueBuffer;
443  }
444 
445  void bufferUpdated(QRect rect);
446 
454  virtual void restretch(ViewportBuffer *buffer) = 0;
455  void paintPixmap();
456 
460  void forgetStretches();
461 
467  void setAllBandStretches(Stretch stretch);
468 
469 
474  return p_cubeData;
475  }
476 
480  int cubeID() {
481  return p_cubeId;
482  }
483 
484 
490  void getAllWhatsThisInfo(Pvl & pWhatsThisPvl);
491 
498  void getBandFilterName(PvlKeyword & pFilterNameKey);
499 
508  void getCubeArea(double & pdStartSample, double & pdEndSample,
509  double & pdStartLine, double & pdEndLine);
510 
511  bool confirmClose();
512 
513  void setTrackingCube();
514 
515  signals:
518  void mouseEnter();
519  void mouseMove(QPoint);
520  void mouseMove(QPoint, Qt::MouseButton);
521  void mouseLeave();
522  void mouseButtonPress(QPoint, Qt::MouseButton);
523  void mouseButtonRelease(QPoint, Qt::MouseButton);
524  void mouseDoubleClick(QPoint);
526  void scaleChanged();
530 
534  void progressChanged(int);
539 
544  void doneWithData(int, const Isis::Brick *);
545 
546 
547  public slots:
548  QSize sizeHint() const;
549  void setScale(double scale);
550  void setScale(double scale, double sample, double line);
551  void setScale(double scale, int x, int y);
552  void center(int x, int y);
553  void center(double sample, double line);
554 
555  virtual void viewRGB(int redBand, int greenBand, int blueBand);
556  virtual void viewGray(int band);
557 
558  void stretchGray(const QString &string);
559  void stretchRed(const QString &string);
560  void stretchGreen(const QString &string);
561  void stretchBlue(const QString &string);
562 
563  void stretchGray(const Stretch &stretch);
564  void stretchRed(const Stretch &stretch);
565  void stretchGreen(const Stretch &stretch);
566  void stretchBlue(const Stretch &stretch);
567 
568  void stretchKnownGlobal();
569 
570  void cubeChanged(bool changed);
571  void showEvent(QShowEvent *);
572 
573  void scrollBy(int dx, int dy);
574 
575  void changeCursor(QCursor cursor);
576 
577  void onProgressTimer();
578  void enableProgress();
579 
580 
581  protected:
582  void scrollContentsBy(int dx, int dy);
583  virtual void resizeEvent(QResizeEvent *e);
584  virtual bool eventFilter(QObject *o, QEvent *e);
585  virtual void keyPressEvent(QKeyEvent *e);
586  virtual void paintEvent(QPaintEvent *e);
587 
588 
589 
590  protected slots:
591  virtual void cubeDataChanged(int cubeId, const Isis::Brick *);
592 
593 
594  private:
595 
596  void paintPixmap(QRect rect);
597  void shiftPixmap(int dx, int dy);
598 
599  void updateScrollBars(int x, int y);
600  void paintPixmapRects();
601 
602  //void computeStretch(Brick *brick, int band,
603  // int ssamp, int esamp,
604  // int sline, int eline, int linerate,
605  // Stretch &stretch);
606 
607 
608 
609  protected: // data
610  QPixmap p_pixmap;
611 
614 
617 
618 
619  private: // data
620  ViewportBuffer *p_grayBuffer;
621  ViewportBuffer *p_redBuffer;
622  ViewportBuffer *p_greenBuffer;
623  ViewportBuffer *p_blueBuffer;
624 
625  QColor p_bgColor;
626 
627  Cube *p_cube;
628  Camera *p_camera;
629  Projection *p_projection;
630  UniversalGroundMap *p_groundMap;
631  Cube *p_trackingCube; //<! The tracking cube associated with p_cube
632 
634  QTimer *p_progressTimer;
635 
636  double p_scale;
637 
638  bool p_color;
639  BandInfo p_gray;
640  BandInfo p_red;
641  BandInfo p_green;
642  BandInfo p_blue;
643 
644  int p_comboCount;
645  int p_comboIndex;
646 
647  Brick *p_redBrick;
648  Brick *p_grnBrick;
649  Brick *p_bluBrick;
650  Brick *p_gryBrick;
651  Brick *p_pntBrick;
652  bool p_saveEnabled;
653  bool p_cubeShown;
654  QImage *p_image;
655  bool p_paintPixmap;
656  bool p_updatingBuffers;
657 
658  QString p_whatsThisText;
659  QString p_cubeWhatsThisText;
660  QString p_viewportWhatsThisText;
661  void updateWhatsThis();
662 
664  QList< QRect * > *p_pixmapPaintRects;
665 
666  CubeDataThread *p_cubeData;
667  int p_cubeId;
668 
673  bool p_thisOwnsCubeData;
674  };
675 }
676 
677 #endif
Isis::CubeViewport::cubeLines
int cubeLines() const
Return the number of lines in the cube.
Definition: CubeViewport.cpp:439
Isis::Brick::SetBasePosition
void SetBasePosition(const int start_sample, const int start_line, const int start_band)
This method is used to set the base position of the shape buffer.
Definition: Brick.h:120
Isis::Camera::SetBand
virtual void SetBand(const int band)
Virtual method that sets the band number.
Definition: Camera.cpp:2680
Isis::CubeViewport::setCaption
void setCaption()
Change the caption on the viewport title bar.
Definition: CubeViewport.cpp:985
Isis::CubeViewport::scaleChanged
void scaleChanged()
Emitted when zoom factor changed just before the repaint event.
QAbstractScrollArea
Isis::CubeViewport::keyPressEvent
virtual void keyPressEvent(QKeyEvent *e)
Process arrow keystrokes on cube.
Definition: CubeViewport.cpp:1759
Isis::CubeViewport::scrollContentsBy
void scrollContentsBy(int dx, int dy)
Scroll the viewport contents by dx/dy screen pixels.
Definition: CubeViewport.cpp:909
FileName.h
Isis::ViewportBuffer
Reads and stores visible DN values.
Definition: ViewportBuffer.h:63
Stretch.h
QWidget
Isis::CubeViewport::redBuffer
ViewportBuffer * redBuffer()
Returns the red viewport buffer (Will be NULL if in Gray mode.)
Definition: CubeViewport.h:421
Isis::CubeViewport::setAllBandStretches
void setAllBandStretches(Stretch stretch)
Sets a stretch for all bands.
Definition: CubeViewport.cpp:1983
Isis::PvlObject::findGroup
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
Isis::Cube::fileName
virtual QString fileName() const
Returns the opened cube's filename.
Definition: Cube.cpp:1563
Isis::Stretch::SetMinimum
void SetMinimum(const double value)
Definition: Stretch.h:142
Isis::Buffer::SampleDimension
int SampleDimension() const
Returns the number of samples in the shape buffer.
Definition: Buffer.h:70
Isis::ViewportBuffer::getLine
const std::vector< double > & getLine(int line)
Retrieves a line from the buffer.
Definition: ViewportBuffer.cpp:342
Isis::CubeViewport::BandInfo::band
int band
The band.
Definition: CubeViewport.h:168
Isis::UniversalGroundMap
Universal Ground Map.
Definition: UniversalGroundMap.h:69
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::CubeViewport::viewportUpdated
void viewportUpdated()
Emitted when viewport updated.
Isis::ViewportBuffer::resizedViewport
void resizedViewport()
Call this when the viewport is resized (not zoomed).
Definition: ViewportBuffer.cpp:901
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
Isis::CubeViewport::cubeContentsChanged
void cubeContentsChanged(QRect rect)
Calle dhwen the contents of the cube changes.
Definition: CubeViewport.cpp:2312
QList< QRect * >
Isis::CubeViewport::eventFilter
virtual bool eventFilter(QObject *o, QEvent *e)
Event filter to watch for mouse events on viewport.
Definition: CubeViewport.cpp:1694
Isis::Cube::group
PvlGroup & group(const QString &group) const
Read a group from the cube into a Label.
Definition: Cube.cpp:1991
Isis::CubeViewport::fitScale
double fitScale() const
Determine the scale that causes the full cube to fit in the viewport.
Definition: CubeViewport.cpp:2270
Isis::CubeViewport::saveChanges
void saveChanges(CubeViewport *)
Emitted when changes should be saved.
Histogram.h
Isis::CubeViewport::getAllWhatsThisInfo
void getAllWhatsThisInfo(Pvl &pWhatsThisPvl)
Get All WhatsThis info - viewport, cube, area in PVL format.
Definition: CubeViewport.cpp:1372
Isis::Stretch::SetLis
void SetLis(const double value)
Sets the mapping for LIS pixels.
Definition: Stretch.h:105
Isis::Cube::read
void read(Blob &blob, const std::vector< PvlKeyword > keywords=std::vector< PvlKeyword >()) const
This method will read data from the specified Blob object.
Definition: Cube.cpp:807
Isis::CubeViewport::p_knownStretches
QVector< Stretch * > * p_knownStretches
Stretches for each previously stretched band.
Definition: CubeViewport.h:613
Isis::CubeViewport::setComboCount
void setComboCount(int count)
Sets the band bin combo box count.
Definition: CubeViewport.h:382
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::CubeViewport::isGray
bool isGray() const
Definition: CubeViewport.h:189
CubeStretch.h
Isis::CubeViewport::center
void center(int x, int y)
Bring the cube pixel under viewport x/y to the center.
Definition: CubeViewport.cpp:730
PvlGroup.h
Isis::Stretch::SetMaximum
void SetMaximum(const double value)
Definition: Stretch.h:145
Isis::Stretch
Pixel value mapper.
Definition: Stretch.h:58
Isis::CubeViewport::setScale
void setScale(double scale)
Change the scale of the cube to the given parameter value.
Definition: CubeViewport.cpp:588
Isis::CubeViewport::BandInfo::~BandInfo
~BandInfo()
Deconstructor.
Definition: CubeViewport.cpp:2416
Isis::CubeViewport::isColor
bool isColor() const
Definition: CubeViewport.h:184
Isis::CubeViewport::p_pixmap
QPixmap p_pixmap
The qpixmap.
Definition: CubeViewport.h:610
Isis::CubeViewport::setCursorPosition
void setCursorPosition(int x, int y)
Set the cursor position to x/y in the viewport.
Definition: CubeViewport.cpp:1874
Isis::CubeViewport::pixmap
QPixmap pixmap()
Returns the pixmap.
Definition: CubeViewport.h:401
Isis::CubeViewport::BandInfo::getStretch
CubeStretch getStretch() const
Definition: CubeViewport.cpp:2424
Isis::Cube::physicalBand
virtual int physicalBand(const int &virtualBand) const
This method will return the physical band number given a virtual band number.
Definition: Cube.cpp:1773
Isis::PvlObject::hasGroup
bool hasGroup(const QString &name) const
Returns a boolean value based on whether the object has the specified group or not.
Definition: PvlObject.h:210
Isis::CubeViewport::mouseLeave
void mouseLeave()
Emitted when the mouse leaves the viewport.
Isis::CubeViewport::grayPixel
double grayPixel(int sample, int line)
Gets the gray pixel.
Definition: CubeViewport.cpp:1654
Isis::PvlContainer::hasKeyword
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Definition: PvlContainer.cpp:159
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::CubeViewport::forgetStretches
void forgetStretches()
Resets all remembered stretches.
Definition: CubeViewport.cpp:1973
Tool.h
Isis::Stretch::SetHrs
void SetHrs(const double value)
Sets the mapping for HRS pixels.
Definition: Stretch.h:138
Isis::Stretch::Pairs
int Pairs() const
Returns the number of stretch pairs.
Definition: Stretch.h:162
CubeDataThread.h
Isis::CubeStretch
Stores stretch information for a cube.
Definition: CubeStretch.h:27
Isis::UniversalGroundMap::Camera
Isis::Camera * Camera() const
Return the camera associated with the ground map (NULL implies none)
Definition: UniversalGroundMap.h:136
Isis::ViewportBuffer::setBand
void setBand(int band)
Sets the band to read from, the buffer will be re-read if the band changes.
Definition: ViewportBuffer.cpp:1319
Isis::CubeViewport::contentsToCube
void contentsToCube(int x, int y, double &sample, double &line) const
Turns contents to a cube.
Definition: CubeViewport.cpp:798
Isis::CubeViewport::greenStretch
CubeStretch greenStretch() const
Return the green band stretch.
Definition: CubeViewport.cpp:1674
Isis::ViewportBuffer::getBand
int getBand()
Return the band associated with this viewport buffer.
Definition: ViewportBuffer.h:88
Isis::CubeViewport::BandInfo::BandInfo
BandInfo()
Definition: CubeViewport.cpp:2397
Isis::CubeViewport::moveCursor
void moveCursor(int x, int y)
Move the cursor by x,y if possible.
Definition: CubeViewport.cpp:1847
Isis::CubeViewport::discardChanges
void discardChanges(CubeViewport *)
Emitted when changes should be discarded.
Isis::Camera
Definition: Camera.h:236
Isis::CubeViewport::viewRGB
virtual void viewRGB(int redBand, int greenBand, int blueBand)
View cube as color.
Definition: CubeViewport.cpp:2002
Isis::CubeViewport::cubeToContents
void cubeToContents(double sample, double line, int &x, int &y) const
Turns a cube into contents.
Definition: CubeViewport.cpp:835
Isis::Brick
Buffer for containing a three dimensional section of an image.
Definition: Brick.h:45
Isis::Stretch::SetLrs
void SetLrs(const double value)
Sets the mapping for LRS pixels.
Definition: Stretch.h:116
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::CubeViewport::universalGroundMap
UniversalGroundMap * universalGroundMap() const
Definition: CubeViewport.h:353
Isis::CubeViewport::getBandFilterName
void getBandFilterName(PvlKeyword &pFilterNameKey)
Get Band Filter name from the Isis cube label.
Definition: CubeViewport.cpp:1474
IString.h
Isis::Stretch::SetHis
void SetHis(const double value)
Sets the mapping for HIS pixels.
Definition: Stretch.h:127
Isis::CubeDataThread
Encapsulation of Cube I/O with Change Notifications.
Definition: CubeDataThread.h:59
Isis::CubeViewport::camera
Camera * camera() const
Definition: CubeViewport.h:348
Isis::CubeDataThread::FindCubeId
int FindCubeId(const Cube *) const
Given a Cube pointer, return the cube ID associated with it.
Definition: CubeDataThread.cpp:351
CubeViewport.h
Isis::CubeViewport::blueBand
int blueBand() const
Definition: CubeViewport.h:209
Isis::CubeViewport::redStretch
CubeStretch redStretch() const
Return the red band stretch.
Definition: CubeViewport.cpp:1668
Isis::CubeDataThread::AddChangeListener
void AddChangeListener()
You must call this method after connecting to the BrickChanged signal, otherwise you are not guarante...
Definition: CubeDataThread.cpp:230
Isis::CubeViewport::comboCount
int comboCount() const
Definition: CubeViewport.h:224
Isis::CubeViewport::fitScaleWidth
double fitScaleWidth() const
Determine the scale of cube in the width to fit in the viewport.
Definition: CubeViewport.cpp:2285
Isis::CubeViewport::stretchKnownGlobal
void stretchKnownGlobal()
List<Tool *> p This stretches to the global stretch.
Definition: CubeViewport.cpp:2153
Isis::CubeViewport::mouseEnter
void mouseEnter()
Emitted when the mouse enters the viewport.
Isis::CubeViewport::paintPixmap
void paintPixmap()
Paint the whole pixmap.
Definition: CubeViewport.cpp:1129
Isis::ViewportBuffer::enabled
bool enabled()
Returns whether the buffer is enabled (reading data) or not.
Definition: ViewportBuffer.h:105
Isis::CubeViewport::mouseDoubleClick
void mouseDoubleClick(QPoint)
Emitted when double click happens.
Isis::CubeViewport::blueStretch
CubeStretch blueStretch() const
Return the blue band stretch.
Definition: CubeViewport.cpp:1680
Isis::CubeViewport::cubeToViewport
void cubeToViewport(double sample, double line, int &x, int &y) const
Turns a cube into a viewport.
Definition: CubeViewport.cpp:852
Isis::CubeViewport::mouseButtonPress
void mouseButtonPress(QPoint, Qt::MouseButton)
Emitted when mouse button pressed.
Isis::ViewportBuffer::currentProgress
double currentProgress()
Returns the viewport buffer's loading progress.
Definition: ViewportBuffer.cpp:633
Isis::CubeDataThread::AddCube
int AddCube(const FileName &fileName, bool mustOpenReadWrite=false)
This method is designed to be callable from any thread before data is requested, though no known side...
Definition: CubeDataThread.cpp:125
Isis::CubeViewport::BandInfo
Definition: CubeViewport.h:147
Isis::CubeViewport::BandInfo::setStretch
void setStretch(const Stretch &newStretch)
Definition: CubeViewport.cpp:2431
Isis::CubeViewport::BandInfo::operator=
const BandInfo & operator=(BandInfo other)
The BandInfo for the Cube.
Definition: CubeViewport.cpp:2436
Isis::CubeViewport::grayBand
int grayBand() const
Definition: CubeViewport.h:194
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Pvl.h
Isis::Cube::lineCount
int lineCount() const
Definition: Cube.cpp:1734
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::CubeViewport::resizeEvent
virtual void resizeEvent(QResizeEvent *e)
The viewport is being resized.
Definition: CubeViewport.cpp:1023
Isis::CubeViewport::enableProgress
void enableProgress()
This restarts the progress bar.
Definition: CubeViewport.cpp:972
Isis::CubeViewport::screenPixelsChanged
void screenPixelsChanged()
Emitted when cube pixels that should be on the screen change.
Isis::CubeViewport::grayStretch
CubeStretch grayStretch() const
Return the gray band stretch.
Definition: CubeViewport.cpp:1662
Isis::Stretch::CopyPairs
void CopyPairs(const Stretch &other)
Copies the stretch pairs from another Stretch object, but maintains special pixel values.
Definition: Stretch.cpp:392
Isis::Cube::hasGroup
bool hasGroup(const QString &group) const
Return if the cube has a specified group in the labels.
Definition: Cube.cpp:2004
Isis::Stretch::Parse
void Parse(const QString &pairs)
Parses a string of the form "i1:o1 i2:o2...iN:oN" where each i:o represents an input:output pair.
Definition: Stretch.cpp:181
Isis::CubeViewport::redPixel
double redPixel(int sample, int line)
Gets the red pixel.
Definition: CubeViewport.cpp:1606
Isis::CubeViewport::greenPixel
double greenPixel(int sample, int line)
Gets the green pixel.
Definition: CubeViewport.cpp:1622
Isis::CubeViewport::confirmClose
bool confirmClose()
This method should be called during a close event that would cause this viewport to close.
Definition: CubeViewport.cpp:525
Isis::CubeViewport::setComboIndex
void setComboIndex(int index)
Sets the band bin combo box index.
Definition: CubeViewport.h:391
Isis::CubeViewport::windowTitleChanged
void windowTitleChanged()
Emitted when window title changes.
Isis::Buffer::LineDimension
int LineDimension() const
Returns the number of lines in the shape buffer.
Definition: Buffer.h:79
Isis::CubeViewport::trackingCube
Cube * trackingCube() const
Definition: CubeViewport.h:358
Isis::CubeViewport::mouseMove
void mouseMove(QPoint)
Emitted when the mouse moves.
Isis::PvlObject::findObject
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Definition: PvlObject.h:274
Isis::CubeViewport::restretch
virtual void restretch(ViewportBuffer *buffer)=0
This is called by internal viewport buffers when a stretch action should be performed.
Isis::Cube::sampleCount
int sampleCount() const
Definition: Cube.cpp:1807
Isis::CubeViewport::getCubeArea
void getCubeArea(double &pdStartSample, double &pdEndSample, double &pdStartLine, double &pdEndLine)
Get Cube area corresponding to the viewport's dimension.
Definition: CubeViewport.cpp:1495
Isis::CubeViewport::sizeHint
QSize sizeHint() const
Make viewports show up as 512 by 512.
Definition: CubeViewport.cpp:571
Isis::CubeViewport::bufferUpdated
void bufferUpdated(QRect rect)
This method is called by ViewportBuffer upon successful completion of all operations and gives the ap...
Definition: CubeViewport.cpp:1104
Isis::Cube::isOpen
bool isOpen() const
Test if a cube file has been opened/created.
Definition: Cube.cpp:183
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::CubeViewport::cubeDataThread
CubeDataThread * cubeDataThread()
Definition: CubeViewport.h:473
Isis::CubeViewport::doneWithData
void doneWithData(int, const Isis::Brick *)
Emitted when a brick is no longer needed, should only be sent to cube data thread.
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::CubeViewport
Widget to display Isis cubes for qt apps.
Definition: CubeViewport.h:122
Isis::CubeViewport::cubeSamples
int cubeSamples() const
Return the number of samples in the cube.
Definition: CubeViewport.cpp:433
Isis::Cube::bandCount
virtual int bandCount() const
Returns the number of virtual bands for the cube.
Definition: Cube.cpp:1410
UniversalGroundMap.h
Isis::ViewportBuffer::bufferXYRect
QRect bufferXYRect()
Returns a rect, in screen pixels, of the area this buffer covers.
Definition: ViewportBuffer.cpp:1257
Camera.h
Isis::CubeViewport::cursorPosition
QPoint cursorPosition() const
Return the cursor position in the viewport.
Definition: CubeViewport.cpp:1834
Isis::UniversalGroundMap::Projection
Isis::Projection * Projection() const
Return the projection associated with the ground map (NULL implies none)
Definition: UniversalGroundMap.h:131
Isis::CubeViewport::scrollBy
void scrollBy(int dx, int dy)
Move the scrollbars by dx/dy screen pixels.
Definition: CubeViewport.cpp:869
Brick.h
IException.h
Isis::Stretch::SetNull
void SetNull(const double value)
Sets the mapping for NULL pixels.
Definition: Stretch.h:94
Isis::CubeViewport::bluePixel
double bluePixel(int sample, int line)
Gets the blue pixel.
Definition: CubeViewport.cpp:1638
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::CubeViewport::cubeID
int cubeID()
Definition: CubeViewport.h:480
Isis::CubeDataThread::RemoveChangeListener
void RemoveChangeListener()
You must call this method after disconnecting from the BrickChanged signal, otherwise bricks cannot b...
Definition: CubeDataThread.cpp:238
std
Namespace for the standard library.
Isis::CubeViewport::changeCursor
void changeCursor(QCursor cursor)
Allows users to change the cursor type on the viewport.
Definition: CubeViewport.cpp:2392
Isis::CubeViewport::stretchGreen
void stretchGreen(const QString &string)
Apply stretch pairs to green bands.
Definition: CubeViewport.cpp:2131
Isis::CubeViewport::mouseMove
void mouseMove(QPoint, Qt::MouseButton)
Emitted when the mouse moves.
Isis::CubeViewport::blueBuffer
ViewportBuffer * blueBuffer()
Returns the blue viewport buffer (Will be NULL if in Gray mode.)
Definition: CubeViewport.h:441
Isis::ViewportBuffer::addStretchAction
void addStretchAction()
When all current operations finish the cube viewport will be asked to do a stretch if you call this.
Definition: ViewportBuffer.cpp:1220
Isis::Cube::pixelType
PixelType pixelType() const
Definition: Cube.cpp:1758
Isis::ViewportBuffer::scaleChanged
void scaleChanged()
Call this when zoomed, re-reads visible area.
Definition: ViewportBuffer.cpp:1281
Isis::CubeViewport::viewportClosed
void viewportClosed(CubeViewport *)
Emitted when viewport is closed.
Isis::CubeViewport::p_globalStretches
QVector< Stretch * > * p_globalStretches
Global stretches for each stretched band.
Definition: CubeViewport.h:616
Isis::CubeViewport::setTrackingCube
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:2375
Isis::Cube::label
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Definition: Cube.cpp:1701
ViewportBuffer.h
Isis::ViewportBuffer::enable
void enable(bool enabled)
This turns on or off reading from the cube.
Definition: ViewportBuffer.cpp:1302
Isis::CubeViewport::~CubeViewport
virtual ~CubeViewport()
Deconstructor for the Cubeviewport.
Definition: CubeViewport.cpp:307
Isis::CubeViewport::cubeChanged
void cubeChanged(bool changed)
This method is called when the cube has changed or changes have been finalized.
Definition: CubeViewport.cpp:561
PvlKeyword.h
Isis::ViewportBuffer::pan
void pan(int deltaX, int deltaY)
Call this when the viewport is panned.
Definition: ViewportBuffer.cpp:1048
Isis::CubeViewport::setCube
void setCube(Cube *cube)
This method sets the viewports cube.
Definition: CubeViewport.cpp:426
Isis::CubeViewport::mouseButtonRelease
void mouseButtonRelease(QPoint, Qt::MouseButton)
Emitted when mouse button released.
Isis::PvlKeyword::size
int size() const
Returns the number of values stored in this keyword.
Definition: PvlKeyword.h:125
Isis::CubeViewport::viewGray
virtual void viewGray(int band)
View cube as gray.
Definition: CubeViewport.cpp:1918
Isis::CubeViewport::comboIndex
int comboIndex() const
Definition: CubeViewport.h:229
Isis::CubeViewport::fitScaleHeight
double fitScaleHeight() const
Determine the scale of cube in heighth to fit in the viewport.
Definition: CubeViewport.cpp:2298
PvlObject.h
Isis::CubeViewport::scale
double scale() const
Definition: CubeViewport.h:214
Isis::CubeViewport::onProgressTimer
void onProgressTimer()
This updates the progress bar visually.
Definition: CubeViewport.cpp:263
Isis::CubeViewport::viewportToCube
void viewportToCube(int x, int y, double &sample, double &line) const
Turns a viewport into a cube.
Definition: CubeViewport.cpp:815
Isis::CubeViewport::paintEvent
virtual void paintEvent(QPaintEvent *e)
Repaint the viewport.
Definition: CubeViewport.cpp:1089
StretchTool.h
Isis::PvlContainer::findKeyword
PvlKeyword & findKeyword(const QString &name)
Find a keyword with a specified name.
Definition: PvlContainer.cpp:62
Isis::CubeViewport::CubeViewport
CubeViewport(Cube *cube, CubeDataThread *cdt=0, QWidget *parent=0)
Constructor for the CubeViewport.
Definition: CubeViewport.cpp:60
QObject
QVector
This is free and unencumbered software released into the public domain.
Definition: Calculator.h:18
Isis::CubeViewport::grayBuffer
ViewportBuffer * grayBuffer()
Returns the gray viewport buffer (Will be NULL if in RGB mode.)
Definition: CubeViewport.h:411
Isis::CubeViewport::progressChanged
void progressChanged(int)
Emitted with current progress (0 to 100) when working.
Isis::Buffer::Sample
int Sample(const int index=0) const
Returns the sample position associated with a shape buffer index.
Definition: Buffer.cpp:127
Isis::Projection
Base class for Map Projections.
Definition: Projection.h:155
Isis::CubeViewport::showEvent
void showEvent(QShowEvent *)
This method is called to initially show the viewport.
Definition: CubeViewport.cpp:233
IsisDebug.h
Isis::ViewportBuffer::fillBuffer
void fillBuffer(QRect rect)
This method will convert the rect to sample/line positions and read from the cube into the buffer.
Definition: ViewportBuffer.cpp:114
Isis::CubeViewport::cube
Cube * cube() const
Definition: CubeViewport.h:338
Isis::Camera::HasProjection
bool HasProjection()
Checks to see if the camera object has a projection.
Definition: Camera.cpp:2638
Isis::CubeViewport::redBand
int redBand() const
Definition: CubeViewport.h:199
Isis::CubeViewport::cursorInside
bool cursorInside() const
Is cursor inside viewport.
Definition: CubeViewport.cpp:1809
Isis::Cube::projection
Projection * projection()
Definition: Cube.cpp:1794
Isis::Buffer::Line
int Line(const int index=0) const
Returns the line position associated with a shape buffer index.
Definition: Buffer.cpp:145
Isis::CubeViewport::cubeDataChanged
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:457
Isis::CubeViewport::cubeShown
bool cubeShown() const
Definition: CubeViewport.h:219
Isis::CubeViewport::cubeBands
int cubeBands() const
Return the number of bands in the cube.
Definition: CubeViewport.cpp:445
Isis::CubeViewport::stretchGray
void stretchGray(const QString &string)
Apply stretch pairs to gray band.
Definition: CubeViewport.cpp:2107
Isis::FileName::path
QString path() const
Returns the path of the file name.
Definition: FileName.cpp:103
Isis::CubeViewport::stretchBlue
void stretchBlue(const QString &string)
Apply stretch pairs to blue bands.
Definition: CubeViewport.cpp:2143
Isis::CubeViewport::greenBuffer
ViewportBuffer * greenBuffer()
Returns the green viewport buffer (Will be NULL if in Gray mode.)
Definition: CubeViewport.h:431
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::CubeViewport::greenBand
int greenBand() const
Definition: CubeViewport.h:204
Isis::CubeViewport::setBackground
void setBackground(QColor color)
Sets the background color.
Definition: CubeViewport.h:373
Isis::CubeViewport::projection
Projection * projection() const
Definition: CubeViewport.h:343
Isis::CubeViewport::progressComplete
void progressComplete()
Emitted when the current progress is complete (100)
ASSERT_PTR
#define ASSERT_PTR(x)
Definition: IsisDebug.h:111
Isis::ViewportBuffer::working
bool working()
This tests if queued actions exist in the viewport buffer.
Definition: ViewportBuffer.cpp:759
Isis::Stretch::Map
double Map(const double value) const
Maps an input value to an output value based on the stretch pairs and/or special pixel mappings.
Definition: Stretch.cpp:69
Isis::CubeViewport::stretchRed
void stretchRed(const QString &string)
Apply stretch pairs to red bands.
Definition: CubeViewport.cpp:2119