00001
00002
00003
00004
00005
00006
00007 #ifndef BALL_VIEW_DATATYPE_STANDARDDATASETS_H
00008 #define BALL_VIEW_DATATYPE_STANDARDDATASETS_H
00009
00010 #ifndef BALL_VIEW_DATATYPE_DATASET_H
00011 # include <BALL/VIEW/DATATYPE/dataset.h>
00012 #endif
00013
00014 #ifndef BALL_DATATYPE_REGULARDATA1D_H
00015 # include <BALL/DATATYPE/regularData1D.h>
00016 #endif
00017
00018 #ifndef BALL_DATATYPE_REGULARDATA2D_H
00019 # include <BALL/DATATYPE/regularData2D.h>
00020 #endif
00021
00022 #ifndef BALL_DATATYPE_REGULARDATA3D_H
00023 # include <BALL/DATATYPE/regularData3D.h>
00024 #endif
00025
00026 #ifndef BALL_VIEW_DATATYPE_RAYTRACEABLEGRID_H
00027 # include <BALL/VIEW/DATATYPE/raytraceableGrid.h>
00028 #endif
00029
00030 #ifndef BALL_VIEW_DATATYPE_RAYTRACEABLECONTOURSURFACEDIALOG_H
00031 # include <BALL/VIEW/DIALOGS/raytraceableContourSurfaceDialog.h>
00032 #endif
00033
00034 #ifndef BALL_MATHS_VECTOR3_H
00035 # include <BALL/MATHS/vector3.h>
00036 #endif
00037
00038 namespace BALL
00039 {
00040 class TrajectoryFile;
00041 class SnapShotManager;
00042 class DockResult;
00043
00044 namespace VIEW
00045 {
00046 class ContourSurfaceDialog;
00047 class SnapshotVisualisationDialog;
00048 class FieldLinesDialog;
00049 class GridVisualizationDialog;
00050 class ColorRGBA;
00051
00052
00053 BALL_CREATE_DATASET(RegularData3D)
00054
00055
00057 class BALL_VIEW_EXPORT RegularData3DController
00058 : public DatasetController
00059 {
00060 Q_OBJECT
00061
00062 public:
00063
00064 BALL_EMBEDDABLE(RegularData3DController,DatasetController)
00065
00066
00067 RegularData3DController();
00068
00070 RegularData3DController(RegularData3DController& dc);
00071
00073 virtual ~RegularData3DController();
00074
00076 virtual bool write();
00077
00079 virtual bool write(Dataset* set, String filetype, String filename);
00080
00082 virtual Dataset* open(String filetype, String filename);
00083
00085 virtual bool createMenuEntries();
00086
00088 virtual QMenu* buildContextMenu(QTreeWidgetItem* item);
00089
00091 bool computeIsoContourSurface(Dataset& data, const ColorRGBA& color, float value);
00092
00094 Size getNextPowerOfTwo_(Size in) const;
00095
00097 bool isGridSizePowerOfTwo(const RegularData3D& grid) const;
00098
00100 RegularData3D* resizeGrid(const RegularData3D& grid);
00101
00103 RegularData3D* createHistogramGrid(const RegularData3D& grid);
00104
00106 RegularData3D* getData(Dataset* set);
00107
00108 static String type;
00109
00110 public slots:
00111
00113 bool createVectorGrid();
00114
00116 bool createRaytraceableGrid();
00117
00119 void computeIsoContourSurface();
00120
00122 void resizeGrid();
00123
00125 void createHistogramGrid();
00126
00128 void visualizeGrid();
00129
00131 void createSphere();
00132
00133 protected:
00134
00135 void deleteDataset_(Dataset* set);
00136
00137 ContourSurfaceDialog* dialog_;
00138 GridVisualizationDialog* grid_dialog_;
00139 };
00140
00141
00142 BALL_CREATE_DATASET(SnapShotManager)
00143
00144
00146 class BALL_VIEW_EXPORT TrajectoryController
00147 : public DatasetController
00148 {
00149 Q_OBJECT
00150
00151 public:
00152
00153 BALL_EMBEDDABLE(TrajectoryController,DatasetController)
00154
00155
00156 TrajectoryController();
00157
00159 TrajectoryController(TrajectoryController& dc);
00160
00162 virtual ~TrajectoryController();
00163
00165 virtual bool write(Dataset* set, String filetype, String filename);
00166
00168 virtual Dataset* open(String filetype, String filename);
00169
00171 virtual bool createMenuEntries();
00172
00174 virtual QMenu* buildContextMenu(QTreeWidgetItem* item);
00175
00177 SnapShotManager* getData(Dataset* set);
00178
00179 static String type;
00180
00181 public slots:
00182
00184 bool visualizeTrajectory();
00185
00187 bool bufferTrajectory();
00188
00189 protected:
00190 void deleteDataset_(Dataset* set);
00191
00192 SnapshotVisualisationDialog* dialog_;
00193 };
00194
00196
00197 BALL_CREATE_DATASET(DockResult)
00198
00199
00201 class BALL_VIEW_EXPORT DockResultController
00202 : public DatasetController
00203 {
00204 Q_OBJECT
00205
00206 public:
00207
00208 BALL_EMBEDDABLE(DockResultController,DatasetController)
00209
00210
00211 DockResultController();
00212
00214 DockResultController(DockResultController& dc);
00215
00217 virtual ~DockResultController();
00218
00220 virtual bool write(Dataset* set, String filetype, String filename);
00221
00223 virtual Dataset* open(String filetype, String filename);
00224
00226 virtual bool createMenuEntries();
00227
00229 virtual QMenu* buildContextMenu(QTreeWidgetItem* item);
00230
00232 DockResult* getData(Dataset* set);
00233
00234 static String type;
00235
00236 public slots:
00237
00239 void showDockResult();
00240
00242 bool saveDockTrajectory();
00243
00244 protected:
00245
00246 void deleteDataset_(Dataset* set);
00247 };
00248
00250
00251 typedef TRegularData3D<Vector3> VectorGrid;
00252
00253 BALL_CREATE_DATASET(VectorGrid)
00254
00255
00257 class BALL_VIEW_EXPORT VectorGridController
00258 : public DatasetController
00259 {
00260 Q_OBJECT
00261
00262 public:
00263
00264 BALL_EMBEDDABLE(VectorGridController,DatasetController)
00265
00266
00267 VectorGridController();
00268
00270 VectorGridController(VectorGridController& dc);
00271
00273 virtual ~VectorGridController();
00274
00276 virtual bool write(Dataset* set, String filetype, String filename);
00277
00279 virtual Dataset* open(String filetype, String filename);
00280
00282 virtual bool createMenuEntries();
00283
00285 virtual QMenu* buildContextMenu(QTreeWidgetItem* item);
00286
00288 VectorGrid* getData(Dataset* set);
00289
00290 static String type;
00291
00292 public slots:
00293
00295 bool visualizeFieldLines();
00296
00297 protected:
00298
00299 void deleteDataset_(Dataset* set);
00300
00301 FieldLinesDialog* dialog_;
00302 };
00303
00305
00306 BALL_CREATE_DATASET(RaytraceableGrid)
00307
00308
00310 class BALL_VIEW_EXPORT RaytraceableGridController
00311 : public DatasetController
00312 {
00313 Q_OBJECT
00314
00315 public:
00316
00317 BALL_EMBEDDABLE(RaytraceableGridController, DatasetController)
00318
00319
00320 RaytraceableGridController();
00321
00323 RaytraceableGridController(RaytraceableGridController& rc);
00324
00326 virtual ~RaytraceableGridController();
00327
00329 virtual bool createMenuEntries();
00330
00332 virtual bool write(Dataset* set, String filetype, String filename);
00333
00335 virtual QMenu* buildContextMenu(QTreeWidgetItem* item);
00336
00338 RaytraceableGrid* getData(Dataset* set);
00339
00340 static String type;
00341
00342 public slots:
00343
00345 void visualizeRaytraceableContourSurface();
00346
00347
00348 protected:
00349
00350 void deleteDataset_(Dataset* set);
00351 RaytraceableContourSurfaceDialog* rt_contour_surface_dialog_;
00352 };
00353
00354 }
00355 }
00356
00357 #endif // BALL_VIEW_DATATYPE_STANDARDDATASETS_H