Isis Developer Reference
IndependentCubeViewport.h
Go to the documentation of this file.
1 #ifndef IndependentCubeViewport_h
2 #define IndependentCubeViewport_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 // parent class
13 #include "CubeViewport.h"
14 
15 
16 class QEvent;
17 class QObject;
18 class QPaintEvent;
19 class QPoint;
20 class QRect;
21 class QWidget;
22 
23 
24 template < class T > class QList;
25 
26 namespace Isis
27 {
28  class Brick;
29  class Cube;
30  class CubeDataThread;
31  class ViewportBuffer;
32 
46  {
47  Q_OBJECT
48 
49  public:
51  QWidget * parent = 0);
53 
54  bool eventFilter(QObject * o, QEvent * e);
55  void paintEvent(QPaintEvent * e);
56  void restretch(ViewportBuffer *);
57  virtual void showEvent(QShowEvent * e);
58 
59 
60  public slots:
61  void resetKnownGlobal();
62 
63 
64  protected slots:
65  virtual void cubeDataChanged(int cubeId, const Brick *);
66 
67 
68  signals:
70  void trackingChanged(double sample, double line, double lat, double lon,
71  double dn, IndependentCubeViewport *);
72  void trackingChanged(double samp, double line, double dn,
75 
76 
77 
78  private slots:
79  void handleMouseMove(QPoint);
80  void handleMousePress(QPoint, Qt::MouseButton b);
81  void handleMouseRelease(QPoint);
82  void handleSynchronization(IndependentCubeViewport *);
83 
84 
85  private: // methods
86  QRect bandingRect();
87  void stretch();
88  void track(const QPoint &);
89  void zoom();
90  bool trackBuffer(ViewportBuffer *, const QPoint &, double &);
91 
92 
93  private:
94  bool banding;
95  bool panning;
96  bool stretching;
97  bool zooming;
98  bool leftClick;
99  QPoint * bandingPoint1;
100  QPoint * bandingPoint2;
101  QPoint * panningPrevPoint;
102  };
103 }
104 
105 #endif
Isis::CubeViewport::cubeLines
int cubeLines() const
Return the number of lines in the cube.
Definition: CubeViewport.cpp:439
Isis::ViewportBuffer
Reads and stores visible DN values.
Definition: ViewportBuffer.h:63
Stretch.h
QWidget
Isis::Statistics
This class is used to accumulate statistics on double arrays.
Definition: Statistics.h:94
Isis::Statistics::AddData
void AddData(const double *data, const unsigned int count)
Add an array of doubles to the accumulators and counters.
Definition: Statistics.cpp:141
Isis::Buffer::SampleDimension
int SampleDimension() const
Returns the number of samples in the shape buffer.
Definition: Buffer.h:70
Isis::IndependentCubeViewport::resetKnownGlobal
void resetKnownGlobal()
Definition: IndependentCubeViewport.cpp:169
Isis::Histogram::Percent
double Percent(const double percent) const
Computes and returns the value at X percent of the histogram.
Definition: Histogram.cpp:351
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::StretchTool::stretchBuffer
static Stretch stretchBuffer(ViewportBuffer *buffer, QRect rect)
This method computes the stretch over a region using the viewport buffer.
Definition: StretchTool.cpp:1388
Isis::Camera::SetImage
virtual bool SetImage(const double sample, const double line)
Sets the sample/line values of the image to get the lat/lon values.
Definition: Camera.cpp:154
CubeStretch.h
Isis::IndependentCubeViewport::paintEvent
void paintEvent(QPaintEvent *e)
Repaint the viewport.
Definition: IndependentCubeViewport.cpp:133
Isis::CubeViewport::center
void center(int x, int y)
Bring the cube pixel under viewport x/y to the center.
Definition: CubeViewport.cpp:730
Isis::Buffer::DoubleBuffer
double * DoubleBuffer() const
Returns the value of the shape buffer.
Definition: Buffer.h:138
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::p_pixmap
QPixmap p_pixmap
The qpixmap.
Definition: CubeViewport.h:610
Isis::Statistics::Maximum
double Maximum() const
Returns the absolute maximum double found in all data passed through the AddData method.
Definition: Statistics.cpp:403
Isis::CubeViewport::mouseLeave
void mouseLeave()
Emitted when the mouse leaves the viewport.
Isis::IndependentCubeViewport::restretch
void restretch(ViewportBuffer *)
This is called by internal viewport buffers when a stretch action should be performed.
Definition: IndependentCubeViewport.cpp:152
Isis::Projection::projectionType
ProjectionType projectionType() const
Returns an enum value for the projection type.
Definition: Projection.cpp:198
Isis::Stretch::Pairs
int Pairs() const
Returns the number of stretch pairs.
Definition: Stretch.h:162
Isis::CubeStretch
Stores stretch information for a cube.
Definition: CubeStretch.h:27
Isis::IndependentCubeViewport::trackingChanged
void trackingChanged(double sample, double line, double lat, double lon, double dn, IndependentCubeViewport *)
Isis::Statistics::ValidPixels
BigInt ValidPixels() const
Returns the total number of valid pixels processed.
Definition: Statistics.cpp:433
Isis::StretchTool::stretchBand
static Stretch stretchBand(CubeViewport *cvp, StretchBand band)
This method computes the stretch over the entire cube.
Definition: StretchTool.cpp:1418
Isis::Brick
Buffer for containing a three dimensional section of an image.
Definition: Brick.h:45
Isis::CubeDataThread
Encapsulation of Cube I/O with Change Notifications.
Definition: CubeDataThread.h:59
Isis::CubeViewport::camera
Camera * camera() const
Definition: CubeViewport.h:348
CubeViewport.h
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::grayBand
int grayBand() const
Definition: CubeViewport.h:194
Isis::Sensor::UniversalLongitude
virtual double UniversalLongitude() const
Returns the positive east, 0-360 domain longitude, in degrees, at the surface intersection point in t...
Definition: Sensor.cpp:233
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::IndependentCubeViewport::eventFilter
bool eventFilter(QObject *o, QEvent *e)
Event filter to watch for mouse events on viewport.
Definition: IndependentCubeViewport.cpp:77
Isis::IndependentCubeViewport::trackingChanged
void trackingChanged(double samp, double line, double dn, IndependentCubeViewport *)
Isis::Histogram::AddData
virtual void AddData(const double *data, const unsigned int count)
Add an array of doubles to the histogram counters.
Definition: Histogram.cpp:232
Isis::Statistics::Minimum
double Minimum() const
Returns the absolute minimum double found in all data passed through the AddData method.
Definition: Statistics.cpp:382
Isis::IndependentCubeViewport
General purpose Cube display widget.
Definition: IndependentCubeViewport.h:46
Isis::StretchTool::Gray
@ Gray
Gray Band.
Definition: StretchTool.h:97
Isis::Buffer::LineDimension
int LineDimension() const
Returns the number of lines in the shape buffer.
Definition: Buffer.h:79
Isis::Stretch::AddPair
void AddPair(const double input, const double output)
Adds a stretch pair to the list of pairs.
Definition: Stretch.cpp:48
Isis::Stretch::ClearPairs
void ClearPairs()
Clears the stretch pairs.
Definition: Stretch.h:170
Isis::Statistics::BestMaximum
double BestMaximum(const double percent=99.5) const
This method returns the better of the absolute maximum or the Chebyshev maximum.
Definition: Statistics.cpp:625
Isis::IndependentCubeViewport::IndependentCubeViewport
IndependentCubeViewport(Cube *cube, CubeDataThread *cdt=0, QWidget *parent=0)
Definition: IndependentCubeViewport.cpp:35
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
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::IndependentCubeViewport::cantTrack
void cantTrack(QString, IndependentCubeViewport *)
Isis::Projection::SetWorld
virtual bool SetWorld(const double x, const double y)
This method is used to set a world coordinate.
Definition: Projection.cpp:497
TProjection.h
Camera.h
Isis::CubeViewport::scrollBy
void scrollBy(int dx, int dy)
Move the scrollbars by dx/dy screen pixels.
Definition: CubeViewport.cpp:869
Isis::Buffer::Band
int Band(const int index=0) const
Returns the band position associated with a shape buffer index.
Definition: Buffer.cpp:162
Isis::IndependentCubeViewport::synchronize
void synchronize(IndependentCubeViewport *)
Isis::CubeViewport::cubeID
int cubeID()
Definition: CubeViewport.h:480
std
Namespace for the standard library.
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::Histogram
Container of a cube histogram.
Definition: Histogram.h:74
Isis::Statistics::BestMinimum
double BestMinimum(const double percent=99.5) const
This method returns the better of the absolute minimum or the Chebyshev minimum.
Definition: Statistics.cpp:598
RingPlaneProjection.h
Isis::CubeViewport::p_globalStretches
QVector< Stretch * > * p_globalStretches
Global stretches for each stretched band.
Definition: CubeViewport.h:616
ViewportBuffer.h
IndependentCubeViewport.h
Isis::Buffer::size
int size() const
Returns the total number of pixels in the shape buffer.
Definition: Buffer.h:97
Isis::CubeViewport::scale
double scale() const
Definition: CubeViewport.h:214
Projection.h
Isis::Projection::Triaxial
@ Triaxial
These projections are used to map triaxial and irregular-shaped bodies.
Definition: Projection.h:166
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
QObject
Isis::CubeViewport::grayBuffer
ViewportBuffer * grayBuffer()
Returns the gray viewport buffer (Will be NULL if in RGB mode.)
Definition: CubeViewport.h:411
Isis::IndependentCubeViewport::~IndependentCubeViewport
~IndependentCubeViewport()
Definition: IndependentCubeViewport.cpp:55
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::IndependentCubeViewport::cubeDataChanged
virtual void cubeDataChanged(int cubeId, const Brick *)
Definition: IndependentCubeViewport.cpp:181
Isis::CubeViewport::showEvent
void showEvent(QShowEvent *)
This method is called to initially show the viewport.
Definition: CubeViewport.cpp:233
Isis::CubeViewport::cube
Cube * cube() const
Definition: CubeViewport.h:338
Isis::Projection::ProjectionType
ProjectionType
This enum defines the subclasses of Projection supported in Isis.
Definition: Projection.h:166
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::IndependentCubeViewport::showEvent
virtual void showEvent(QShowEvent *e)
Definition: IndependentCubeViewport.cpp:160
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::Buffer::BandDimension
int BandDimension() const
Returns the number of bands in the shape buffer.
Definition: Buffer.h:88
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::CubeViewport::projection
Projection * projection() const
Definition: CubeViewport.h:343
Isis::Sensor::UniversalLatitude
virtual double UniversalLatitude() const
Returns the planetocentric latitude, in degrees, at the surface intersection point in the body fixed ...
Definition: Sensor.cpp:210