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(Dataset* set, String filetype, String filename);
00077
00079 virtual Dataset* open(String filetype, String filename);
00080
00082 virtual bool createMenuEntries();
00083
00085 virtual QMenu* buildContextMenu(QTreeWidgetItem* item);
00086
00088 bool computeIsoContourSurface(Dataset& data, const ColorRGBA& color, float value);
00089
00091 Size getNextPowerOfTwo_(Size in) const;
00092
00094 bool isGridSizePowerOfTwo(const RegularData3D& grid) const;
00095
00097 RegularData3D* resizeGrid(const RegularData3D& grid);
00098
00100 RegularData3D* createHistogramGrid(const RegularData3D& grid);
00101
00103 RegularData3D* getData(Dataset* set);
00104
00105 static String type;
00106
00107 public slots:
00108
00110 bool createVectorGrid();
00111
00113 bool createRaytraceableGrid();
00114
00116 void computeIsoContourSurface();
00117
00119 void resizeGrid();
00120
00122 void createHistogramGrid();
00123
00125 void visualizeGrid();
00126
00128 void createSphere();
00129
00130 protected:
00131
00132 void deleteDataset_(Dataset* set);
00133
00134 ContourSurfaceDialog* dialog_;
00135 GridVisualizationDialog* grid_dialog_;
00136 };
00137
00138
00139 BALL_CREATE_DATASET(SnapShotManager)
00140
00141
00143 class BALL_VIEW_EXPORT TrajectoryController
00144 : public DatasetController
00145 {
00146 Q_OBJECT
00147
00148 public:
00149
00150 BALL_EMBEDDABLE(TrajectoryController,DatasetController)
00151
00152
00153 TrajectoryController();
00154
00156 TrajectoryController(TrajectoryController& dc);
00157
00159 virtual ~TrajectoryController();
00160
00162 virtual bool write(Dataset* set, String filetype, String filename);
00163
00165 virtual Dataset* open(String filetype, String filename);
00166
00168 virtual bool createMenuEntries();
00169
00171 virtual QMenu* buildContextMenu(QTreeWidgetItem* item);
00172
00174 SnapShotManager* getData(Dataset* set);
00175
00176 static String type;
00177
00178 public slots:
00179
00181 bool visualizeTrajectory();
00182
00184 bool bufferTrajectory();
00185
00186 protected:
00187 void deleteDataset_(Dataset* set);
00188
00189 SnapshotVisualisationDialog* dialog_;
00190 };
00191
00193
00194 BALL_CREATE_DATASET(DockResult)
00195
00196
00198 class BALL_VIEW_EXPORT DockResultController
00199 : public DatasetController
00200 {
00201 Q_OBJECT
00202
00203 public:
00204
00205 BALL_EMBEDDABLE(DockResultController,DatasetController)
00206
00207
00208 DockResultController();
00209
00211 DockResultController(DockResultController& dc);
00212
00214 virtual ~DockResultController();
00215
00217 virtual bool write(Dataset* set, String filetype, String filename);
00218
00220 virtual Dataset* open(String filetype, String filename);
00221
00223 virtual bool createMenuEntries();
00224
00226 virtual QMenu* buildContextMenu(QTreeWidgetItem* item);
00227
00229 DockResult* getData(Dataset* set);
00230
00231 static String type;
00232
00233 public slots:
00234
00236 void showDockResult();
00237
00239 bool saveDockTrajectory();
00240
00241 protected:
00242
00243 void deleteDataset_(Dataset* set);
00244 };
00245
00247
00248 typedef TRegularData3D<Vector3> VectorGrid;
00249
00250 BALL_CREATE_DATASET(VectorGrid)
00251
00252
00254 class BALL_VIEW_EXPORT VectorGridController
00255 : public DatasetController
00256 {
00257 Q_OBJECT
00258
00259 public:
00260
00261 BALL_EMBEDDABLE(VectorGridController,DatasetController)
00262
00263
00264 VectorGridController();
00265
00267 VectorGridController(VectorGridController& dc);
00268
00270 virtual ~VectorGridController();
00271
00273 virtual bool write(Dataset* set, String filetype, String filename);
00274
00276 virtual Dataset* open(String filetype, String filename);
00277
00279 virtual bool createMenuEntries();
00280
00282 virtual QMenu* buildContextMenu(QTreeWidgetItem* item);
00283
00285 VectorGrid* getData(Dataset* set);
00286
00287 static String type;
00288
00289 public slots:
00290
00292 bool visualizeFieldLines();
00293
00294 protected:
00295
00296 void deleteDataset_(Dataset* set);
00297
00298 FieldLinesDialog* dialog_;
00299 };
00300
00302
00303 BALL_CREATE_DATASET(RaytraceableGrid)
00304
00305
00307 class BALL_VIEW_EXPORT RaytraceableGridController
00308 : public DatasetController
00309 {
00310 Q_OBJECT
00311
00312 public:
00313
00314 BALL_EMBEDDABLE(RaytraceableGridController, DatasetController)
00315
00316
00317 RaytraceableGridController();
00318
00320 RaytraceableGridController(RaytraceableGridController& rc);
00321
00323 virtual ~RaytraceableGridController();
00324
00326 virtual bool createMenuEntries();
00327
00329 virtual bool write(Dataset* set, String filetype, String filename);
00330
00332 virtual QMenu* buildContextMenu(QTreeWidgetItem* item);
00333
00335 RaytraceableGrid* getData(Dataset* set);
00336
00337 static String type;
00338
00339 public slots:
00340
00342 void visualizeRaytraceableContourSurface();
00343
00344
00345 protected:
00346
00347 void deleteDataset_(Dataset* set);
00348 RaytraceableContourSurfaceDialog* rt_contour_surface_dialog_;
00349 };
00350
00351 }
00352 }
00353
00354 #endif // BALL_VIEW_DATATYPE_STANDARDDATASETS_H