![]()  | 
  
    Isis 3 Programmer Reference
    
   | 
 
A single cube in the mosaic scene. More...
#include <MosaicSceneItem.h>


Public Slots | |
| void | cubeDisplayChanged () | 
| Someone changed something in the cube display properties, re-read the whole thing.  More... | |
Signals | |
| void | colorChanged () | 
| void | changed (const QList< QRectF > &) | 
| void | mosaicCubeClosed (Image *) | 
Public Member Functions | |
| MosaicSceneItem (Image *image, MosaicSceneWidget *parent) | |
| MosaicSceneItem constructor.  More... | |
| ~MosaicSceneItem () | |
| Mosaic Item destructor.  More... | |
| virtual QRectF | boundingRect () const | 
| virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) | 
| Re-paints the item.  More... | |
| QColor | color () const | 
| Image * | image () | 
| QGraphicsSimpleTextItem * | getLabel () const | 
| void | reproject () | 
| Called anytime the user reprojects the cube.  More... | |
| bool | contains (const QPointF &) const | 
| Test if we contain the point.  More... | |
| void | updateSelection (bool) | 
| Update the selected state.  More... | |
| void | scenePropertiesChanged () | 
Protected Member Functions | |
| virtual bool | sceneEvent (QEvent *event) | 
| This filters out events that happen within our polygons.  More... | |
| virtual void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) | 
| The user right clicked on us (or otherwise requested a context menu).  More... | |
Private Slots | |
| void | lostCubeDisplay () | 
| void | onCloseCube () | 
| Emits a signal when Close Cube is selected from the context menu.  More... | |
Private Member Functions | |
| MosaicSceneItem (const MosaicSceneItem &) | |
| cannot copy  More... | |
| MosaicSceneItem & | operator= (const MosaicSceneItem &) | 
| cannot assign  More... | |
| void | updateChildren () | 
| This applies the displayProperties and selectability.  More... | |
| Stretch * | getStretch () | 
| This gets a Stretch object that will work for the cubeDisplay converting from DN to screen pixel.  More... | |
| void | setupFootprint () | 
| void | drawImage (QPainter *painter, const QStyleOptionGraphicsItem *option) | 
| This method reads in and draws the image associated with this item.  More... | |
| double | getPixelValue (int sample, int line) | 
| Returns the pixel value at the given sample/line.  More... | |
| void | setupStretch () | 
Private Attributes | |
| MosaicSceneWidget * | m_scene | 
| geos::geom::MultiPolygon * | m_mp | 
| This item's multipolygon in the 0/360 longitude domain.  More... | |
| geos::geom::MultiPolygon * | m_180mp | 
| This item's multipolygon in the -180/180 longitude domain.  More... | |
| QList< QGraphicsPolygonItem * > * | m_polygons | 
| UniversalGroundMap * | groundMap | 
| Image * | m_image | 
| Stretch * | m_cubeDnStretch | 
| bool | m_showingLabel | 
| bool | m_ignoreCubeDisplayChanged | 
| QGraphicsSimpleTextItem * | m_label | 
A single cube in the mosaic scene.
Definition at line 47 of file MosaicSceneItem.h.
| Isis::MosaicSceneItem::MosaicSceneItem | ( | Image * | image, | 
| MosaicSceneWidget * | parent | ||
| ) | 
MosaicSceneItem constructor.
| cubeFileName | |
| parent | 
Definition at line 47 of file MosaicSceneItem.cpp.
References Isis::DisplayProperties::addSupport(), Isis::ImageDisplayProperties::Color, cubeDisplayChanged(), Isis::DisplayProperties::displayName(), Isis::Image::displayProperties(), m_mp, Isis::ImageDisplayProperties::Selected, Isis::ImageDisplayProperties::ShowDNs, Isis::ImageDisplayProperties::ShowFill, Isis::ImageDisplayProperties::ShowLabel, Isis::ImageDisplayProperties::ShowOutline, Isis::IException::User, Isis::ImageDisplayProperties::Zooming, and Isis::ImageDisplayProperties::ZOrdering.
| Isis::MosaicSceneItem::~MosaicSceneItem | ( | ) | 
Mosaic Item destructor.
Definition at line 103 of file MosaicSceneItem.cpp.
      
  | 
  private | 
cannot copy
| bool Isis::MosaicSceneItem::contains | ( | const QPointF & | p | ) | const | 
Test if we contain the point.
Even though our rect is empty, return true if a child polygon contains it for toolTips and other events.
Definition at line 494 of file MosaicSceneItem.cpp.
Referenced by sceneEvent().
      
  | 
  protectedvirtual | 
The user right clicked on us (or otherwise requested a context menu).
Give it to them.
Definition at line 556 of file MosaicSceneItem.cpp.
References Isis::ImageList::append(), Isis::DisplayProperties::displayName(), Isis::Image::displayProperties(), onCloseCube(), Isis::Directory::project(), Isis::Directory::supportedActions(), and Isis::ImageList::supportedActions().
      
  | 
  slot | 
