25 #ifndef BINPLOTWIDGET_QO_H
26 #define BINPLOTWIDGET_QO_H
30 #include <guitools/Histogram/BinPlotWidget.ui.h>
37 #include <qwt_plot_picker.h>
46 class QwtLinearColorMap;
51 template <
class T>
class ImageInterface;
52 template <
class T>
class Vector;
61 class HistogramMarkerGaussian;
62 class HistogramMarkerPoisson;
63 class RangeControlsWidget;
65 class ChannelRangeWidget;
93 BinPlotWidget(
bool fitControls,
bool rangeControls,
bool plotModeControls,
98 void deleteImageRegion(
int id );
99 void imageRegionSelected(
int id );
100 virtual void postMessage(
const QString& msg );
102 std::vector<float> getXValues()
const;
103 pair<double,double> getMinMaxValues()
const;
104 void setMinMaxValues(
double minValue,
double maxValue,
bool updateGraph=
true );
107 void hideMaximumRange();
109 void setColorMap( QwtLinearColorMap* colorMap );
110 void setColorScaleMax(
int max );
111 void setMultiColored(
bool multipleColors );
112 void setLineMode(
bool lineMode );
113 void setDisplayPlotTitle(
bool display );
114 void setDisplayAxisTitles(
bool display );
115 void setHistogramColor( QColor
color );
116 void setFitEstimateColor( QColor
color );
117 void setFitCurveColor( QColor
color );
118 void setMultipleHistogramColors(
const QList<QColor>& colors );
119 void setAxisLabelFont(
int size );
120 void setChannelCount(
int count );
121 void setChannelValue(
int value );
122 void addZoomActions(
bool rangeControl, QMenu* zoomMenu );
123 void addDisplayActions( QMenu* menu, QWidgetAction* binCountAction );
124 void addPlotModeActions( QMenu* menu, QWidgetAction* channelRangeAction=NULL,
125 QWidgetAction* footPrintAction = NULL );
126 void setPlotMode(
int mode );
127 bool isEmpty()
const;
131 void postStatusMessage(
const QString& msg );
136 void fitModeChanged();
137 void plotModeChanged(
int mode );
138 void setDisplayStep(
bool display );
139 void setDisplayLogY(
bool display );
144 void toAscii(
const QString& filePath );
145 void toPing(
const QString& filtPath,
int width,
int height );
148 void channelRangeChanged(
int minValue,
int maxValue,
bool allChannels,
bool automatic,
int specIndex=-1 );
151 void imageModeSelected(
bool enabled );
152 void regionModeSelected(
bool enabled );
155 virtual void resizeEvent( QResizeEvent* event );
156 virtual void keyPressEvent( QKeyEvent* event );
162 virtual void enterEvent( QEvent* event );
163 virtual void mousePressEvent( QMouseEvent* event );
167 void lineMoved(
const QPoint& pt );
170 void defineCurve(
int id,
const QColor& curveColor,
bool clear=
true);
171 void minMaxChanged();
172 void showContextMenu(
const QPoint& pt );
173 void centerPeakSpecified();
174 void lambdaSpecified();
175 void fwhmSpecified();
176 void fitDone(
const QString& msg );
177 void zoomContextFinished();
178 void zoomMenuFinished();
179 void resetGaussianFitMarker();
180 void resetPoissonFitMarker();
186 void zoomPercentage(
float minValue,
float maxValue);
187 void binCountChanged(
int count );
189 void regionAllModeSelected(
bool enabled );
194 void initializeFitWidget(
bool fitControls );
195 void initializeDisplayActions();
196 void initializeZoomControls(
bool rangeControls );
197 void initializePlotModeControls(
bool enable );
198 void initializeGaussianFitMarker();
199 void initializePoissonFitMarker();
200 void initializeRangeControls(
bool rangeControls);
201 void connectZoomActions(
ZoomWidget* zoomWidget );
202 void clearGaussianFitMarker();
203 void clearPoissonFitMarker();
204 void clearHistograms();
206 void makeHistogram(
int id,
const QColor& histogramColor,
bool clearCurve=
true);
207 void rectangleSizeChanged();
208 void resetAxisTitles();
209 void resetPlotTitle();
211 bool resetImage(
bool waitOnHistogram =
false );
213 void resetRectangleMarker();
214 void defineCurveLine(
int id,
const QColor& lineColor );
215 void defineCurveHistogram(
int id,
const QColor& histogramColor );
217 bool isPrintOut(
int id )
const;
218 bool isPrincipalHistogram(
int id )
const;
219 bool isPlotContains(
int x,
int y );
220 virtual int getCanvasHeight();
222 int getSelectedId()
const;
223 QColor getPieceColor(
int index,
const QColor& defaultColor )
const;
225 void zoom(
float percent );
226 void zoomRangeMarker(
double startValue,
double endValue );
227 Ui::BinPlotWidgetClass
ui;
252 std::shared_ptr<const casacore::ImageInterface<float> >
image;
320 #endif // THRESHOLDINGBINPLOTWIDGET_H
std::vector< double > Vector
virtual void reset()
Overrides PlotTool::reset().
Generates and Manages the data corresponding to a histogram.
PtrHolder< T > & operator=(const PtrHolder< T > &other)
void rangeChanged()
Slot for when the set range changes.
Marks initial (center,peak) and FWHM Gaussian estimates on the histogram.
Marks a lambda estimate on the graph.
Class to hold a region of interest in an image.
Handles drawing the range selection rectangle for the bin plot.
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the color(i.e.,"000000"for black) and
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.