anatomist  5.1.2
3D neuroimaging data viewer
histoWin.h
Go to the documentation of this file.
1 /* This software and supporting documentation are distributed by
2  * Institut Federatif de Recherche 49
3  * CEA/NeuroSpin, Batiment 145,
4  * 91191 Gif-sur-Yvette cedex
5  * France
6  *
7  * This software is governed by the CeCILL-B license under
8  * French law and abiding by the rules of distribution of free software.
9  * You can use, modify and/or redistribute the software under the
10  * terms of the CeCILL-B license as circulated by CEA, CNRS
11  * and INRIA at the following URL "http://www.cecill.info".
12  *
13  * As a counterpart to the access to the source code and rights to copy,
14  * modify and redistribute granted by the license, users are provided only
15  * with a limited warranty and the software's author, the holder of the
16  * economic rights, and the successive licensors have only limited
17  * liability.
18  *
19  * In this respect, the user's attention is drawn to the risks associated
20  * with loading, using, modifying and/or developing or reproducing the
21  * software by the user in light of its specific status of free software,
22  * that may mean that it is complicated to manipulate, and that also
23  * therefore means that it is reserved for developers and experienced
24  * professionals having in-depth computer knowledge. Users are therefore
25  * encouraged to load and test the software's suitability as regards their
26  * requirements in conditions enabling the security of their systems and/or
27  * data to be ensured and, more generally, to use and operate it in the
28  * same conditions as regards security.
29  *
30  * The fact that you are presently reading this means that you have had
31  * knowledge of the CeCILL-B license and that you accept its terms.
32  */
33 
34 
35 #ifndef HISTO_WIN_H
36 #define HISTO_WIN_H
37 
40 #include <set>
41 #include <map>
42 
43 
44 class QwtPlot;
45 
46 
48 {
49  Q_OBJECT
50 
51 public:
52 
54  {
57  };
58 
59  QAHistogramWindow( QWidget *parent=0, const char *name=0,
60  carto::Object options = carto::none(),
61  Qt::WindowFlags f = Qt::Window );
62  virtual ~QAHistogramWindow();
63 
65  virtual Type type() const { return (Type)_classType; }
66 
67  virtual void displayClickPoint();
68 
69  virtual void refreshNow();
70 
71  virtual void registerObject( anatomist::AObject* object,
72  bool temporaryObject = false,
73  int position = -1 );
74  virtual void unregisterObject( anatomist::AObject* object );
75 
76  virtual const std::set<unsigned> & typeCount() const;
77  virtual std::set<unsigned> & typeCount();
78  virtual const std::string & baseTitle() const;
79 
80 protected:
81 
82  virtual void Draw( bool flush = true );
83 
84 private:
85  struct Private;
86  Private *d;
87 
88  QwtPlot *graphic;
89 
90  QAHistogram qaHisto;
91 
92  double *x_curve;
93  std::map< anatomist::AObject *, double * > phisto;
94 
95  void initX();
96  QRgb newColor( int );
97 
98  static int registerClass();
99 
100  static std::set< unsigned > _histCount;
101  static std::string _baseTitle;
102  static int _classType;
103 };
104 
105 #endif
virtual void refreshNow()
Real drawing function, replacing AWindow::Refresh in subclasses of QAWindow - Don't forget to call QA...
virtual void displayClickPoint()
virtual void registerObject(anatomist::AObject *object, bool temporaryObject=false, int position=-1)
virtual void unregisterObject(anatomist::AObject *object)
virtual ~QAHistogramWindow()
virtual const std::string & baseTitle() const
virtual std::set< unsigned > & typeCount()
QAHistogramWindow(QWidget *parent=0, const char *name=0, carto::Object options=carto::none(), Qt::WindowFlags f=Qt::Window)
virtual void Draw(bool flush=true)
static AWindow * createHistogramWindow(void *, carto::Object)
virtual Type type() const
Get the window type (2D, 3D or control)
Definition: histoWin.h:65
virtual const std::set< unsigned > & typeCount() const
Anatomist window with Qt.
Definition: qwindow.h:51
Base Anatomist object (abstract)
Definition: Object.h:96
AWindow()
AWindow constructor registers itself in the application.
Object none()