File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
MosaicSceneItem.cpp
1 #include "MosaicSceneItem.h"
2 
3 #include <iostream>
4 #include <cfloat>
5 
6 #include <QApplication>
7 #include <QBrush>
8 #include <QEvent>
9 #include <QGraphicsItem>
10 #include <QGraphicsSceneContextMenuEvent>
11 #include <QList>
12 #include <QMenu>
13 #include <QPainter>
14 #include <QPen>
15 #include <QStyleOptionGraphicsItem>
16 #include <QTreeWidgetItem>
17 
18 #include "Directory.h"
19 #include "DisplayProperties.h"
20 #include "FileDialog.h"
21 #include "Histogram.h"
22 #include "Image.h"
23 #include "ImageList.h"
24 #include "ImagePolygon.h"
25 #include "IString.h"
26 #include "LineManager.h"
27 #include "MosaicGraphicsView.h"
28 #include "MosaicSceneWidget.h"
29 #include "PolygonTools.h"
30 #include "Project.h"
31 #include "SerialNumber.h"
32 #include "Statistics.h"
33 #include "Stretch.h"
34 #include "Table.h"
35 #include "TProjection.h"
36 
37 using namespace geos::geom;
38 
39 namespace Isis {
47  MosaicSceneItem::MosaicSceneItem(Image *image, MosaicSceneWidget *parent) : QGraphicsObject() {
48  if (parent->getProjection() == NULL) {
49  std::string msg = "Parent does not have projection in MosaicWidget";
50  throw IException(IException::User, msg, _FILEINFO_);
51  }
52 
53  m_image = image;
54 
55  connect(m_image, SIGNAL(destroyed(QObject *)),
56  this, SLOT(lostCubeDisplay()));
57  connect(m_image, SIGNAL(destroyed(QObject *)),
58  this, SLOT(deleteLater()));
59 
60  m_mp = NULL;
61  m_polygons = NULL;
62  m_cubeDnStretch = NULL;
63  groundMap = NULL;
64  m_showingLabel = false;
65  m_ignoreCubeDisplayChanged = false;
66 
67  m_scene = parent;
68 
69  m_polygons = new QList< QGraphicsPolygonItem *>();
70 
71  setupFootprint();
72 
73  setToolTip(m_image->displayProperties()->displayName());
74 
75  setAcceptHoverEvents(true);
76 
77  ImageDisplayProperties *displayProp = m_image->displayProperties();
86 
87  if(parent->userHasTools()) {
88  supportToAdd = (ImageDisplayProperties::Property)
89  (supportToAdd | ImageDisplayProperties::Zooming);
90  }
91 
92  displayProp->addSupport(supportToAdd);
93 
94  connect(displayProp, SIGNAL(propertyChanged(DisplayProperties *)),
95  this, SLOT(cubeDisplayChanged()));
96  }
97 
98 
104  if(scene())
105  scene()->removeItem(this);
106 
107  while(m_polygons->size()) {
108  delete m_polygons->takeAt(0);
109  }
110  }
111 
112 
113  QRectF MosaicSceneItem::boundingRect() const {
114  QRectF boundingRect;
115 
116  QGraphicsPolygonItem *polygon;
117  foreach(polygon, *m_polygons) {
118  boundingRect = boundingRect.united(polygon->boundingRect());
119 
120  QGraphicsItem *polyChild;
121  foreach(polyChild, polygon->childItems()) {
122  if(polyChild->isVisible()) {
123  boundingRect = boundingRect.united(
124  mapFromItem(polyChild, polyChild->boundingRect()).boundingRect());
125  }
126  }
127  }
128 
129  return boundingRect;
130  }
131 
132 
140  void MosaicSceneItem::paint(QPainter *painter,
141  const QStyleOptionGraphicsItem *option, QWidget *widget) {
142  if(m_image &&
144  drawImage(painter, option);
145  }
146 
147  // We don't add the polygon items as children because manually painting them is a huge speed
148  // improvement. It cannot be undone due to the amount of speed it gives.
149  if (!childItems().count()) {
150  foreach (QGraphicsPolygonItem *polyItem, *m_polygons) {
151  polyItem->paint(painter, option, widget);
152  }
153  }
154  }
155 
156 
160  void MosaicSceneItem::setupFootprint() {
161  if(m_image) {
162  m_mp = m_image->footprint();
163 
164  if (!m_mp) {
166  tr("Cannot display footprints of images which have no footprints. "
167  "Tried to display [%1]").arg(m_image->displayProperties()->displayName()),
168  _FILEINFO_);
169  }
170 
171  try {
172  reproject();
173  }
174  catch(IException &e) {
175  m_image->deleteLater();
176 
177  IString msg = "Could not project the footprint from cube [" +
178  m_image->displayProperties()->displayName() + "]";
179  throw IException(e, IException::Unknown, msg, _FILEINFO_);
180  }
181  }
182  }
183 
184 
190  prepareGeometryChange();
191 
192  MultiPolygon *mp;
193  TProjection *proj = (TProjection *)m_scene->getProjection();
194 
195  // Remove current polygons from the scene
196  while(m_polygons->size()) {
197  QGraphicsPolygonItem *polyItem = m_polygons->at(0);
198 
199  if (polyItem->scene()) {
200  polyItem->scene()->removeItem(polyItem);
201  }
202  m_polygons->removeAll(polyItem);
203 
204  delete polyItem;
205  polyItem = NULL;
206  }
207 
208  if (proj->Has180Domain()) {
210  mp = m_180mp;
211  }
212  else {
213  mp = m_mp;
214  }
215 
216  m_showingLabel =
218 
219  //----------------------------------------------------------
220  // We need to loop thru the num. geom. because some of the
221  // cubes will have more than one geom. if it crosses lat/lon
222  // boundries.
223  //----------------------------------------------------------
224  bool useFullChildrenHierarchy = (mp->getNumGeometries() > 1) || m_showingLabel;
225 
226  for (unsigned int i = 0; i < mp->getNumGeometries(); i++) {
227  const Geometry *geom = mp->getGeometryN(i);
228  CoordinateSequence *pts;
229 
230  pts = geom->getCoordinates();
231  double lat, lon;
232  QVector<QPointF> polyPoints;
233 
234  //--------------------------------------------------------------
235  // We need to convert the footprint polygons from lat/lon to x/y
236  // in order to display them in the QGraphicsScene
237  //--------------------------------------------------------------
238  for (unsigned int j = 0; j < pts->getSize(); j++) {
239  lat = pts->getY(j);
240  lon = pts->getX(j);
241  if (proj->SetGround(lat, lon)) {
242  double x = proj->XCoord();
243  double y = -1 * (proj->YCoord());
244 
245  polyPoints.push_back(QPointF(x, y));
246  }
247  }
248 
249  setFlag(QGraphicsItem::ItemIsSelectable, true);
250  setFlag(QGraphicsItem::ItemIsFocusable, true);
251 
252  QGraphicsPolygonItem *polyItem = NULL;
253 
254  if (useFullChildrenHierarchy) {
255  polyItem = new QGraphicsPolygonItem(this);
256  }
257  else {
258  polyItem = new QGraphicsPolygonItem;
259  }
260 
261  polyItem->setPolygon(QPolygonF(polyPoints));
262 
263  if (m_showingLabel) {
264  QGraphicsSimpleTextItem *label = NULL;
265 
266  label = new QGraphicsSimpleTextItem(polyItem);
267 
268  if(m_image)
269  label->setText(m_image->displayProperties()->displayName());
270  label->setFlag(QGraphicsItem::ItemIsMovable);
271  label->setFont(QFont("Helvetica", 10));
272  label->setPos(polyItem->polygon().boundingRect().center());
273  label->setFlag(QGraphicsItem::ItemIgnoresTransformations, true);
274 
275  QRectF boundingRect = polyItem->boundingRect();
276  if(boundingRect.width() < boundingRect.height())
277  label->setRotation(90.0);
278  }
279 
280  m_polygons->append(polyItem);
281 
282  delete pts;
283  }
284 
285  updateChildren();
286  }
287 
288 
298  double MosaicSceneItem::getPixelValue(int sample, int line) {
299  double pixelValue = 0;
300 
301  if(m_image) {
302  Brick gryBrick(1, 1, 1, m_image->cube()->pixelType());
303  gryBrick.SetBasePosition((int)(sample + 0.5), (int)(line + 0.5), 1);
304  m_image->cube()->read(gryBrick);
305 
306  pixelValue = gryBrick[0];
307  if (pixelValue == Null) {
308  return Null;
309  }
310  if (pixelValue < 0) pixelValue = 0;
311  if (pixelValue > 255) pixelValue = 255;
312  }
313 
314  return pixelValue;
315  }
316 
317 
323  void MosaicSceneItem::drawImage(QPainter *painter,
324  const QStyleOptionGraphicsItem *option) {
325  Stretch *stretch = getStretch();
326  QApplication::setOverrideCursor(Qt::WaitCursor);
327 
328  try {
329  QGraphicsPolygonItem *polygon;
330  foreach(polygon, *m_polygons) {
331  QPolygonF polyBounding = polygon->polygon();
332  QRectF sceneRect = polyBounding.boundingRect();
333  QPolygon screenPoly = m_scene->getView()->mapFromScene(sceneRect);
334  QRect visibleBox = screenPoly.boundingRect();
335 
336  int bbWidth = (int)visibleBox.width();
337  int bbHeight = (int)visibleBox.height();
338 
339  int bbLeft = visibleBox.left();
340  int bbTop = visibleBox.top();
341  int bbRight = visibleBox.right();
342  int bbBottom = visibleBox.bottom();
343 
344  QImage image(bbWidth, bbHeight, QImage::Format_ARGB32);
345 
346  for (int y = bbTop; y <= bbBottom; y++) {
347  QRgb *lineData = (QRgb *)image.scanLine(y - bbTop);
348 
349  for (int x = bbLeft; x <= bbRight; x++) {
350  lineData[x - bbLeft] = qRgba(0, 0, 0, 0);
351 
352  // We have an x,y in screen space. Let's translate it to
353  // projected space, ask the polygon if it's in the area,
354  QPointF scenePos = m_scene->getView()->mapToScene(
355  QPoint(x, y));
356 
357  if(polygon->polygon().containsPoint(scenePos, Qt::OddEvenFill)) {
358  // This is likely in the cube... use the projection to go to
359  // lat/lon and use that lat/lon to go to cube sample,line
360  m_scene->getProjection()->SetCoordinate(scenePos.x(),
361  -1 * scenePos.y());
362 
363  double lat = ((TProjection *)(m_scene->getProjection()))->UniversalLatitude();
364  double lon = ((TProjection *)(m_scene->getProjection()))->UniversalLongitude();
365 
366  if(m_image) {
367  if(!groundMap) {
368  groundMap = new UniversalGroundMap(*m_image->cube());
369  }
370 
371  if(groundMap->SetUniversalGround(lat, lon)) {
372  double dn = Null;
373 
374  if(groundMap->Camera() && groundMap->Camera()->InCube()) {
375  double samp = groundMap->Camera()->Sample();
376  double line = groundMap->Camera()->Line();
377 
378  dn = getPixelValue((int)(samp + 0.5),
379  (int)(line + 0.5));
380  }
381  else {
382  double samp = groundMap->Projection()->WorldX();
383  double line = groundMap->Projection()->WorldY();
384 
385  dn = getPixelValue((int)(samp + 0.5),
386  (int)(line + 0.5));
387  }
388 
389  if(!IsSpecial(dn)) {
390  int stretched = (int)stretch->Map(dn);
391 
392  lineData[x - bbLeft] = qRgba(stretched, stretched,
393  stretched, 255);
394  }
395  }
396  }
397  }
398  }
399  }
400 
401 // m_lastImages.append(image);
402  painter->drawImage(polygon->boundingRect(), image);
403  }
404  }
405  catch(IException &e) {
406  e.print();
407  }
408 
409  QApplication::restoreOverrideCursor();
410  }
411 
412 
413  QColor MosaicSceneItem::color() const {
414  return
415  m_image->displayProperties()->getValue(ImageDisplayProperties::Color).value<QColor>();
416  }
417 
418 
424  if (!m_ignoreCubeDisplayChanged) {
425  bool wasBlocking = m_scene->blockSelectionChange(true);
426  updateSelection(false);
427  m_scene->blockSelectionChange(wasBlocking);
428 
429  if (m_showingLabel !=
431  // Reproject will create or not create a label item correctly. This is an important speed
432  // improvement - invisible items still cost us time.
433  reproject();
434  }
435  else {
436  updateChildren();
437  }
438  }
439  }
440 
441 
451  bool MosaicSceneItem::sceneEvent(QEvent *event) {
452  // We need to verify this event is really ours
453  QPointF scenePos;
454 
455  switch (event->type()) {
456  case QEvent::GraphicsSceneContextMenu:
457  scenePos = ((QGraphicsSceneContextMenuEvent *)event)->scenePos();
458  break;
459  case QEvent::GraphicsSceneHoverEnter:
460  case QEvent::GraphicsSceneHoverMove:
461  case QEvent::GraphicsSceneHoverLeave:
462  scenePos = ((QGraphicsSceneHoverEvent *)event)->scenePos();
463  break;
464  case QEvent::GraphicsSceneMouseMove:
465  case QEvent::GraphicsSceneMousePress:
466  case QEvent::GraphicsSceneMouseRelease:
467  case QEvent::GraphicsSceneMouseDoubleClick:
468  scenePos = ((QGraphicsSceneMouseEvent *)event)->scenePos();
469  break;
470  default:
471  break;
472  }
473 
474  bool ourEvent = true;
475  if(!scenePos.isNull()) {
476  ourEvent = contains(scenePos);
477  }
478 
479  if(ourEvent) {
480  return QGraphicsObject::sceneEvent(event);
481  }
482  else {
483 // //qDebug()<<"MosaicSceneItem::sceneEvent Ignore event";
484  event->ignore();
485  return true;
486  }
487  }
488 
489 
494  bool MosaicSceneItem::contains(const QPointF &p) const {
495  if(p.isNull())
496  return false;
497 
498  QGraphicsPolygonItem * polygon;
499  foreach(polygon, *m_polygons) {
500  if(polygon->contains(p)) {
501  return true;
502  }
503  }
504 
505  return false;
506  }
507 
508 
517  QGraphicsPolygonItem * polygon;
518 
519  m_ignoreCubeDisplayChanged = true;
520  if (m_image) {
521  bool selected =
523 
524  if(save) {
525  selected = isSelected();
526 
527  // This code only works if the polygons are in the scene.
528  foreach(polygon, *m_polygons) {
529  selected = selected || (polygon->scene() && polygon->isSelected());
530  }
531 
532  m_image->displayProperties()->setSelected(selected);
533  }
534 
535  if(selected != isSelected()) {
536  bool wasBlocking = m_scene->blockSelectionChange(true);
537  setSelected(selected);
538  m_scene->blockSelectionChange(wasBlocking);
539  }
540 
541  foreach(polygon, *m_polygons) {
542  if(polygon->isSelected() != selected) {
543  polygon->setSelected(selected);
544  }
545  }
546  }
547  m_ignoreCubeDisplayChanged = false;
548  }
549 
550 
557  QGraphicsSceneContextMenuEvent *event) {
558 
559  if(m_image) {
560  QMenu menu;
561 
562  QAction *title = menu.addAction(m_image->displayProperties()->displayName());
563  title->setEnabled(false);
564  menu.addSeparator();
565 
566  ImageList images;
567  images.append(m_image);
568 
569  Directory *directory = m_scene->directory();
570  Project *project = directory ? directory->project() : NULL;
571 
572  QList<QAction *> displayActs = images.supportedActions(project);
573 
574  if (directory) {
575  displayActs.append(NULL);
576  displayActs.append(directory->supportedActions(new ImageList(images)));
577  }
578 
579  QAction *displayAct;
580  foreach(displayAct, displayActs) {
581  if (displayAct == NULL) {
582  menu.addSeparator();
583  }
584  else {
585  menu.addAction(displayAct);
586  }
587  }
588 
589  menu.addSeparator();
590  QAction *removeAction = menu.addAction("Close Cube");
591 
592  if (QApplication::applicationName() == "qmos") {
593  connect(removeAction, SIGNAL(triggered()),
594  m_image, SLOT(deleteLater()));
595  }
596  else {
597  connect(removeAction, SIGNAL(triggered()), SLOT(onCloseCube()));
598  }
599 
600  menu.exec(event->screenPos());
601  }
602 
603  }
604 
605 
606  void MosaicSceneItem::lostCubeDisplay() {
607  m_image = NULL;
608  }
609 
610 
615  emit mosaicCubeClosed(m_image);
616  }
617 
618 
625  if (childItems().count()) {
626  setFlag(QGraphicsItem::ItemIsSelectable, false);
627  }
628  else {
629  setFlag(QGraphicsItem::ItemIsSelectable, m_scene->cubesSelectable());
630  }
631 
632  QList<QRectF> regionsChanged;
633 
634  if(m_image) {
635  foreach(QAbstractGraphicsShapeItem *polygon, *m_polygons) {
636  // Fill
637  if (m_image->displayProperties()->getValue(ImageDisplayProperties::ShowFill).toBool()) {
638  polygon->setBrush(color());
639  }
640  else {
641  polygon->setBrush(Qt::NoBrush);
642  }
643 
644  // Outline
645  QColor opaqueColor(color());
646  opaqueColor.setAlpha(255);
648  // Make sure the outline is cosmetic (i.e. is always 1 pixel width on screen)
649  QPen pen(opaqueColor);
650  pen.setCosmetic(true);
651  polygon->setPen(pen);
652  }
653  else {
654  polygon->setPen(Qt::NoPen);
655  }
656 
657  polygon->setFlag(QGraphicsItem::ItemIsSelectable,
658  m_scene->cubesSelectable());
659 
660  // Children (labels are the only children, and there should only be one)
661  foreach(QGraphicsItem *polyChild, polygon->childItems()) {
662  polyChild->setVisible(
664 
665  polyChild->setFlag(QGraphicsItem::ItemIsSelectable,
666  m_scene->cubesSelectable());
667 
668  // Qt documentation was lacking the enum that this matches to, so this
669  // is the best I could do
670  if(polyChild->type() == 9) {
671  QGraphicsSimpleTextItem * text =
672  (QGraphicsSimpleTextItem *)polyChild;
673  text->setBrush(opaqueColor);
674  }
675  }
676  }
677 
678  update();
679  emit changed(regionsChanged);
680  }
681  }
682 
683 
692  if (m_cubeDnStretch != NULL || !m_image) return m_cubeDnStretch;
693 
694  LineManager mgr(*m_image->cube());
695 
696  mgr.begin();
697  Statistics stats;
698 
699  const int skip = 0;
700 
701  while(mgr ++) {
702  m_image->cube()->read(mgr);
703  stats.AddData(mgr.DoubleBuffer(), mgr.size());
704 
705  for(int i = 0; i < skip; i++)
706  mgr ++;
707  }
708 
709  m_cubeDnStretch = new Stretch();
710  m_cubeDnStretch->AddPair(stats.BestMinimum(), 0.0);
711  m_cubeDnStretch->AddPair(stats.BestMaximum(), 255.0);
712 
713  m_cubeDnStretch->SetNull(0.0);
714  m_cubeDnStretch->SetLis(0.0);
715  m_cubeDnStretch->SetLrs(0.0);
716  m_cubeDnStretch->SetHis(255.0);
717  m_cubeDnStretch->SetHrs(255.0);
718  m_cubeDnStretch->SetMinimum(0.0);
719  m_cubeDnStretch->SetMaximum(255.0);
720 
721  return m_cubeDnStretch;
722  }
723 }
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::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
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::LineManager
Buffer manager, for moving through a cube in lines.
Definition: LineManager.h:39
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::IException::print
void print() const
Prints a string representation of this exception to stderr.
Definition: IException.cpp:445
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
QList< QGraphicsPolygonItem * >
Project.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
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::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
QMenu
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::ImageList::append
void append(Image *const &value)
Appends an image to the image list.
Definition: ImageList.cpp:153
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::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
Isis::BufferManager::begin
bool begin()
Moves the shape buffer to the first position.
Definition: BufferManager.h:96
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::MosaicSceneItem::m_mp
geos::geom::MultiPolygon * m_mp
This item's multipolygon in the 0/360 longitude domain.
Definition: MosaicSceneItem.h:97
Isis::MosaicSceneItem::drawImage
void drawImage(QPainter *painter, const QStyleOptionGraphicsItem *option)
This method reads in and draws the image associated with this item.
Definition: MosaicSceneItem.cpp:323
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::MosaicSceneItem::updateChildren
void updateChildren()
This applies the displayProperties and selectability.
Definition: MosaicSceneItem.cpp:624
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::MosaicSceneItem::m_180mp
geos::geom::MultiPolygon * m_180mp
This item's multipolygon in the -180/180 longitude domain.
Definition: MosaicSceneItem.h:98
Isis::ImageDisplayProperties::Color
@ Color
The color of the cube, default randomized (QColor)
Definition: ImageDisplayProperties.h:95
Isis::TProjection
Base class for Map TProjections.
Definition: TProjection.h:166
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::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::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
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::MosaicSceneItem::getStretch
Stretch * getStretch()
This gets a Stretch object that will work for the cubeDisplay converting from DN to screen pixel.
Definition: MosaicSceneItem.cpp:691
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
Isis::MosaicSceneItem::getPixelValue
double getPixelValue(int sample, int line)
Returns the pixel value at the given sample/line.
Definition: MosaicSceneItem.cpp:298
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::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
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
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::Buffer::size
int size() const
Returns the total number of pixels in the shape buffer.
Definition: Buffer.h:97
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
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::MosaicSceneItem::onCloseCube
void onCloseCube()
Emits a signal when Close Cube is selected from the context menu.
Definition: MosaicSceneItem.cpp:614
Isis::DisplayProperties::getValue
QVariant getValue(int property) const
Get a property's associated data.
Definition: DisplayProperties.cpp:147
QAction
QGraphicsItem
Isis::Projection::XCoord
double XCoord() const
This returns the projection X provided SetGround, SetCoordinate, SetUniversalGround,...
Definition: Projection.cpp:387
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
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::ImageDisplayProperties
This is the GUI communication mechanism for cubes.
Definition: ImageDisplayProperties.h:85
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::MosaicSceneItem::~MosaicSceneItem
~MosaicSceneItem()
Mosaic Item destructor.
Definition: MosaicSceneItem.cpp:103

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 USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:16:54