Isis Developer Reference
MosaicSceneItem.h
Go to the documentation of this file.
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 
48  Q_OBJECT
49  public:
52 
53  virtual QRectF boundingRect() const;
54  virtual void paint(QPainter *painter,
55  const QStyleOptionGraphicsItem *option,
56  QWidget *widget = 0);
57 
58  QColor color() const;
59  Image *image() { return m_image; }
60  QGraphicsSimpleTextItem *getLabel() const { return m_label; }
61 
62  void reproject();
63  bool contains(const QPointF &) const;
64  void updateSelection(bool);
65 
67  updateChildren();
68  }
69 
70  signals:
71  void colorChanged();
72  void changed(const QList<QRectF> &);
74 
75  public slots:
76  void cubeDisplayChanged();
77 
78  protected:
79  virtual bool sceneEvent(QEvent *event);
80 
81  protected:
82  virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
83 
84  private slots:
85  void lostCubeDisplay();
86  void onCloseCube();
87 
88  private:
90  MosaicSceneItem & operator=(const MosaicSceneItem &);
91 
92  void updateChildren();
93  Stretch *getStretch();
94 
95  MosaicSceneWidget *m_scene;
96 
97  geos::geom::MultiPolygon *m_mp;
98  geos::geom::MultiPolygon *m_180mp;
100  UniversalGroundMap *groundMap;
101 
102  void setupFootprint();
103  void drawImage(QPainter *painter, const QStyleOptionGraphicsItem *option);
104 
105  double getPixelValue(int sample, int line);
106  void setupStretch();
107 
108  Image *m_image;
109  Stretch *m_cubeDnStretch;
110 
111  bool m_showingLabel;
112  bool m_ignoreCubeDisplayChanged;
113 
114  QGraphicsSimpleTextItem *m_label;
115  };
116 };
117 
118 #endif
119 
Isis::ImageDisplayProperties::setSelected
void setSelected(bool)
Change the selected state associated with this cube.
Definition: ImageDisplayProperties.cpp:82
Isis::ImageDisplayProperties::ShowOutline
@ ShowOutline
True if the cube should be outlined (bool)
Definition: ImageDisplayProperties.h:105
Isis::MosaicSceneWidget::getView
MosaicGraphicsView * getView() const
Definition: MosaicSceneWidget.h:162
Stretch.h
Table.h
QWidget
Isis::Stretch::SetMinimum
void SetMinimum(const double value)
Definition: Stretch.h:142
Isis::ImageDisplayProperties::Zooming
@ Zooming
Data ignored. Tells if the cube supports the zoomFit action.
Definition: ImageDisplayProperties.h:107
Isis::UniversalGroundMap
Universal Ground Map.
Definition: UniversalGroundMap.h:69
Isis::PolygonTools::To180
static geos::geom::MultiPolygon * To180(geos::geom::MultiPolygon *poly360)
Convert polygon coordinates from 360 system to 180.
Definition: PolygonTools.cpp:527
Isis::Directory
Definition: Directory.h:271
Isis::MosaicSceneItem::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Re-paints the item.
Definition: MosaicSceneItem.cpp:140
Isis::MosaicSceneWidget::getProjection
Projection * getProjection() const
Definition: MosaicSceneWidget.h:170
MosaicSceneWidget.h
QList< QGraphicsPolygonItem * >
Project.h
Histogram.h
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
geos
Definition: Image.h:43
Isis::Camera::Sample
virtual double Sample() const
Returns the current sample number.
Definition: Camera.cpp:2690
Isis::IException::Unknown
@ Unknown
A type of error that cannot be classified as any of the other error types.
Definition: IException.h:118
Isis::MosaicSceneWidget::blockSelectionChange
bool blockSelectionChange(bool)
Definition: MosaicSceneWidget.cpp:511
Isis::Stretch::SetMaximum
void SetMaximum(const double value)
Definition: Stretch.h:145
Isis::Stretch
Pixel value mapper.
Definition: Stretch.h:58
QMenu
Directory.h
Isis::MosaicSceneItem::cubeDisplayChanged
void cubeDisplayChanged()
Someone changed something in the cube display properties, re-read the whole thing.
Definition: MosaicSceneItem.cpp:423
Isis::Directory::supportedActions
QList< QAction * > supportedActions(DataType data)
Returns a list of supported actions for a WorkOrder.
Definition: Directory.h:345
Isis::MosaicSceneWidget::cubesSelectable
bool cubesSelectable() const
Definition: MosaicSceneWidget.h:188
Isis::MosaicSceneItem::getLabel
QGraphicsSimpleTextItem * getLabel() const
Definition: MosaicSceneItem.h:60
Isis::MosaicSceneItem::mosaicCubeClosed
void mosaicCubeClosed(Image *)
LineManager.h
Isis::ImageList::append
void append(Image *const &value)
Appends an image to the image list.
Definition: ImageList.cpp:153
Isis::MosaicSceneItem::colorChanged
void colorChanged()
Isis::MosaicSceneWidget
This widget encompasses the entire mosaic scene.
Definition: MosaicSceneWidget.h:153
Isis::DisplayProperties
Definition: DisplayProperties.h:34
Isis::DisplayProperties::addSupport
void addSupport(int property)
Call this with every property you support, otherwise they will not communicate properly between widge...
Definition: DisplayProperties.cpp:108
Isis::ImageDisplayProperties::Selected
@ Selected
The selection state of this cube (bool)
Definition: ImageDisplayProperties.h:97
Isis::Stretch::SetHrs
void SetHrs(const double value)
Sets the mapping for HRS pixels.
Definition: Stretch.h:138
Isis::Directory::project
Project * project() const
Gets the Project for this directory.
Definition: Directory.cpp:1311
Image.h
Isis::MosaicSceneItem::contextMenuEvent
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
The user right clicked on us (or otherwise requested a context menu).
Definition: MosaicSceneItem.cpp:556
Isis::MosaicSceneItem::contains
bool contains(const QPointF &) const
Test if we contain the point.
Definition: MosaicSceneItem.cpp:494
Isis::MosaicSceneItem::reproject
void reproject()
Called anytime the user reprojects the cube.
Definition: MosaicSceneItem.cpp:189
Isis::UniversalGroundMap::Camera
Isis::Camera * Camera() const
Return the camera associated with the ground map (NULL implies none)
Definition: UniversalGroundMap.h:136
Isis::ImageDisplayProperties::Property
Property
This is a list of properties and actions that are possible.
Definition: ImageDisplayProperties.h:91
QGraphicsObject
Isis::ImageDisplayProperties::ShowLabel
@ ShowLabel
True if the cube should show its display name (bool)
Definition: ImageDisplayProperties.h:103
Isis::MosaicSceneItem::MosaicSceneItem
MosaicSceneItem(Image *image, MosaicSceneWidget *parent)
MosaicSceneItem constructor.
Definition: MosaicSceneItem.cpp:47
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::MosaicSceneItem::updateSelection
void updateSelection(bool)
Update the selected state.
Definition: MosaicSceneItem.cpp:516
Isis::IsSpecial
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:197
IString.h
Isis::Stretch::SetHis
void SetHis(const double value)
Sets the mapping for HIS pixels.
Definition: Stretch.h:127
Isis::Project
The main project for ipce.
Definition: Project.h:289
Isis::ImageDisplayProperties::ZOrdering
@ ZOrdering
Data ignored. Tells if the cube supports the "move*" actions.
Definition: ImageDisplayProperties.h:109
Isis::ImageList
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:55
Isis::Projection::WorldY
virtual double WorldY() const
This returns the world Y coordinate provided SetGround, SetCoordinate, SetUniversalGround,...
Definition: Projection.cpp:544
Isis::ImageList::supportedActions
QList< QAction * > supportedActions(Project *project=NULL)
Gets a list of pre-connected actions that have to do with display.
Definition: ImageList.cpp:565
Isis::Camera::InCube
bool InCube()
This returns true if the current Sample() or Line() value is outside of the cube (meaning the point m...
Definition: Camera.cpp:2619
Isis::MosaicSceneWidget::directory
Directory * directory() const
Definition: MosaicSceneWidget.cpp:719
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
FileDialog.h
Isis::ImageDisplayProperties::Color
@ Color
The color of the cube, default randomized (QColor)
Definition: ImageDisplayProperties.h:95
geos::geom
Definition: Image.h:44
Isis::MosaicSceneItem::image
Image * image()
Definition: MosaicSceneItem.h:59
Isis::TProjection
Base class for Map TProjections.
Definition: TProjection.h:166
Isis::MosaicSceneItem::color
QColor color() const
Definition: MosaicSceneItem.cpp:413
DisplayProperties.h
Isis::Image::footprint
geos::geom::MultiPolygon * footprint()
Get the footprint of this image (if available).
Definition: Image.cpp:374
Isis::Image::cube
Cube * cube()
Get the Cube pointer associated with this display property.
Definition: Image.cpp:287
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::DisplayProperties::displayName
QString displayName() const
Returns the display name.
Definition: DisplayProperties.cpp:88
Isis::Projection::WorldX
virtual double WorldX() const
This returns the world X coordinate provided SetGround, SetCoordinate, SetUniversalGround,...
Definition: Projection.cpp:524
MosaicGraphicsView.h
ImageList.h
Isis::Image
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::TProjection::Has180Domain
bool Has180Domain() const
This indicates if the longitude domain is -180 to 180 (as opposed to 0 to 360).
Definition: TProjection.cpp:632
TProjection.h
Isis::Null
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
Isis::Image::displayProperties
ImageDisplayProperties * displayProperties()
Get the display (GUI) properties (information) associated with this image.
Definition: Image.cpp:320
Isis::ImageDisplayProperties::ShowDNs
@ ShowDNs
True if the cube should show DN values if possible (bool)
Definition: ImageDisplayProperties.h:99
Isis::UniversalGroundMap::Projection
Isis::Projection * Projection() const
Return the projection associated with the ground map (NULL implies none)
Definition: UniversalGroundMap.h:131
Isis::MosaicSceneItem::changed
void changed(const QList< QRectF > &)
Statistics.h
Isis::Stretch::SetNull
void SetNull(const double value)
Sets the mapping for NULL pixels.
Definition: Stretch.h:94
Isis::TProjection::SetGround
virtual bool SetGround(const double lat, const double lon)
This method is used to set the latitude/longitude (assumed to be of the correct LatitudeType,...
Definition: TProjection.cpp:760
Isis::Cube::pixelType
PixelType pixelType() const
Definition: Cube.cpp:1758
MosaicSceneItem.h
Isis::MosaicSceneItem
A single cube in the mosaic scene.
Definition: MosaicSceneItem.h:47
Isis::ImageDisplayProperties::ShowFill
@ ShowFill
True if the cube should show a fill area if possible (bool)
Definition: ImageDisplayProperties.h:101
Isis::MosaicSceneItem::sceneEvent
virtual bool sceneEvent(QEvent *event)
This filters out events that happen within our polygons.
Definition: MosaicSceneItem.cpp:451
Isis::UniversalGroundMap::SetUniversalGround
bool SetUniversalGround(double lat, double lon)
Returns whether the lat/lon position was set successfully in the camera model or projection.
Definition: UniversalGroundMap.cpp:102
Isis::Camera::Line
virtual double Line() const
Returns the current line number.
Definition: Camera.cpp:2710
PolygonTools.h
QObject
QVector
This is free and unencumbered software released into the public domain.
Definition: Calculator.h:18
Isis::Projection::YCoord
double YCoord() const
This returns the projection Y provided SetGround, SetCoordinate, SetUniversalGround,...
Definition: Projection.cpp:400
Isis::MosaicSceneWidget::userHasTools
bool userHasTools() const
Definition: MosaicSceneWidget.h:195
Isis::DisplayProperties::getValue
QVariant getValue(int property) const
Get a property's associated data.
Definition: DisplayProperties.cpp:147
SerialNumber.h
QAction
QGraphicsItem
Isis::Projection::XCoord
double XCoord() const
This returns the projection X provided SetGround, SetCoordinate, SetUniversalGround,...
Definition: Projection.cpp:387
Isis::MosaicSceneItem::scenePropertiesChanged
void scenePropertiesChanged()
Definition: MosaicSceneItem.h:66
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
ImagePolygon.h
Isis::IException::User
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126
Isis::Projection::SetCoordinate
virtual bool SetCoordinate(const double x, const double y)=0
Isis::MosaicSceneItem::boundingRect
virtual QRectF boundingRect() const
Definition: MosaicSceneItem.cpp:113
Isis::ImageDisplayProperties
This is the GUI communication mechanism for cubes.
Definition: ImageDisplayProperties.h:85
Isis::MosaicSceneItem::~MosaicSceneItem
~MosaicSceneItem()
Mosaic Item destructor.
Definition: MosaicSceneItem.cpp:103