CEBL  2.1
EEGInterface.hpp
Go to the documentation of this file.
1 /*
2 * CEBL : CSU EEG Brain-Computer Interface Lab
3 *
4 * Author: Jeshua Bratman - jeshuabratman@gmail.com
5 *
6 * This file is part of CEBL.
7 *
8 * CEBL is free software; you can redistribute it and/or modify it.
9 * We only ask that if you use our code that you cite the source in
10 * your project or publication.
11 *
12 * EEG Group (www.cs.colostate.edu/eeg)
13 * Department of Computer Science
14 * Colorado State University
15 *
16 */
17 
18 /* EEGInterface.hpp
19  * \author Jeshua Bratman
20  *
21  * Training and classifying graphical interface for CEBL.
22  */
23 
24 #ifndef EEGINTERFACE_H
25 #define EEGINTERFACE_H
26 #include <gtk/gtk.h>
27 #include "../../Param.hpp"
28 #include "../WidgetPanel.hpp"
29 #include "../CEBLGtkWidgetDetachable.hpp"
30 
31 //include std headers
32 #include <vector>
33 using namespace std;
34 
36 {
37  protected:
38 
39  //container to hold interface gui
40  GtkWidget *container;
41 
42  //configuration widgets
45 
46  //private methods to insert widgets into the interface
47  void packStart(GtkWidget *, bool expland, bool fill, int padding);
48  void packStart(GtkWidget *);
49  void packEnd(GtkWidget *, bool expand, bool fill, int padding);
50  void packEnd(GtkWidget *);
51 
52  //number of classes selected
54  bool train_mode;
55 
56  //background colors
57  unsigned int bg_red,bg_green,bg_blue;
58 
59  public:
60 
62  EEGInterface();
63  virtual ~EEGInterface();
64 
66  virtual std::map<std::string, CEBL::Param> getParamsList()
67  {
68  std::map<std::string, CEBL::Param> params;
69  return params;
70  }
72  virtual void setParamsList(std::map<std::string, CEBL::Param> param){}
73 
75  virtual void setNumClasses(int n) { num_classes = n; };
76 
78  //RGB should each be 32 bit unsigned integers
79  virtual void setBGColor(unsigned int red, unsigned int green, unsigned int blue){bg_red=red;bg_green=green;bg_blue=blue;}
80 
82  virtual void selectTrainingClass(int n) = 0;
83 
85  virtual void selectClass(int c) = 0;
86 
88  virtual void setClassProportions(std::vector<double> proportions) = 0;
89 
91  virtual void setClassLabels(std::vector<std::string>) = 0;
92 
94  virtual void setTrainMode() { train_mode = true; }
95 
97  virtual void setUseMode() { train_mode = false; }
98 
99 };
100 
101 #endif