Isis 3 Programmer Reference
ScatterPlotWindow.cpp
1#include "ScatterPlotWindow.h"
2
3#include <QMenuBar>
4#include <QVector>
5
6#include <qwt_color_map.h>
7#include <qwt_interval.h>
8#include <qwt_plot.h>
9#include <qwt_plot_layout.h>
10#include <qwt_plot_panner.h>
11#include <qwt_plot_spectrogram.h>
12#include <qwt_plot_zoomer.h>
13#include <qwt_scale_draw.h>
14#include <qwt_scale_widget.h>
15#include <qwt_text.h>
16
17#include "Histogram.h"
18#include "MdiCubeViewport.h"
19#include "Portal.h"
20#include "ScatterPlotAlarmConfigDialog.h"
21#include "ScatterPlotData.h"
22#include "ScatterPlotTool.h"
23#include "ViewportBuffer.h"
24#include "ViewportMainWindow.h"
25#include "Workspace.h"
26
27using namespace std;
28
29namespace Isis {
46 Cube *xAxisCube, int xAxisBand, int xAxisBinCount,
47 Cube *yAxisCube, int yAxisBand, int yAxisBinCount,
48 QwtInterval sampleRange, QwtInterval lineRange,
49 QWidget *parent) :
50 PlotWindow("Scatter Plot", PlotCurve::CubeDN, PlotCurve::CubeDN, parent,
52 AllMenuOptions &
53 ~BackgroundSwitchMenuOption &
54 ~ShowTableMenuOption &
55 ~ClearPlotMenuOption &
56 ~ShowHideMarkersMenuOption &
57 ~ShowHideCurvesMenuOption &
58 ~ConfigurePlotMenuOption)) {
59 m_xAxisCube = xAxisCube;
60 m_yAxisCube = yAxisCube;
61 m_xAxisCubeBand = xAxisBand;
62 m_yAxisCubeBand = yAxisBand;
63
64 m_sampleRange = sampleRange;
65 m_lineRange = lineRange;
66
71
73 xAxisCube, xAxisBand, xAxisBinCount,
74 yAxisCube, yAxisBand, yAxisBinCount,
75 sampleRange, lineRange);
76
77 m_spectrogram = new QwtPlotSpectrogram;
78
79 m_spectrogram->setData(data);
80 m_spectrogram->setTitle("Scatter Plot Counts");
81 m_spectrogram->attach(plot());
82
84 zoomer()->zoom(0);
85 plot()->setAxisScale(QwtPlot::xBottom, data->xCubeMin(), data->xCubeMax());
86 plot()->setAxisScale(QwtPlot::yLeft, data->yCubeMin(), data->yCubeMax());
87 zoomer()->setZoomBase();
88 replot();
89
90 QwtScaleWidget *rightAxis = plot()->axisWidget(QwtPlot::yRight);
91 rightAxis->setTitle("Counts");
92 rightAxis->setColorBarEnabled(true);
93// rightAxis->setColorMap(m_spectrogram->data()->interval(Qt::ZAxis),
94// m_spectrogram->colorMap());
95
96 plot()->setAxisScale(QwtPlot::yRight,
97 m_spectrogram->data()->interval(Qt::ZAxis).minValue(),
98 m_spectrogram->data()->interval(Qt::ZAxis).maxValue());
99 plot()->enableAxis(QwtPlot::yRight);
100
101 plot()->setAxisTitle(QwtPlot::xBottom,
102 QFileInfo(xAxisCube->fileName()).baseName() + " Band " +
103 QString::number(xAxisBand) + " " +
104 plot()->axisTitle(QwtPlot::xBottom).text());
105 plot()->setAxisTitle(QwtPlot::yLeft,
106 QFileInfo(yAxisCube->fileName()).baseName() + " Band " +
107 QString::number(yAxisBand) + " " +
108 plot()->axisTitle(QwtPlot::yLeft).text());
109
110 QList<double> contourLevels;
111 QwtInterval range = m_spectrogram->data()->interval(Qt::ZAxis);
112
113 for (double level = range.minValue();
114 level < range.maxValue();
115 level += ((range.maxValue() - range.minValue()) / 6.0)) {
116 contourLevels += level;
117 }
118
119 m_spectrogram->setContourLevels(contourLevels);
120
121 m_colorize = new QAction(this);
122 m_colorize->setText("Colorize");
123 m_colorize->setIcon(QPixmap(FileName("$ISISROOT/appdata/images/icons/rgb.png").expanded()));
124 connect(m_colorize, SIGNAL(triggered()),
125 this, SLOT(colorPlot()));
126
127 m_contour = new QAction(this);
128 m_contour->setText("Hide Contour Lines");
129 m_contour->setIcon(
130 QPixmap(FileName("$ISISROOT/appdata/images/icons/scatterplotcontour.png").expanded()));
131 connect(m_contour, SIGNAL(triggered()),
132 this, SLOT(showHideContour()));
133
134 QAction *configureAlarmingAct = new QAction(this);
135 configureAlarmingAct->setText("Change Alarming");
136 configureAlarmingAct->setIcon(
137 QPixmap(FileName("$ISISROOT/appdata/images/icons/scatterplotalarming.png").expanded()));
138 connect(configureAlarmingAct, SIGNAL(triggered()),
139 this, SLOT(configureAlarming()));
140
141 foreach (QAction *menuAction, menuBar()->actions()) {
142 if (menuAction->text() == "&Options") {
143 QMenu *optsMenu = qobject_cast<QMenu *>(menuAction->parentWidget());
144 optsMenu->addAction(m_colorize);
145 optsMenu->addAction(m_contour);
146 optsMenu->addAction(configureAlarmingAct);
147 }
148 }
149
150 colorPlot();
152
153 plot()->canvas()->installEventFilter(this);
154 plot()->canvas()->setMouseTracking(true);
155
156 replot();
157
158 QString instanceName = windowTitle();
159 FileName config("$HOME/.Isis/qview/" + instanceName + ".config");
160 QSettings settings(config.expanded(),
161 QSettings::NativeFormat);
162 m_alarmPlot = settings.value("alarmOntoPlot", true).toBool();
163 m_alarmViewport = settings.value("alarmOntoViewport", true).toBool();
164
165 m_alarmPlotSamples = settings.value("alarmPlotSamples", 25).toInt();
166 m_alarmPlotLines = settings.value("alarmPlotLines", 25).toInt();
167
168 m_alarmViewportUnits = (AlarmRangeUnits)settings.value("alarmViewportUnits",
169 ScreenUnits).toInt();
170
172 settings.value("alarmViewportScreenWidth", 5).toInt();
174 settings.value("alarmViewportScreenHeight", 5).toInt();
175
177 settings.value("alarmViewportXDnBoxSize", 1.0).toDouble();
179 settings.value("alarmViewportYDnBoxSize", 1.0).toDouble();
180 }
181
182
183 ScatterPlotWindow::~ScatterPlotWindow() {
184 QString instanceName = windowTitle();
185 FileName config("$HOME/.Isis/qview/" + instanceName + ".config");
186 QSettings settings(config.expanded(),
187 QSettings::NativeFormat);
188 settings.setValue("alarmOntoPlot", m_alarmPlot);
189 settings.setValue("alarmOntoViewport", m_alarmViewport);
190
191 settings.setValue("alarmPlotSamples", m_alarmPlotSamples);
192 settings.setValue("alarmPlotLines", m_alarmPlotLines);
193
194 settings.setValue("alarmViewportUnits", (int)m_alarmViewportUnits);
195
196 settings.setValue("alarmViewportScreenWidth", m_alarmViewportScreenWidth);
197 settings.setValue("alarmViewportScreenHeight", m_alarmViewportScreenHeight);
198
199 settings.setValue("alarmViewportXDnBoxSize", m_alarmViewportXDnBoxSize);
200 settings.setValue("alarmViewportYDnBoxSize", m_alarmViewportYDnBoxSize);
201 }
202
203
210 return m_alarmPlot;
211 }
212
213
220 return m_alarmViewport;
221 }
222
223
229 QPair<int, int> ScatterPlotWindow::alarmPlotBoxSize() const {
230 return QPair<int, int>(m_alarmPlotSamples, m_alarmPlotLines);
231 }
232
233
244
245
256 return QPair<int, int>(m_alarmViewportScreenWidth,
258 }
259
260
271 QPair<double, double> ScatterPlotWindow::alarmViewportDnBoxSize() const {
272 return QPair<double, double>(m_alarmViewportXDnBoxSize,
274 }
275
276
286 if (o == plot()->canvas()) {
287 switch (e->type()) {
288 case QEvent::MouseMove: {
289 if (((QMouseEvent *)e)->buttons() == Qt::NoButton)
290 mouseMoveEvent((QMouseEvent *)e);
291 break;
292 }
293 case QEvent::Leave: {
294 mouseLeaveEvent((QMouseEvent *)e);
295 break;
296 }
297 default:
298 break;
299 }
300
301 return false;
302 }
303 else {
304 return PlotWindow::eventFilter(o, e);
305 }
306 }
307
308
317 void ScatterPlotWindow::paint(MdiCubeViewport *vp, QPainter *painter) {
318 PlotWindow::paint(vp, painter);
319
320 // Do alarming from plot onto viewport
321 if (alarmingViewport() &&
326 painter->setPen(QPen(Qt::red));
327
328 ViewportBuffer *buffer = vp->grayBuffer();
329
330 if ((isXCube(vp) || isYCube(vp)) && buffer && !buffer->working()) {
331 int numLines = buffer->bufferXYRect().height();
332
333 QScopedPointer<Portal> portal;
334
335 // We are going to read DNs from the cube that isn't in the passed in
336 // viewport. For example, if we're painting X, we're missing the
337 // corresponding Y DN values.
338 if (isXCube(vp))
339 portal.reset(new Portal(1, 1, m_yAxisCube->pixelType()));
340 else
341 portal.reset(new Portal(1, 1, m_xAxisCube->pixelType()));
342
343 // Iterate through the in-memory DN values for the passed in viewport
344 for (int yIndex = 0; yIndex < numLines; yIndex++) {
345 const vector<double> &line = buffer->getLine(yIndex);
346
347 for (int xIndex = 0; xIndex < (int)line.size(); xIndex++) {
348 int viewportPointX = xIndex + buffer->bufferXYRect().left();
349 int viewportPointY = yIndex + buffer->bufferXYRect().top();
350
351 double cubeSample = Null;
352 double cubeLine = Null;
353 vp->viewportToCube(viewportPointX, viewportPointY,
354 cubeSample, cubeLine);
355
356 // The sample/line range is the actual scatter plotted sample/line
357 // range. Don't alarm outside of this range on the cube ever.
358 if (cubeSample >= m_sampleRange.minValue() - 0.5 &&
359 cubeSample <= m_sampleRange.maxValue() + 0.5 &&
360 cubeLine >= m_lineRange.minValue() - 0.5 &&
361 cubeLine <= m_lineRange.maxValue() + 0.5) {
362 // If the in-memory DN values are within the alarm box range, check
363 // the corresponding DN values for the other axis via cube I/O.
364 if (isXCube(vp) &&
365 line[xIndex] >= m_xCubeDnAlarmRange.first &&
366 line[xIndex] <= m_xCubeDnAlarmRange.second) {
367 portal->SetPosition(cubeSample, cubeLine, m_yAxisCubeBand);
368 m_yAxisCube->read(*portal);
369
370 double yDnValue = (*portal)[0];
371
372 if (yDnValue >= m_yCubeDnAlarmRange.first &&
373 yDnValue <= m_yCubeDnAlarmRange.second) {
374 painter->drawPoint(viewportPointX, viewportPointY);
375 }
376 }
377 else if (isYCube(vp) &&
378 line[xIndex] >= m_yCubeDnAlarmRange.first &&
379 line[xIndex] <= m_yCubeDnAlarmRange.second) {
380 portal->SetPosition(cubeSample, cubeLine, m_xAxisCubeBand);
381 m_xAxisCube->read(*portal);
382
383 double xDnValue = (*portal)[0];
384
385 if (xDnValue >= m_xCubeDnAlarmRange.first &&
386 xDnValue <= m_xCubeDnAlarmRange.second) {
387 painter->drawPoint(viewportPointX, viewportPointY);
388 }
389 }
390 }
391 }
392 }
393 }
394 }
395 }
396
397
407 QPoint mouseLoc) {
408 ScatterPlotData *scatterData =
409 dynamic_cast<ScatterPlotData *>(m_spectrogram->data());
410
411 if (scatterData) {
412 scatterData->clearAlarms();
413
414 if (alarmingPlot() && (isXCube(vp) || isYCube(vp))) {
415 QScopedPointer<Portal> xCubePortal(
418 QScopedPointer<Portal> yCubePortal(
421
422 double cubeSample = Null;
423 double cubeLine = Null;
424
425 vp->viewportToCube(mouseLoc.x(), mouseLoc.y(), cubeSample, cubeLine);
426
427 // The sample/line range is the actual scatter plotted sample/line
428 // range. Don't alarm outside of this range on the cube ever.
429 if (cubeSample >= m_sampleRange.minValue() - 0.5 &&
430 cubeSample <= m_sampleRange.maxValue() + 0.5 &&
431 cubeLine >= m_lineRange.minValue() - 0.5 &&
432 cubeLine <= m_lineRange.maxValue() + 0.5) {
433 xCubePortal->SetPosition(cubeSample, cubeLine, m_xAxisCubeBand);
434 m_xAxisCube->read(*xCubePortal);
435 yCubePortal->SetPosition(cubeSample, cubeLine, m_yAxisCubeBand);
436 m_yAxisCube->read(*yCubePortal);
437
438 for (int i = 0; i < xCubePortal->size(); i++) {
439 double x = (*xCubePortal)[i];
440 double y = (*yCubePortal)[i];
441
442 if (!IsSpecial(x) && !IsSpecial(y)) {
443 scatterData->alarm(x, y);
444 }
445 }
446 }
447 }
448
449 plot()->replot();
450 }
451 }
452
453
461 m_alarmPlot = alarming;
462 }
463
464
472 m_alarmViewport = alarming;
473 }
474
475
484 void ScatterPlotWindow::setAlarmPlotBoxSize(int samples, int lines) {
485 m_alarmPlotSamples = samples;
486 m_alarmPlotLines = lines;
487 }
488
489
498
499
515
516
529 double yDnBoxSize) {
530 m_alarmViewportXDnBoxSize = xDnBoxSize;
531 m_alarmViewportYDnBoxSize = yDnBoxSize;
532 }
533
534
541 m_xAxisCube = NULL;
542 m_yAxisCube = NULL;
543 }
544
545
552 if (m_colorize->text().compare("Colorize") == 0) {
553 m_colorize->setIcon(QPixmap(FileName("$ISISROOT/appdata/images/icons/gray.png").expanded()));
554 m_colorize->setText("Gray");
555 QwtLinearColorMap *colorMap = new QwtLinearColorMap(Qt::darkCyan, Qt::red);
556 colorMap->addColorStop(DBL_EPSILON, Qt::cyan);
557 colorMap->addColorStop(0.3, Qt::green);
558 colorMap->addColorStop(0.50, Qt::yellow);
559 m_spectrogram->setColorMap(colorMap);
560 plot()->setCanvasBackground(Qt::darkCyan);
561 }
562 else {
563 m_colorize->setIcon(QPixmap(FileName("$ISISROOT/appdata/images/icons/rgb.png").expanded()));
564 m_colorize->setText("Colorize");
565 QwtLinearColorMap *colorMap = new QwtLinearColorMap(Qt::black, Qt::white);
566 colorMap->addColorStop(DBL_EPSILON, Qt::darkGray);
567 m_spectrogram->setColorMap(colorMap);
568 plot()->setCanvasBackground(Qt::black);
569 }
570
571// plot()->axisWidget(QwtPlot::yRight)->setColorMap(
572// m_spectrogram->interval(Qt::ZAxis),
573// m_spectrogram->colorMap());
575
576 replot();
577 }
578
579
586 if (m_contour->text() == "Show Contour Lines") {
587 m_contour->setText("Hide Contour Lines");
588 m_spectrogram->setDisplayMode(QwtPlotSpectrogram::ContourMode, true);
590 }
591 else {
592 m_contour->setText("Show Contour Lines");
593 m_spectrogram->setDisplayMode(QwtPlotSpectrogram::ContourMode, false);
594 }
595
596 replot();
597 }
598
599
608 return (vp && m_xAxisCube &&
609 vp->cube() == m_xAxisCube && vp->grayBand() == m_xAxisCubeBand &&
610 vp->isGray());
611 }
612
613
622 return (vp && m_yAxisCube &&
623 vp->cube() == m_yAxisCube && vp->grayBand() == m_yAxisCubeBand &&
624 vp->isGray());
625 }
626
627
636 if (alarmingViewport()) {
638 m_xCubeDnAlarmRange.first = plot()->invTransform(
639 QwtPlot::xBottom, e->pos().x() - m_alarmViewportScreenWidth / 2);
640 m_xCubeDnAlarmRange.second = plot()->invTransform(
641 QwtPlot::xBottom, e->pos().x() + m_alarmViewportScreenWidth / 2);
642
643 m_yCubeDnAlarmRange.first = plot()->invTransform(
644 QwtPlot::yLeft, e->pos().y() + m_alarmViewportScreenHeight / 2);
645 m_yCubeDnAlarmRange.second = plot()->invTransform(
646 QwtPlot::yLeft, e->pos().y() - m_alarmViewportScreenHeight / 2);
647
648 if (m_xCubeDnAlarmRange.first > m_xCubeDnAlarmRange.second)
649 std::swap(m_xCubeDnAlarmRange.first, m_xCubeDnAlarmRange.second);
650
651 if (m_yCubeDnAlarmRange.first > m_yCubeDnAlarmRange.second)
652 std::swap(m_yCubeDnAlarmRange.first, m_yCubeDnAlarmRange.second);
653 }
654 else {
655 m_xCubeDnAlarmRange.first = plot()->invTransform(
656 QwtPlot::xBottom, e->pos().x()) - m_alarmViewportXDnBoxSize / 2.0;
657 m_xCubeDnAlarmRange.second = plot()->invTransform(
658 QwtPlot::xBottom, e->pos().x()) + m_alarmViewportXDnBoxSize / 2.0;
659
660 m_yCubeDnAlarmRange.first = plot()->invTransform(
661 QwtPlot::yLeft, e->pos().y()) - m_alarmViewportYDnBoxSize / 2.0;
662 m_yCubeDnAlarmRange.second = plot()->invTransform(
663 QwtPlot::yLeft, e->pos().y()) + m_alarmViewportYDnBoxSize / 2.0;
664 }
665 }
666 else {
668 m_xCubeDnAlarmRange.second = Null;
670 m_yCubeDnAlarmRange.second = Null;
671 }
672
673 emit plotChanged();
674 }
675
676
685 m_xCubeDnAlarmRange.second = Null;
687 m_yCubeDnAlarmRange.second = Null;
688
689 emit plotChanged();
690 }
691
692
699 if (m_colorize->text() == "Gray") {
700 m_spectrogram->setDefaultContourPen(QPen(Qt::red));
701 }
702 else {
703 m_spectrogram->setDefaultContourPen(QPen(Qt::white));
704 }
705 }
706
707
714 connect(config, SIGNAL(finished(int)),
715 config, SLOT(deleteLater()));
716 config->show();
717 }
718}
IO Handler for Isis Cubes.
Definition Cube.h:168
PixelType pixelType() const
Definition Cube.cpp:1764
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:813
virtual QString fileName() const
Returns the opened cube's filename.
Definition Cube.cpp:1569
File name manipulation and expansion.
Definition FileName.h:100
Cube display widget for certain Isis MDI applications.
void plotChanged()
Emitted every time there is a change to the plot window.
MenuOptions
There is a menu option for everything in the plot window's menu.
Definition PlotWindow.h:96
void replot()
Reset the scale of the plot, replot it and emit plot changed.
virtual bool eventFilter(QObject *o, QEvent *e)
This method filters the events of the objects it is connected to.
virtual void paint(MdiCubeViewport *vp, QPainter *painter)
Paint plot curve information onto the viewport.
void disableAxisAutoScale()
This turns off scaling the x/y axes automatically.
QwtPlot * plot()
Get the plot encapsulated by this PlotWindow.
QwtPlotZoomer * zoomer()
Get this window's plot's zoomer.
Buffer for containing a two dimensional section of an image.
Definition Portal.h:36
This is the configuration dialog for alarming scatter plots between the plot window and cube viewport...
This is the QwtRasterData for a scatter plot.
void clearAlarms()
Forget all alarmed bins (viewport->plot).
double xCubeMax() const
Return the max DN value for the y-axis cube's data range.
double yCubeMin() const
Return the min DN value for the y-axis cube's data range.
double xCubeMin() const
Return the min DN value for the x-axis cube's data range.
double yCubeMax() const
Return the max DN value for the y-axis cube's data range.
QPointer< QAction > m_contour
The action for switching on and off contour lines.
int m_alarmViewportScreenHeight
Alarm plot->viewport Y (screen pixels) box size.
QPair< double, double > m_xCubeDnAlarmRange
The DN range of the X-Axis Cube to be alarmed when painting.
ScatterPlotWindow(QString title, Cube *xAxisCube, int xAxisBand, int xAxisBinCount, Cube *yAxisCube, int yAxisBand, int yAxisBinCount, QwtInterval sampleRange, QwtInterval lineRange, QWidget *parent)
Create a scatter plot window with the given data.
void setAlarmViewportScreenBoxSize(int, int)
This sets the screen pixel box size for alarming plot->viewport.
Cube * m_xAxisCube
The cube associated with the X-Axis DN values.
Cube * m_yAxisCube
The cube associated with the Y-Axis DN values.
virtual void paint(MdiCubeViewport *vp, QPainter *painter)
If the viewport is showing the x axis cube data or y axis cube data, and alarming is enabled,...
QPointer< QAction > m_colorize
The action for switching the scatter plot from B/W to color.
void setAlarmingViewport(bool)
This enables or disables alarming plot->viewport.
bool m_alarmPlot
Alarm onto plot... aka alarm viewport->plot.
int m_alarmViewportScreenWidth
Alarm plot->viewport X (screen pixels) box size.
void updateContourPen()
This sets the contour pen to an appropriate color based on the color of the plot (B/W v.
bool alarmingPlot() const
This indicates if we are alarming from viewport to plot.
QPair< double, double > alarmViewportDnBoxSize() const
This is the alarming box size for plot->viewport in cube units (number of samples/lines).
AlarmRangeUnits
This enumeration differentiates alarming a strict cube DN box size from a screen region.
@ ScreenUnits
Alarming is a visible area around the mouse.
void colorPlot()
This method switches the color mode of the scatter plot from black and white to color and visa versa.
QPair< double, double > m_yCubeDnAlarmRange
The DN range of the Y-Axis Cube to be alarmed when painting.
void mouseMoveEvent(QMouseEvent *e)
When the mosue moves, this updates the alarming information and causes repaints on the cube viewports...
bool alarmingViewport() const
This indicates if we are alarming from plot to viewport.
void setAlarmPlotBoxSize(int, int)
This sets the box size for alarming viewport->plot in cube samples/lines.
void setMousePosition(MdiCubeViewport *vp, QPoint mouseLoc)
Saves the current mouse position in the viewport so that the plot can be alarmed around that position...
QwtInterval m_sampleRange
The sample range (1-based inclusive) of data used for the scatter plot.
QPair< int, int > alarmPlotBoxSize() const
This is the sample/line box sizes for alarming from viewport to plot.
void setAlarmViewportDnBoxSize(double, double)
This sets the cube DN box size for alarming plot->viewport.
int m_yAxisCubeBand
The band on the Y-Axis cube used for the scatter plot.
bool isXCube(MdiCubeViewport *vp) const
Returns true if the viewport's cube is the cube currently being used on the x-axis.
int m_xAxisCubeBand
The band on the X-Axis cube used for the scatter plot.
double m_alarmViewportYDnBoxSize
Alarm plot->viewport Y (Cube DN) box size.
void configureAlarming()
Give the users an alarm config dialog to change the alarming settings.
double m_alarmViewportXDnBoxSize
Alarm plot->viewport X (Cube DN) box size.
bool eventFilter(QObject *o, QEvent *e)
We override events done on the plot canvas for alarming purposes.
QwtInterval m_lineRange
The line range (1-based inclusive) of data used for the scatter plot.
void forgetCubes()
This causes the window to lose it's pointers to the input cubes.
bool isYCube(MdiCubeViewport *vp) const
Returns true if the viewport's cube is the cube currently being used on the y-axis.
void showHideContour()
This method hides or displays the contour lines on the spectrogram.
QPair< int, int > alarmViewportScreenBoxSize() const
This is the alarming box size for plot->viewport in screen units.
void setAlarmingPlot(bool)
This enables or disables alarming viewport->plot.
AlarmRangeUnits m_alarmViewportUnits
Alarm plot->viewport current units.
bool m_alarmViewport
Alarm onto viewport... aka alarm plot->viewport.
void mouseLeaveEvent(QMouseEvent *e)
When the mouse leaves the plot canvas we disable all alarming from plot->viewport.
void setAlarmViewportUnits(AlarmRangeUnits)
This sets the units to be used for alarming plot->viewport.
int m_alarmPlotSamples
Alarm viewport->plot viewport sample box size.
QwtPlotSpectrogram * m_spectrogram
This is the scatter plot's Qwt plot item.
int m_alarmPlotLines
Alarm viewport->plot viewport line box size.
AlarmRangeUnits alarmViewportUnits() const
This is the active alarming units for plot->viewport.
Reads and stores visible DN values.
const std::vector< double > & getLine(int line)
Retrieves a line from the buffer.
QRect bufferXYRect()
Returns a rect, in screen pixels, of the area this buffer covers.
bool working()
This tests if queued actions exist in the viewport buffer.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
const double Null
Value for an Isis Null pixel.
bool IsSpecial(const double d)
Returns if the input pixel is special.
Namespace for the standard library.