Isis 3.0 Programmer Reference
Back | Home
MosaicSceneItem.h
1 #ifndef MosaicItem_H
2 #define MosaicItem_H
3 
4 #include <QAbstractGraphicsShapeItem>
5 
6 class QGraphicsPolygonItem;
7 
8 namespace geos {
9  namespace geom {
10  class MultiPolygon;
11  }
12 }
13 
14 namespace Isis {
15  class Camera;
16  class Image;
17  class MosaicSceneWidget;
18  class Projection;
19  class PvlGroup;
20  class Stretch;
21  class UniversalGroundMap;
22 
46  Q_OBJECT
47  public:
48  MosaicSceneItem(Image *image, MosaicSceneWidget *parent);
50 
51  virtual QRectF boundingRect() const;
52  virtual void paint(QPainter *painter,
53  const QStyleOptionGraphicsItem *option,
54  QWidget *widget = 0);
55 
56  QColor color() const;
57  Image *image() { return m_image; }
58  QGraphicsSimpleTextItem *getLabel() const { return m_label; }
59 
60  void reproject();
61  bool contains(const QPointF &) const;
62  void updateSelection(bool);
63 
64  void scenePropertiesChanged() {
66  }
67 
68  signals:
69  void colorChanged();
70  void changed(const QList<QRectF> &);
71 
72  public slots:
73  void cubeDisplayChanged();
74 
75  protected:
76  virtual bool sceneEvent(QEvent *event);
77 
78  protected:
79  virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
80 
81  private slots:
82  void lostCubeDisplay();
83 
84  private:
87 
88  void updateChildren();
90 
91  MosaicSceneWidget *m_scene;
92 
93  geos::geom::MultiPolygon *m_mp;
94  geos::geom::MultiPolygon *m_180mp;
96  UniversalGroundMap *groundMap;
97 
98  void setupFootprint();
99  void drawImage(QPainter *painter, const QStyleOptionGraphicsItem *option);
100 
101  double getPixelValue(int sample, int line);
102  void setupStretch();
103 
104  Image *m_image;
105  Stretch *m_cubeDnStretch;
106 
107  bool m_showingLabel;
108  bool m_ignoreCubeDisplayChanged;
109 
110  QGraphicsSimpleTextItem *m_label;
111  };
112 };
113 
114 #endif
115 
MosaicSceneItem(Image *image, MosaicSceneWidget *parent)
MosaicSceneItem constructor.
void updateSelection(bool)
Update the selected state.
void reproject()
Called anytime the user reprojects the cube.
geos::geom::MultiPolygon * m_180mp
This item&#39;s multipolygon in the -180/180 longitude domain.
Universal Ground Map.
geos::geom::MultiPolygon * m_mp
This item&#39;s multipolygon in the 0/360 longitude domain.
This widget encompasses the entire mosaic scene.
void drawImage(QPainter *painter, const QStyleOptionGraphicsItem *option)
This method reads in and draws the image associated with this item.
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
The user right clicked on us (or otherwise requested a context menu).
Pixel value mapper.
Definition: Stretch.h:72
This represents a cube in a project-based GUI interface.
Definition: Image.h:91
bool contains(const QPointF &) const
Test if we contain the point.
MosaicSceneItem & operator=(const MosaicSceneItem &)
cannot assign
virtual bool sceneEvent(QEvent *event)
This filters out events that happen within our polygons.
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Re-paints the item.
Stretch * getStretch()
This gets a Stretch object that will work for the cubeDisplay converting from DN to screen pixel...
~MosaicSceneItem()
Mosaic Item destructor.
double getPixelValue(int sample, int line)
Returns the pixel value at the given sample/line.
void updateChildren()
This applies the displayProperties and selectability.
void cubeDisplayChanged()
Someone changed something in the cube display properties, re-read the whole thing.
A single cube in the mosaic scene.

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:24:04