GNU Radio 3.7.0 C++ API
timeRasterGlobalData.h
Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2012,2013 Free Software Foundation, Inc.
00004  *
00005  * This file is part of GNU Radio
00006  *
00007  * GNU Radio is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 3, or (at your option)
00010  * any later version.
00011  *
00012  * GNU Radio is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with GNU Radio; see the file COPYING.  If not, write to
00019  * the Free Software Foundation, Inc., 51 Franklin Street,
00020  * Boston, MA 02110-1301, USA.
00021  */
00022 
00023 #ifndef TIMERASTER_GLOBAL_DATA_HPP
00024 #define TIMERASTER_GLOBAL_DATA_HPP
00025 
00026 #include <qwt_raster_data.h>
00027 #include <inttypes.h>
00028 
00029 #if QWT_VERSION >= 0x060000
00030 #include <qwt_point_3d.h>  // doesn't seem necessary, but is...
00031 #include <qwt_compat.h>
00032 #endif
00033 
00034 class TimeRasterData: public QwtRasterData
00035 {
00036 public:
00037   TimeRasterData(const double rows, const double cols);
00038   virtual ~TimeRasterData();
00039 
00040   virtual void reset();
00041   virtual void copy(const TimeRasterData*);
00042 
00043   virtual void resizeData(const double rows, const double cols);
00044 
00045   virtual QwtRasterData *copy() const;
00046 
00047 #if QWT_VERSION < 0x060000
00048   virtual QwtDoubleInterval range() const;
00049   virtual void setRange(const QwtDoubleInterval&);
00050 #endif
00051 
00052   virtual double value(double x, double y) const;
00053 
00054   virtual double getNumCols()const;
00055   virtual double getNumRows()const;
00056 
00057   virtual void addData(const double*, const int);
00058 
00059   void incrementResidual();
00060 
00061 protected:
00062 
00063   double* d_data;
00064   double d_rows, d_cols;
00065   double d_resid;
00066   int d_nitems, d_totalitems, d_data_size;
00067 
00068 #if QWT_VERSION < 0x060000
00069   QwtDoubleInterval d_intensityRange;
00070 #else
00071   QwtInterval d_intensityRange;
00072 #endif
00073 
00074 private:
00075 
00076 };
00077 
00078 #endif /* TIMERASTER_GLOBAL_DATA_HPP */