SurfacePlot.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: SurfacePlot.hpp 1644 2009-01-27 19:26:14Z ckiesch $"
00002 
00004 
00005 //============================================================================
00006 //
00007 //  This file is part of GPSTk, the GPS Toolkit.
00008 //
00009 //  The GPSTk is free software; you can redistribute it and/or modify
00010 //  it under the terms of the GNU Lesser General Public License as published
00011 //  by the Free Software Foundation; either version 2.1 of the License, or
00012 //  any later version.
00013 //
00014 //  The GPSTk is distributed in the hope that it will be useful,
00015 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 //  GNU Lesser General Public License for more details.
00018 //
00019 //  You should have received a copy of the GNU Lesser General Public
00020 //  License along with GPSTk; if not, write to the Free Software Foundation,
00021 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 //  
00023 //  Copyright 2004, The University of Texas at Austin
00024 //
00025 //============================================================================
00026 
00027 #ifndef VPLOT_SURFACEPLOT_H
00028 #define VPLOT_SURFACEPLOT_H
00029 
00030 #include <string>
00031 #include <vector>
00032 #include <map>
00033 #include <sstream>
00034 #include <iomanip>
00035 #include <math.h>
00036 #include <cmath>
00037 #include <limits.h>
00038 #include <algorithm>
00039 
00040 #include "Bitmap.hpp"
00041 #include "ColorMap.hpp"
00042 #include "InterpolatedColorMap.hpp"
00043 #include "Frame.hpp"
00044 #include "HLayout.hpp"
00045 #include "StrokeStyle.hpp"
00046 #include "Path.hpp"
00047 #include "BorderLayout.hpp"
00048 #include "Palette.hpp"
00049 
00050 #include "Axis.hpp"
00051 #include "AxisStyle.hpp"
00052 #include "Plot.hpp"
00053 
00054 using namespace std;
00055 using namespace vdraw;
00056 
00057 namespace vplot
00058 {
00062   class SurfacePlot : public Plot
00063   {
00064     public:
00065 
00072       SurfacePlot(int iwidth, int iheight, const Palette& p);
00073 
00075       ~SurfacePlot();
00076 
00077       /*
00078        * Public methods
00079        */
00081       inline void setColorLabel(const char* str) { colorlabel = std::string(str); }
00082 
00084       void draw(Frame *frame, int dir);
00085 
00087       void drawPlot(Frame* frame);
00088 
00095       void drawKey(Frame *frame); //, int dir);
00096 
00098       inline void set(int row, int col, double d)
00099       {
00100         icm.setColor(row,col,d);
00101       }
00102 
00104       inline double get(int row, int col)
00105       {
00106         return icm.getIndex(row,col);
00107       }
00108 
00110       inline void oversample(int scale) { oversample(scale,scale); }
00111 
00113       inline void oversample(int rscale, int cscale) { osr = rscale; osc = cscale; }
00114 
00116       inline void useBoxes(bool b=true) { boxes = b; }
00117 
00118       /* 
00119        * Settings / options
00120        */
00121       
00123       AxisStyle axis_color;
00124 
00125     protected:
00126 
00127     private:
00129       std::string colorlabel;
00130 
00132       int osr;
00133 
00135       int osc;
00136 
00138       bool boxes;
00139 
00141       InterpolatedColorMap icm;
00142 
00143   };
00144 
00145 }
00146 
00147 #endif  //VPLOT_SURFACEPLOT_H
00148 
00149 

Generated on Tue May 22 03:31:02 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1