GreyLab.h

Go to the documentation of this file.
00001 //GreyLab.h
00002 
00003 /*************************************************************/
00004 //
00005 // GreyLabWindow
00006 //
00007 // Main class of GreyLab
00008 //
00009 //-------------------------------------------------------------
00010 //
00011 // v 1.29 - 2008/03/10 - Matlab export
00012 // v 1.28 - 2007/12/13 - More z-axis plotting options
00013 // v 1.27 - 2007/11/26 - Added graph label store and retrieve
00014 // v 1.26 - 2007/10/29 - Fixed window drift and minimise bugs
00015 // v 1.25 - 2007/09/23 - Changes to allow <ChA> etc use
00016 // v 1.24 - 2007/08/26 - Matrix data type loading
00017 // v 1.23 - 2007/08/16 - Colour interpolated AA stroked lines option
00018 // v 1.22 - 2007/06/12 - 2.17.2 improvements
00019 // v 1.21 - 2007/06/09 - Improvements to ranging
00020 // v 1.20 - 2007/05/30 - Zoomback feature and GUI tidying
00021 // v 1.19 - 2007/05/29 - Changes to load header file
00022 // v 1.18 - 2007/04/01 - Updates
00023 // v 1.17 - 2007/03/23 - Changes to linescan offsets
00024 // v 1.16 - 2007/03/14 - Changes to gradient display
00025 // v 1.15 - 2007/02/17 - Changes for 2.14.0
00026 // v 1.14 - 2007/02/09 - X target range and better autoranging
00027 // v 1.13 - 2007/02/01 - ysd scatter option
00028 // v 1.12 - 2007/01/06 - Changes for 2.11.0
00029 // v 1.11 - 2006/11/23 - Changes for 2.10.2
00030 // v 1.10 - 2006/11/19 - Autorange Z and equal range Z
00031 // v 1.9 - 2006/11/18 - Lots of changes for 2.10.0
00032 // v 1.8 - 2006/11/13 - Export all columns options (2.9.0)
00033 // v 1.7 - 2006/08/28 - Colourscale interpolation (2.8.0)
00034 // v 1.6 - 2006/08/27 - Bug fixes and improvements to linescans (2.7.0)
00035 // v 1.5 - 2006/08/18 - Plane calculation (v2.4.2)
00036 // v 1.4 - 2006/07/31 - Better handling of the SD mess (v2.2.3)
00037 // v 1.3 - 2006/07/11 - Improvements to auto ranging on analysis tab (v2.2.2)
00038 // v 1.2 - 2006/07/10 - Scatter plotting amd other additions and fixes (v2.2.1)
00039 // v 1.1 - 2006/07/07 - Additions and fixes (v2.1.0)
00040 // v 1.0 - 2006/04/19 - Initial release
00041 //
00042 // See LICENSE.txt for distribution and usage restrictions
00043 // Copyright (c) 2005-2007 Simon Chorley
00044 // www.mylaboratory.co.uk - greylab@mylaboratory.co.uk
00045 //
00046 /*************************************************************/
00047 
00048 
00049 #ifndef _GREYLAB_H_
00050 #define _GREYLAB_H_
00051 
00052 
00053 ///GreyLab main class definition
00054 /**
00055  * Provides definition of the main GreyLabWindow class.
00056  * @file GreyLab.h
00057  * @version 1.29 - 2008/03/10
00058  */
00059 
00060 
00061 #include <fx.h>
00062 #include <FXGradientBar.h>
00063 #include <FXColorList.h>
00064 #include <il.h>
00065 #include <sys/timeb.h>
00066 #include <sys/types.h>
00067 #include <sys/stat.h>
00068 #include "DataWin.h"
00069 #include "HeightWin.h"
00070 #include "GraphFont.h"
00071 #include "DataFunc.h"
00072 #include "DrawPalette.h"
00073 #include "Vector.h"
00074 
00075 
00076 #define MAJORV 2
00077 #define MINORV 19
00078 #define BUILDV 0
00079 
00080 
00081 #define BASESCALEBAR 10
00082 #define BASESCALEGAP 5
00083 #define BASECHARGAP 8
00084 #define BASEMAJORTICK 5
00085 #define BASEMINORTICK 2
00086 #define COLOURRES 10000
00087 #define INITIALPOINTS 10000
00088 
00089 #define NUM_STORED_LABELS 10
00090 
00091 
00092 ///GreyLab main class
00093 /**
00094  * GreyLab main class containing all the widget definitions,
00095  * data handling, rendering and output code.
00096  */
00097 class GreyLabWindow : public FXMainWindow
00098 {
00099         FXDECLARE(GreyLabWindow)
00100 protected:
00101         FXDCWindow      *gsDCwindow;
00102         FXDCWindow      *lsDCwindow;
00103 
00104         FXMenuPane      *keysMenupane;
00105 
00106         FXTabBook*      contentsTabbook;
00107         FXTabItem*      mainTab;
00108         FXTabItem*      hdrTab;
00109         FXTabItem*      sdTab;
00110         FXTabItem*      analysisTab;
00111         FXTabItem*      greyscaleTab;
00112         FXTabItem*      linescanTab;
00113         FXTabItem*      heightmapTab;
00114         FXTabItem*      settingsTab;
00115 
00116         // Main tab stuff
00117         FXCheckButton   *graphsetCheckbutton;
00118         FXButton                *browseButton;
00119         FXTextField             *pathTextfield;
00120         FXRadioButton   *sdasciiRadiobutton;
00121 //      FXRadioButton   *sdlabviewRadiobutton;
00122 //      FXRadioButton   *sdoriginRadiobutton;
00123         FXRadioButton   *sdacornRadiobutton;
00124         FXRadioButton   *sdsmartRadiobutton;
00125         FXTextField     *smarttitlesTextfield;
00126         FXTextField     *smartdataTextfield;
00127         FXRadioButton   *sddumbRadiobutton;
00128         FXTextField     *dumbdataTextfield;
00129         FXTextField     *dumbcolsperTextfield;
00130         FXRadioButton   *sdmatrixRadiobutton;
00131         FXTextField             *matrixdataTextfield;
00132         FXTextField             *separatorTextfield;
00133 
00134         FXColorWell             *lcolColourwell;
00135         FXColorWell             *hcolColourwell;
00136         FXColorWell             *nodataColourwell;
00137 
00138         FXTextField     *textfontTextfield;
00139         FXTextField     *symfontTextfield;
00140         FXTextField             *numfontTextfield;
00141         FXRadioButton   *aaresredRadiobutton;
00142         FXRadioButton   *aagaussianRadiobutton;
00143 
00144         // Header tab stuff
00145         FXText                  *hdText;
00146         
00147         // SD tab stuff
00148         FXTextField     *sdnsweepsTextfield;
00149         FXTextField     *sdncolsTextfield;
00150         FXTextField     *sdnsdTextfield;
00151         FXTextField     *sdnptsTextfield;
00152         FXIconList              *sdIconlist;
00153 
00154         // Data analysis tab stuff
00155         FXTextField     *dastrideTextfield;
00156         FXTextField     *dassweepTextfield;
00157         FXTextField     *daesweepTextfield;
00158         FXListBox               *daxcolListbox;
00159         FXListBox               *dazcolListbox;
00160         FXListBox               *daysdListbox;
00161         FXCheckButton   *dasweepselectCheckbutton;
00162         FXTextField     *dayminTextfield;
00163         FXTextField     *daymaxTextfield;
00164         FXTextField     *daxinminTextfield;
00165         FXTextField     *daxinmaxTextfield;
00166         FXCheckButton   *daxautoCheckbutton;
00167         FXTextField     *daxtgtminTextfield;
00168         FXTextField     *daxtgtmaxTextfield;
00169         FXTextField     *daxtgtresTextfield;
00170         FXTextField     *dastatusTextfield[3];
00171         FXText                  *dafunctionText[3];
00172         FXCheckButton   *dadiffCheckbutton;
00173 //      FXToggleButton  *dadiffTogglebutton;
00174         FXPopup                 *dadiffPopup;
00175         FXOptionMenu    *dadiffOptionmenu;
00176         FXCheckButton   *daorderCheckbutton;
00177         FXCheckButton   *daintCheckbutton;
00178         FXToggleButton  *daintTogglebutton;
00179         FXTextField     *daintzeroTextfield;
00180         FXCheckButton   *dascatterCheckbutton;
00181         FXListBox               *dascatterListbox;
00182         FXButton                *daprocessButton;
00183         FXCheckButton   *daexportallCheckbutton;
00184 
00185         // Greyscale tab stuff
00186         FXCheckButton   *gstitleCheckbutton;
00187         FXTextField     *gstitleTextfield;
00188         FXMenuButton    *gstitlekeysMenubutton;
00189         FXCheckButton   *gssubtitleCheckbutton;
00190         FXTextField     *gssubtitleTextfield;
00191         FXMenuButton    *gssubtitlekeysMenubutton;
00192         FXCheckButton   *gsrealtimeCheckbutton;
00193         FXTextField             *gsymaxTextfield;
00194         FXTextField             *gsylabelTextfield;
00195         FXCheckButton   *gsylabelrotCheckbutton;
00196         FXTextField             *gsyminTextfield;
00197         FXTextField             *gszmaxTextfield;
00198         FXTextField             *gszlabelTextfield;
00199         FXMenuPane              *gszlabelMenupane;
00200         FXMenuCheck             *gshidegradzlabelMenucheck;
00201         FXMenuCheck             *gshidescalezlabelMenucheck;
00202         FXMenuCheck             *gshidelabelzlabelMenucheck;
00203         FXMenuCheck     *gszlabelrotMenucheck;
00204         FXMenuCheck             *gszscaleshowendsMenucheck;
00205         FXMenuCheck             *gszzoomscaleMenucheck;
00206         FXMenuCheck             *gszscaleroundMenucheck;
00207         FXMenuButton    *gszlabelMenubutton;
00208         FXTextField             *gszminTextfield;
00209         FXSlider                *gszmaxSlider;
00210         FXSlider                *gszminSlider;
00211         FXButton                *gszoombackButton;
00212         FXTextField             *gsxmaxTextfield;
00213         FXTextField             *gsxlabelTextfield;
00214         FXTextField             *gsxminTextfield;
00215         FXCheckButton   *gscontourCheckbutton;
00216         FXColorWell             *gscontourcolColourwell;
00217         FXTextField             *gscontourspaceTextfield;
00218         FXCheckButton   *gscontouraltCheckbutton;
00219         FXTextField             *gsgammaTextfield;
00220         FXMenuButton    *gsgraphlabelsMenubutton;
00221         FXMenuPane              *gslabelsMenupane;
00222         FXMenuCommand   *gslabelsMenucommand[NUM_STORED_LABELS];
00223         
00224         FXTextField     *gsxresTextfield;
00225         FXTextField     *gsyresTextfield;
00226         FXCheckButton   *gsxinterpCheckbutton;
00227         FXCheckButton   *gsyinterpCheckbutton;
00228         FXTextField     *gsxmajortickTextfield;
00229         FXCheckButton   *gsxmajorgridCheckbutton;
00230         FXColorWell     *gsxmajorcolColourwell;
00231         FXTextField     *gsxminortickTextfield;
00232         FXCheckButton   *gsxminorgridCheckbutton;
00233         FXColorWell     *gsxminorcolColourwell;
00234         FXTextField     *gsymajortickTextfield;
00235         FXCheckButton   *gsymajorgridCheckbutton;
00236         FXColorWell     *gsymajorcolColourwell;
00237         FXTextField     *gsyminortickTextfield;
00238         FXCheckButton   *gsyminorgridCheckbutton;
00239         FXColorWell     *gsyminorcolColourwell;
00240         FXGradientBar   *zgradGradient;
00241         FXTextField             *gsgradlowerTextfield;
00242         FXTextField             *gsgradmiddleTextfield;
00243         FXTextField             *gsgradupperTextfield;
00244 
00245         FXLabel                 *gsplaneLabel;
00246         FXTextField             *gspathTextfield;
00247         FXMenuButton    *gspathkeysMenubutton;
00248         FXButton                *gsbrowseButton;
00249         FXButton                *gssaveButton;
00250         FXCheckButton   *gsexportallCheckbutton;
00251         
00252         // Linescan tab stuff
00253         FXCheckButton   *lstitleCheckbutton;
00254         FXTextField     *lstitleTextfield;
00255         FXMenuButton    *lstitlekeysMenubutton;
00256         FXCheckButton   *lssubtitleCheckbutton;
00257         FXTextField     *lssubtitleTextfield;
00258         FXMenuButton    *lssubtitlekeysMenubutton;
00259         FXTextField             *lszmaxTextfield;
00260         FXTextField             *lszlabelTextfield;
00261         FXCheckButton   *lszlabelrotCheckbutton;
00262         FXTextField             *lszminTextfield;
00263         FXCheckButton   *lslegendCheckbutton;
00264         FXButton                *lszoombackButton;
00265         FXTextField             *lsxmaxTextfield;
00266         FXTextField             *lsxlabelTextfield;
00267         FXTextField             *lsxminTextfield;
00268         FXMenuButton    *lsgraphlabelsMenubutton;
00269         FXMenuPane              *lslabelsMenupane;
00270         FXMenuCommand   *lslabelsMenucommand[NUM_STORED_LABELS];
00271         
00272         FXTextField     *lsxresTextfield;
00273         FXTextField     *lszresTextfield;
00274         FXTextField             *lsstrokeTextfield;
00275         FXCheckButton   *lsgradientcolsCheckbutton;
00276         FXTextField     *lsxmajortickTextfield;
00277         FXCheckButton   *lsxmajorgridCheckbutton;
00278         FXColorWell     *lsxmajorcolColourwell;
00279         FXTextField     *lsxminortickTextfield;
00280         FXCheckButton   *lsxminorgridCheckbutton;
00281         FXColorWell     *lsxminorcolColourwell;
00282         FXTextField     *lszmajortickTextfield;
00283         FXCheckButton   *lszmajorgridCheckbutton;
00284         FXColorWell     *lszmajorcolColourwell;
00285         FXTextField     *lszminortickTextfield;
00286         FXCheckButton   *lszminorgridCheckbutton;
00287         FXColorWell     *lszminorcolColourwell;
00288         FXCheckButton   *lsoffsetCheckbutton;
00289         FXTextField             *lsxoffsetTextfield;
00290         FXTextField             *lszoffsetTextfield;
00291         FXCheckButton   *lsreversedrawCheckbutton;
00292         FXTextField             *lsstrideTextfield;
00293         FXIconList              *lstracesIconlist;
00294         FXColorList             *lstracesColourlist;
00295         FXColorWell             *lstracesColourwell;
00296         FXRadioButton   *lstracesRadiobutton;
00297         FXRadioButton   *lsrangeRadiobutton;
00298         FXRadioButton   *lsallRadiobutton;
00299         FXRadioButton   *lsaverageRadiobutton;
00300         FXTextField             *lstracecurrxTextfield;
00301         FXTextField             *lstracecurryTextfield;
00302         FXTextField             *lstracecurrnTextfield;
00303 
00304         FXButton                *lsexportButton;
00305         FXButton                *lsbrowseButton;
00306         FXMenuButton    *lspathkeysMenubutton;
00307         FXTextField             *lspathTextfield;
00308         FXCheckButton   *lsexportallCheckbutton;
00309         
00310         // Height map tab stuff
00311         FXTextField     *hmtitleTextfield;
00312         FXMenuButton    *hmtitlekeysMenubutton;
00313         FXTextField     *hmsubtitleTextfield;
00314         FXMenuButton    *hmsubtitlekeysMenubutton;
00315         FXTextField             *hmymaxTextfield;
00316         FXTextField             *hmylabelTextfield;
00317         FXTextField             *hmyminTextfield;
00318         FXTextField             *hmzmaxTextfield;
00319         FXTextField             *hmzlabelTextfield;
00320         FXTextField             *hmzminTextfield;
00321         FXCheckButton   *hmdrawlabelsCheckbutton;
00322         FXTextField             *hmxmaxTextfield;
00323         FXTextField             *hmxlabelTextfield;
00324         FXTextField             *hmxminTextfield;
00325         FXTextField             *hmgammaTextfield;
00326         FXCheckButton   *hmscaleCheckbutton;
00327         FXTextField     *hmxscaleTextfield;
00328         FXMenuButton    *hmgraphlabelsMenubutton;
00329         FXMenuPane              *hmlabelsMenupane;
00330         FXMenuCommand   *hmlabelsMenucommand[NUM_STORED_LABELS];
00331 
00332         FXTextField     *hmxmajortickTextfield;
00333         FXColorWell     *hmxmajorcolColourwell;
00334         FXCheckButton   *hmxmajorgridCheckbutton;
00335         FXTextField     *hmxminortickTextfield;
00336         FXColorWell     *hmxminorcolColourwell;
00337         FXCheckButton   *hmxminorgridCheckbutton;
00338         FXTextField     *hmymajortickTextfield;
00339         FXColorWell     *hmymajorcolColourwell;
00340         FXCheckButton   *hmymajorgridCheckbutton;
00341         FXTextField     *hmyminortickTextfield;
00342         FXColorWell     *hmyminorcolColourwell;
00343         FXCheckButton   *hmyminorgridCheckbutton;
00344         FXCheckButton   *hmzbackgridCheckbutton;
00345         FXTextField     *hmzmajortickTextfield;
00346         FXColorWell     *hmzmajorcolColourwell;
00347         FXCheckButton   *hmzmajorgridCheckbutton;
00348         FXTextField     *hmzminortickTextfield;
00349         FXColorWell     *hmzminorcolColourwell;
00350         FXCheckButton   *hmzminorgridCheckbutton;
00351         FXCheckButton   *hmreverseCheckbutton;
00352         FXRadioButton   *hmtriRadiobutton;
00353         FXRadioButton   *hmlineRadiobutton;
00354         FXRadioButton   *hmpointRadiobutton;
00355 
00356         FXCheckButton   *hmperspectiveCheckbutton;
00357         FXTextField     *hmshininessTextfield;
00358         FXCheckButton   *hmboxCheckbutton;
00359         FXToggleButton  *hmboxTogglebutton;
00360         FXColorWell     *hmboxColourwell;
00361         FXCheckButton   *hmplateCheckbutton;
00362         FXColorWell     *hmplateColourwell;
00363         FXColorWell     *hmdiffuseColourwell;
00364         FXColorWell     *hmspecularColourwell;
00365         FXToggleButton  *hminfiniteTogglebutton;
00366         FXMenuButton    *hmpathkeysMenubutton;
00367         FXTextField     *hmpathTextfield;
00368 
00369         // Settings tab stuff
00370         FXCheckButton   *setautobinCheckbutton;
00371         FXTextField             *setbinsizeTextfield;
00372         FXCheckButton   *setautozCheckbutton;
00373         FXCheckButton   *setautoscaleCheckbutton;
00374         FXCheckButton   *setautoxscaleCheckbutton;
00375         FXCheckButton   *setflipxaxisCheckbutton;
00376         FXToggleButton  *setflipxaxisTogglebutton;
00377         FXCheckButton   *setflipyaxisCheckbutton;
00378         FXToggleButton  *setflipyaxisTogglebutton;
00379         FXCheckButton   *setautoxgridCheckbutton;
00380         FXTextField             *setautoxgridTextfield;
00381         FXCheckButton   *setautoygridCheckbutton;
00382         FXTextField             *setautoygridTextfield;
00383         FXCheckButton   *setautozgridCheckbutton;
00384         FXTextField             *setautozgridTextfield;
00385         FXCheckButton   *setredogridCheckbutton;
00386         FXCheckButton   *settranslatechCheckbutton;
00387         FXCheckButton   *setaltdifferentialCheckbutton;
00388         FXCheckButton   *setinterpCheckbutton;
00389         FXTextField             *setinterpTextfield;
00390         FXToggleButton  *setinterpTogglebutton;
00391         FXCheckButton   *setdisablehmCheckbutton;
00392         FXCheckButton   *setautolsCheckbutton;
00393         FXTextField             *sethiresTextfield;
00394         FXCheckButton   *setfocusCheckbutton;
00395 
00396         FXProgressBar   *statusProgressbar;
00397 
00398         DataWinDialog *datawin;                 ///<Colourscale window
00399         LineWinDialog *linewin;                 ///<Linescan window
00400         HeightWinDialog *heightwin;             ///<Heightmap window
00401         DrawPaletteDialog *gspalette;   ///<Colourscale window drawing palette
00402         DrawPaletteDialog *lspalette;   ///<Linescan window drawing palette
00403 
00404         GreyLabWindow() {}
00405 private:
00406         ///Data information
00407         struct
00408         {
00409                 int nsweeps;                    ///<Number of sweeps
00410                 int ncols;                              ///<Number of columns per sweep
00411                 int nsd;                                ///<Number of status data items
00412                 unsigned long npoints;  ///<Total number of datapoints
00413                 float version;                  ///<CryoMeasLV file version
00414                 char separator;                 ///<Separator character
00415                 
00416                 int stride;                             ///<Sweep stride (eg to skip up sweeps)
00417                 int ssweep;                             ///<First sweep to process
00418                 int esweep;                             ///<Last sweep to process
00419                 int nselected;                  ///<Number of sweep selected
00420 
00421                 int xcol;                               ///<Column used for x
00422                 int ycol;                               ///<SD item used for y
00423                 int zcol;                               ///<Column used for z
00424                 int yscattercol;                ///<Column used for the y scatter
00425 
00426                 int ch298;                              ///<SD item containing swept channel A
00427                 int ch299;                              ///<SD item containing swept channel B
00428         } sdinfo;       ///<Data information
00429         
00430         ///Status data structure
00431         struct statusdata
00432         {
00433                 unsigned long npoints;          ///<Number of points in the sweep
00434                 int xcol;                                       ///<X column for the sweep
00435                 double *item;                           ///<The status data items of the sweep
00436         } *sd;          ///<Status data
00437 
00438         double *(*rawdata);     ///<Raw loaded data
00439 #ifdef WIN32
00440         struct _stat fileinfo;  ///<Data file information
00441 #else
00442         struct stat fileinfo;   ///<Data file information
00443 #endif
00444 
00445         ///Datapoint bin structure
00446         struct point
00447         {
00448                 double data;    ///<Value at that point
00449                 int n;                  ///<Number of raw points averaged into this bin
00450         };
00451 
00452         ///Histogram'd data structure
00453         struct histdata
00454         {
00455                 unsigned long nx;               ///<x array points
00456                 unsigned long ny;               ///<y array points
00457                 int *sweep;                             ///<List sweeps used (to allow exclusion of arbitrary sweeps)
00458                 double *x;                              ///<x array point values
00459                 double *y;                              ///<y array point values
00460                 point *(*z);                    ///<Array datapoints
00461                 double *(*scattery);    ///<y value for each datapoint when scattering
00462                 double *columns;                ///<Data from the other sweep columns
00463                 bool validdata;                 ///<Is there valid data loaded?
00464         } pdata;        ///<Processed data
00465         
00466         point *gsdata;  ///<Colourscale data
00467         double *gscolumns;      ///<Data for the other measured columns cropped to the colourscale image region (equivalent to #gsdata)
00468         ///Colourscale plot information structure
00469         struct _gsinfo
00470         {
00471                 unsigned int xpixels;           ///<X image data pixels
00472                 unsigned int ypixels;           ///<Y image data pixels
00473                 int leftlegend;                         ///<Left legend width
00474                 int bottomlegend;                       ///<Bottom legend height
00475                 int rightlegend;                        ///<Right legend width
00476                 int toplegend;                          ///<Top legend height
00477                 int gradwidth;                          ///<Gradient width
00478                 unsigned int totalwidth;        ///<Total image width
00479                 unsigned int totalheight;       ///<Total image height
00480                 double xstart;          ///<X axis start
00481                 double xend;            ///<Y axis end
00482                 double ystart;          ///<Y axis start
00483                 double yend;            ///<Y axis end
00484                 double zlo;                     ///<Z axis low
00485                 double zhi;                     ///<Z axis high
00486                 int xprecision;         ///<X grid precision
00487                 int yprecision;         ///<Y grid precision
00488                 int zprecision;         ///<Z grid precision
00489                 bool validdata;         ///<Is there valid processed data?
00490                 bool validimage;        ///<Is there a valid image?
00491                 enum { PDF, PS, SVG } vectorop; ///<Vector ouput format
00492                 double oldzoom[6];      ///<Previous axis zoom settings
00493         } gsinfo;               ///<Colourscale plot information
00494 
00495 
00496         point *lsdata;  ///<Linescan data
00497 //      double *lscolumns;      ///<Data from the other columns in the linescan
00498         unsigned int *lstraces; ///<List of linescans that were plotted
00499         unsigned int lsnumtraces;       ///<Number of plotted traces
00500         ///Linescan plot information structure
00501         struct _lsinfo
00502         {
00503                 unsigned int xpixels;           ///<X image data pixels
00504                 unsigned int ypixels;           ///<Y image data pixels
00505                 int leftlegend;                         ///<Left legend width
00506                 int bottomlegend;                       ///<Bottom legend height
00507                 int toplegend;                          ///<Top legend width
00508                 unsigned int totalwidth;        ///<Total image width
00509                 unsigned int totalheight;       ///<Total image height
00510                 double xstart;          ///<X axis start
00511                 double xend;            ///<X axis end
00512                 double zlo;                     ///<Z axis low
00513                 double zhi;                     ///<Z axis high
00514                 int xprecision;         ///<X grid precision
00515                 int zprecision;         ///<Z grid precision
00516                 double linescan[2];     ///<Coordinate of point selected from the colourscale
00517                 int direction;          ///<Direction to plot
00518                 bool newTrace;          ///<Add the next click as a new trace?
00519                 bool validimage;        ///<Is there a valid image?
00520                 enum { PDF, PS, SVG } vectorop; ///<Output vector format
00521                 double oldzoom[4];      ///<Axis old zoom ranges
00522         } lsinfo;               ///<Linescan plot information
00523 
00524         struct
00525         {
00526                 int xsamples;
00527                 double xstart;          ///<X axis start
00528                 double xend;            ///<X axis end
00529                 double ystart;          ///<Y axis start
00530                 double yend;            ///<Y axis end
00531                 double zlo;                     ///<Z axis low
00532                 double zhi;                     ///<Z axis high
00533                 bool validimage;        ///<Is a valid image rendered?
00534         } hminfo;               ///<Heightmap plot information
00535 
00536         struct
00537         {
00538                 double numfontscale;                    ///<Number font size ratio
00539                 double labeloffsetfraction;             ///<Fraction of one font height between labels and axis tick text
00540                 int majorticklength;                    ///<Major tick length (pixels)
00541                 int minorticklength;                    ///<Minor tick length (pixels)
00542                 int ticktextoffsetlength;               ///<Distance between ticks and labels (pixels)
00543                 int scalebargap;                                ///<Gap between graph and gradient bar (pixels)
00544                 int scalebarwidth;                              ///<Scale bar width (pixels)
00545                 int scalebarmajorticklength;    ///<Scale bar major tick length (pixels)
00546                 int scalebarminorticklength;    ///<Scale bar minor tick length (pixels)
00547                 int scaleticktextoffsetlength;  ///<Distance between labels and scale bar tick text (pixels)
00548                 double subtitleoffsetfraction;