BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
standardDatasets.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_VIEW_DATATYPE_STANDARDDATASETS_H
6 #define BALL_VIEW_DATATYPE_STANDARDDATASETS_H
7 
8 #ifndef BALL_VIEW_DATATYPE_DATASET_H
10 #endif
11 
12 #ifndef BALL_DATATYPE_REGULARDATA1D_H
14 #endif
15 
16 #ifndef BALL_DATATYPE_REGULARDATA2D_H
18 #endif
19 
20 #ifndef BALL_DATATYPE_REGULARDATA3D_H
22 #endif
23 
24 #ifndef BALL_VIEW_DATATYPE_RAYTRACEABLEGRID_H
26 #endif
27 
28 #ifndef BALL_VIEW_DATATYPE_RAYTRACEABLECONTOURSURFACEDIALOG_H
30 #endif
31 
32 #ifndef BALL_MATHS_VECTOR3_H
33 # include <BALL/MATHS/vector3.h>
34 #endif
35 
36 #include <boost/shared_ptr.hpp>
37 
38 namespace BALL
39 {
40  class TrajectoryFile;
41  class SnapShotManager;
42  class DockResult;
43 
44  namespace VIEW
45  {
46  class ContourSurfaceDialog;
47  class SnapshotVisualisationDialog;
48  class FieldLinesDialog;
49  class GridVisualizationDialog;
50  class ColorRGBA;
51 
52 
54 
55 
58  : public DatasetController
59 {
60  Q_OBJECT
61 
62  public:
63 
64  BALL_EMBEDDABLE(RegularData3DController,DatasetController)
65 
66 
68 
71 
73  virtual ~RegularData3DController();
74 
76  virtual bool write();
77 
79  virtual bool write(Dataset* set, String filetype, String filename);
80 
82  virtual Dataset* open(String filetype, String filename);
83 
85  virtual bool createMenuEntries();
86 
88  virtual QMenu* buildContextMenu(QTreeWidgetItem* item);
89 
91  bool computeIsoContourSurface(Dataset& data, const ColorRGBA& color, float value);
92 
94  Size getNextPowerOfTwo_(Size in) const;
95 
97  bool isGridSizePowerOfTwo(const RegularData3D& grid) const;
98 
100  RegularData3D* resizeGrid(const RegularData3D& grid);
101 
103  RegularData3D* createHistogramGrid(const RegularData3D& grid);
104 
106  RegularData3D* getData(Dataset* set);
107 
108  static String type;
109 
110  public slots:
111 
113  bool createVectorGrid();
114 
116  bool createRaytraceableGrid();
117 
119  void computeIsoContourSurface();
120 
122  void resizeGrid();
123 
125  void createHistogramGrid();
126 
128  void visualizeGrid();
129 
131  void createSphere();
132 
133  protected:
134 
135  void deleteDataset_(Dataset* set);
136 
139 };
140 
141 
143 
144 
147  : public DatasetController
148 {
149  Q_OBJECT
150 
151  public:
152 
153  BALL_EMBEDDABLE(TrajectoryController,DatasetController)
154 
155 
157 
160 
162  virtual ~TrajectoryController();
163 
165  virtual bool write(Dataset* set, String filetype, String filename);
166 
168  virtual Dataset* open(String filetype, String filename);
169 
171  virtual bool createMenuEntries();
172 
174  virtual QMenu* buildContextMenu(QTreeWidgetItem* item);
175 
177  SnapShotManager* getData(Dataset* set);
178 
179  static String type;
180 
181  public slots:
182 
184  bool visualizeTrajectory();
185 
187  bool bufferTrajectory();
188 
189  protected:
190  void deleteDataset_(Dataset* set);
191 
193 };
194 
196 
198 
199 
202  : public DatasetController
203 {
204  Q_OBJECT
205 
206  public:
207 
208  BALL_EMBEDDABLE(DockResultController,DatasetController)
209 
210 
212 
215 
217  virtual ~DockResultController();
218 
220  virtual bool write(Dataset* set, String filetype, String filename);
221 
223  virtual Dataset* open(String filetype, String filename);
224 
226  virtual bool createMenuEntries();
227 
229  virtual QMenu* buildContextMenu(QTreeWidgetItem* item);
230 
232  DockResult* getData(Dataset* set);
233 
234  static String type;
235 
236  public slots:
237 
239  void showDockResult();
240 
242  bool saveDockTrajectory();
243 
244  protected:
245 
246  void deleteDataset_(Dataset* set);
247 };
248 
250 
252 
254 
255 
258  : public DatasetController
259 {
260  Q_OBJECT
261 
262  public:
263 
264  BALL_EMBEDDABLE(VectorGridController,DatasetController)
265 
266 
268 
271 
273  virtual ~VectorGridController();
274 
276  virtual bool write(Dataset* set, String filetype, String filename);
277 
279  virtual Dataset* open(String filetype, String filename);
280 
282  virtual bool createMenuEntries();
283 
285  virtual QMenu* buildContextMenu(QTreeWidgetItem* item);
286 
288  VectorGrid* getData(Dataset* set);
289 
290  static String type;
291 
292  public slots:
293 
295  bool visualizeFieldLines();
296 
297  protected:
298 
299  void deleteDataset_(Dataset* set);
300 
302 };
303 
305 
307 
308 
311  : public DatasetController
312 {
313  Q_OBJECT
314 
315  public:
316 
317  BALL_EMBEDDABLE(RaytraceableGridController, DatasetController)
318 
319 
321 
324 
326  virtual ~RaytraceableGridController();
327 
329  virtual bool createMenuEntries();
330 
332  virtual bool write(Dataset* set, String filetype, String filename);
333 
335  virtual QMenu* buildContextMenu(QTreeWidgetItem* item);
336 
338  RaytraceableGrid* getData(Dataset* set);
339 
340  static String type;
341 
342  public slots:
343 
345  void visualizeRaytraceableContourSurface();
346 
347 
348  protected:
349 
350  void deleteDataset_(Dataset* set);
352 };
353 
354  } // namespace VIEW
355 } // namespace BALL
356 
357 #endif // BALL_VIEW_DATATYPE_STANDARDDATASETS_H
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
TRegularData3D< float > RegularData3D
#define BALL_CREATE_DATASET(TYPE)
Definition: dataset.h:131
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition: embeddable.h:31
RaytraceableContourSurfaceDialog * rt_contour_surface_dialog_
HashMap< SnapShotManager *, boost::shared_ptr< SnapshotVisualisationDialog > > dialogs_per_ssm_
GridVisualizationDialog * grid_dialog_
HashMap class based on the STL map (containing serveral convenience functions)
Definition: hashMap.h:73
TRegularData3D< Vector3 > VectorGrid
BALL_VIEW_EXPORT vector< Vector3 > createSphere(Size precision)