CFEL - ASG Software Suite  2.5.0
CASS
two_d_viewer_data.h
Go to the documentation of this file.
1 // Copyright (C) 2013 Lutz Foucar
2 
3 /**
4  * @file two_d_viewer_data.h contains the wrappe of the data for the 2d viewer
5  *
6  * @author Lutz Foucar
7  */
8 
9 #ifndef _TWODVIEWERDATA_
10 #define _TWODVIEWERDATA_
11 
12 #include <vector>
13 
14 #include <qwt_raster_data.h>
15 
16 #include "data.h"
17 
18 namespace cass
19 {
20 class Histogram2DFloat;
21 }//end namespace cass
22 
23 namespace jocassview
24 {
25 
26 /** the 2d data wrapper
27  *
28  * @author Lutz Foucar
29  */
30 class TwoDViewerData : public QwtRasterData, public Data
31 {
32 public:
33  /** define the shape of the data */
34  typedef std::pair<size_t,size_t> shape_t;
35 
36  /** default constructor
37  *
38  * intialize the histogram pointer to 0
39  */
41 
42  /** destructor
43  *
44  * delete the histogram data pointed to
45  */
46  virtual ~TwoDViewerData();
47 
48  /** set the cass data to be wrapped by this
49  *
50  * takes over ownership of the data pointed to and deletes it when another
51  * pointer is passed to this.
52  *
53  * @param result the result that contains the data
54  */
56 
57  /** retrieve the pointer to the data
58  *
59  * @return pointer to the data
60  */
62 
63  /** return the min max values of the values in the data
64  *
65  * @return the interval of min to max values in the data
66  * @param log when true it will return the minimal positive value
67  */
68  QwtInterval origZInterval(bool log)const;
69 
70  /** return the value of the data at point x,y
71  *
72  * @param x the x coordinate of the requested data
73  * @param y the y coordinate of the requested data
74  */
75  virtual double value(double x, double y) const;
76 
77 private:
78  /** the cass data container */
80 };
81 }//end namespace jocassview
82 #endif
QwtInterval origZInterval(bool log) const
return the min max values of the values in the data
virtual ~TwoDViewerData()
destructor
std::tr1::shared_ptr< self_type > shared_pointer
a shared pointer of this class
Definition: result.hpp:323
contains the base class for add viewer data
std::pair< size_t, size_t > shape_t
define the shape of the data
void setResult(result_t::shared_pointer result)
set the cass data to be wrapped by this
result_t::shared_pointer _result
the cass data container
the 2d data wrapper
virtual double value(double x, double y) const
return the value of the data at point x,y
result_t::shared_pointer result()
retrieve the pointer to the data
TwoDViewerData()
default constructor
base class for all data wrappers
Definition: data.h:22