Someone changed something in the cube display properties, re-read the whole thing.
Definition at line 423 of file MosaicSceneItem.cpp.
References Isis::Image::displayProperties(), Isis::DisplayProperties::getValue(), reproject(), Isis::ImageDisplayProperties::ShowLabel, updateChildren(), and updateSelection().
Referenced by MosaicSceneItem().
      
  | 
  private | 
This method reads in and draws the image associated with this item.
| painter | 
Definition at line 323 of file MosaicSceneItem.cpp.
References Isis::UniversalGroundMap::Camera(), Isis::Image::cube(), getPixelValue(), getStretch(), Isis::Camera::InCube(), Isis::IsSpecial(), Isis::Camera::Line(), Isis::Stretch::Map(), Isis::Null, Isis::IException::print(), Isis::UniversalGroundMap::Projection(), Isis::Camera::Sample(), Isis::UniversalGroundMap::SetUniversalGround(), Isis::Projection::WorldX(), and Isis::Projection::WorldY().
Referenced by paint().
      
  | 
  private | 
Returns the pixel value at the given sample/line.
| sample | |
| line | 
Definition at line 298 of file MosaicSceneItem.cpp.
References Isis::Image::cube(), Isis::Null, Isis::Cube::pixelType(), Isis::Cube::read(), and Isis::Brick::SetBasePosition().
Referenced by drawImage().
      
  | 
  private | 
This gets a Stretch object that will work for the cubeDisplay converting from DN to screen pixel.
The first time this is called the stretch is calculated, later calls re-use the original object. Ownership remains at the class scope.
Definition at line 691 of file MosaicSceneItem.cpp.
References Isis::Statistics::AddData(), Isis::Stretch::AddPair(), Isis::BufferManager::begin(), Isis::Statistics::BestMaximum(), Isis::Statistics::BestMinimum(), Isis::Image::cube(), Isis::Buffer::DoubleBuffer(), Isis::Cube::read(), Isis::Stretch::SetHis(), Isis::Stretch::SetHrs(), Isis::Stretch::SetLis(), Isis::Stretch::SetLrs(), Isis::Stretch::SetNull(), and Isis::Buffer::size().
Referenced by drawImage().
      
  | 
  privateslot | 
Emits a signal when Close Cube is selected from the context menu.
Definition at line 614 of file MosaicSceneItem.cpp.
Referenced by contextMenuEvent().
      
  | 
  private | 
cannot assign
      
  | 
  virtual | 
Re-paints the item.
| painter | |
| option | |
| widget | 
Definition at line 140 of file MosaicSceneItem.cpp.
References Isis::Image::displayProperties(), drawImage(), Isis::DisplayProperties::getValue(), and Isis::ImageDisplayProperties::ShowDNs.
| void Isis::MosaicSceneItem::reproject | ( | ) | 
Called anytime the user reprojects the cube.
(Selects a new map file.) And everytime a mosaic item is created.
Definition at line 189 of file MosaicSceneItem.cpp.
References Isis::DisplayProperties::displayName(), Isis::Image::displayProperties(), Isis::DisplayProperties::getValue(), Isis::TProjection::Has180Domain(), m_180mp, m_mp, Isis::TProjection::SetGround(), Isis::ImageDisplayProperties::ShowLabel, Isis::PolygonTools::To180(), updateChildren(), Isis::Projection::XCoord(), and Isis::Projection::YCoord().
Referenced by cubeDisplayChanged(), and Isis::MosaicSceneWidget::reprojectItems().
      
  | 
  protectedvirtual | 
This filters out events that happen within our polygons.
This is necessary because usually events are filtered based on the bounding box alone.
| watched | |
| event | 
Definition at line 451 of file MosaicSceneItem.cpp.
References contains().
      
  | 
  private | 
This applies the displayProperties and selectability.
It's called updateChildren because the child items are the visually displayed items on the scene.
Definition at line 624 of file MosaicSceneItem.cpp.
References Isis::Image::displayProperties(), Isis::DisplayProperties::getValue(), Isis::ImageDisplayProperties::ShowFill, Isis::ImageDisplayProperties::ShowLabel, and Isis::ImageDisplayProperties::ShowOutline.
Referenced by cubeDisplayChanged(), and reproject().
| void Isis::MosaicSceneItem::updateSelection | ( | bool | save | ) | 
Update the selected state.
| save | True if we need to write to the DisplayProperties, false if we need to read from them. | 
Definition at line 516 of file MosaicSceneItem.cpp.
References Isis::Image::displayProperties(), Isis::DisplayProperties::getValue(), Isis::ImageDisplayProperties::Selected, and Isis::ImageDisplayProperties::setSelected().
Referenced by cubeDisplayChanged().
      
  | 
  private | 
This item's multipolygon in the -180/180 longitude domain.
Definition at line 98 of file MosaicSceneItem.h.
Referenced by reproject().
      
  | 
  private | 
This item's multipolygon in the 0/360 longitude domain.
Definition at line 97 of file MosaicSceneItem.h.
Referenced by MosaicSceneItem(), and reproject().