00001
00002
00003 #ifndef TessToolGUI_h
00004 #define TessToolGUI_h
00005
00006 #ifdef HAVE_CONFIG_H
00007 # include <config.h>
00008 #endif
00009
00010 #include <cc++/thread.h>
00011
00012 #include <gtk/gtk.h>
00013
00014 #include "interface.h"
00015 #include "support.h"
00016
00017 using namespace std;
00018 using namespace ost;
00019
00020 namespace BIE {
00021
00022 class TessToolController;
00023 class TessToolGUI;
00024
00025
00027 class TessToolGUI: public Thread {
00028 public:
00029 TessToolGUI(int argc, char *argv[], TessToolController *controller);
00030 ~TessToolGUI();
00031 void run();
00032 void updateBIEOutputView(char *txt);
00033
00034 static TessToolGUI* _gui;
00035 static char *_buffer;
00036 static int _bufferSize;
00037
00038
00039 bool scriptSent, ttRxInitialized, ttVTKInitialized;
00040 bool scalarSelected, scalarInfoSelected;
00041 bool dataFetchRequested, dataVisualized, dataStreamStarted;
00042
00043
00044 private:
00045 int _argc;
00046 char **_argv;
00047 bool _work;
00048
00049 TessToolController *_controller;
00050
00051 };
00052
00053 }
00054
00055 namespace TESSTOOL {
00056
00057 void update_bie(char *txt);
00058 void setHueLow(float l);
00059 void setHueHigh(float l);
00060 void setSaturationLow(float l);
00061 void setSaturationHigh(float l);
00062 void setValueLow(float l);
00063 void setValueHigh(float l);
00064 void setAlphaLow(float l);
00065 void setAlphaHigh(float l);
00066 void setVTKWindow(void *xid, int width, int height);
00067 void initVTK();
00068 void *getVTKRenderWindow();
00069 void *getVTKRenderer();
00070 void *getVTKCellPicker();
00071 void setScalarMean();
00072 void setScalarVariance();
00073 void setScalarMax();
00074 void setScalarMin();
00075 void setScalarMaxDifferenceModelData();
00076 void setScalarName(char *n);
00077 void setScalarInfoName(char *n);
00078 void setWorkingDirName(char *fn);
00079 void setDataFileName(char *fn);
00080 void setScriptFileName(char *fn);
00081 char *getScriptFileName();
00082 void sendScriptFile(char* filename);
00083 char *sendCommand(char* cmd, int* replySize, int *replyLines);
00084 void startCLICommandLoop();
00085 void startVTK();
00086 void updateVTK();
00087 void processData();
00088 void sampleNext();
00089 void visualize();
00090 void quitTessTool();
00091 }
00092
00093 #endif