casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HistogramMain.qo.h
Go to the documentation of this file.
1 //# Copyright (C) 2005
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 #ifndef HISTOGRAMMAIN_QO_H
26 #define HISTOGRAMMAIN_QO_H
27 
28 #include <QMainWindow>
30 #include <casa/aipstype.h>
31 #include <guitools/Histogram/HistogramMain.ui.h>
34 
35 class QCloseEvent;
36 
37 
38 namespace casacore{
39 
40 template <class T> class ImageInterface;
41 class ImageRegion;
42 }
43 
44 namespace casa {
45 
46 class BinPlotWidget;
47 class ColorPreferences;
48 
53 class HistogramMain : public QMainWindow {
54  Q_OBJECT
55 
56 public:
66  HistogramMain(bool showFileLoader, bool fitControls, bool rangeControls,
67  bool plotModeControls, QWidget *parent);
68  bool setImage(std::shared_ptr<const casacore::ImageInterface<float> > img );
69  bool setImageRegion( casacore::ImageRegion* imageRegion, int id );
70  std::pair<double,double> getRange() const;
71  void deleteImageRegion( int id );
72  void imageRegionSelected( int id );
73  void setChannelCount( int count );
74  void setChannelValue( int value );
75  void setDisplayPlotTitle( bool display );
76  void setDisplayAxisTitles( bool display );
77  void setPlotMode( int mode );
79 
80 signals:
81  void rangeChanged();
82  void closing();
83 
84 protected:
85  //Clean up images and regions because we are going down
86  virtual void closeEvent(QCloseEvent* event);
87 
88 private slots:
89  void openFileLoader();
90  void openHistogramSaver();
91  void imageFileChanged();
92  void openColorPreferences();
93  void colorsChanged();
94  void postStatusMessage( const QString& statusMsg );
95 
96 private:
97  HistogramMain( const HistogramMain& histMain );
98  HistogramMain& operator=( const HistogramMain& histMain );
99  bool generateImage( const QString& imagePath, std::shared_ptr<const casacore::ImageInterface<float> > image );
100 
106 
107  Ui::HistogramMainClass ui;
108 
109 };
110 }
111 
112 #endif // HISTOGRAMMAIN_QO_H
void setPlotMode(int mode)
HistogramMain & operator=(const HistogramMain &histMain)
BinPlotWidget * plotWidget
Allows user specification of the colors used in drawing the histogram and pluggable functionality...
void setChannelValue(int value)
std::pair< double, double > getRange() const
ostream-like interface to creating log messages.
Definition: LogIO.h:167
bool setImageRegion(casacore::ImageRegion *imageRegion, int id)
Ui::HistogramMainClass ui
void setDisplayPlotTitle(bool display)
Used when the histogram needs to come up as a main window.
void deleteImageRegion(int id)
bool generateImage(const QString &imagePath, std::shared_ptr< const casacore::ImageInterface< float > > image)
SaveHistogramWidget histogramSaver
Display a histogram of intensity vs count.
void setChannelCount(int count)
HistogramMain(bool showFileLoader, bool fitControls, bool rangeControls, bool plotModeControls, QWidget *parent)
showFileLoader: true, for allowing the user to load image files (as opposed to just setting them prog...
casacore::LogIO logger
Class to hold a region of interest in an image.
Definition: ImageRegion.h:86
void imageRegionSelected(int id)
Loads image files when the histogram runs as a standalone app.
ColorPreferences * preferencesColor
virtual void closeEvent(QCloseEvent *event)
Clean up images and regions because we are going down.
void postStatusMessage(const QString &statusMsg)
bool setImage(std::shared_ptr< const casacore::ImageInterface< float > > img)
void setDisplayAxisTitles(bool display)
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42