Discrete Geometry 3D Viewer

About



The Discrete Geometry 3D Viewer (DGV) is a simple and light-weight Scientific Visualisation tool using an intuitive Graphical User Interface (GUI). The goal of the program is to allow viewing, checking and simple filtering of your data quickly. It uses OpenGL to display and write a variety of data formats:

For Users:

DGV is intended to allow the user to see their data quickily and efficiently, while enabling some minor filtering and analysis.  Images, Line plots, Surface and Volume plots are all supported. It is build on the following libraries:

DGV is designed so that one does NOT need to know 3D graphics or VTK to get visualisations. Upon loading of the data, one can apply the following operations:

For Developers:

The API provides a
simple interface to load common formats, and to visualise Blitz++ Arrays without having to know the VTK, GDCM and FFTW libraries as it wraps the main functionalities for Transforms, Surface and Volume plots. The class naming convention is "DGV" prefixed and "VTK" suffixed if the class uses the VTK library. An example of a Gaussian surface plot is the following with Blitz ++ Arrays:

  1. #include <QApplication>
  2.  
  3. #include "DGVSurfacePlotVTK.h"
  4.  
  5. const int Size = 256;
  6.  
  7. ///Prototypes
  8. Array<imageType,2> createGaussian();
  9.  
  10. int main(int argc, char *argv[])
  11. {
  12.     QApplication app(argc,argv);
  13.     DGVSurfacePlotVTK MainWindow;
  14.     Array<imageType,2> gaussian(Size,Size);
  15.  
  16.     ///Generate 2D Gaussian Function
  17.     gaussian = createGaussian();
  18.  
  19.     ///Make and show Surface plot
  20.     MainWindow.setData(gaussian); ///Assign the data
  21.     MainWindow.generatePlot(); ///Generate mesh
  22.     MainWindow.generateAxes(); ///Generate Dynamic axes
  23.  
  24.     MainWindow.show(); ///Show result
  25.  
  26.     return app.exec();
  27. }
  28.  
  29. Array<imageType,2> createGaussian()
  30. {
  31.     ///Gaussian Parameters
  32.     double amplitude = 100.0, stdDev_x = Size/2, stdDev_y = Size/2, x0 = Size/2, y0 = Size/2;
  33.     double variance_x = stdDev_x*stdDev_x, variance_y = stdDev_y*stdDev_y;
  34.  
  35.     ///Index generators/placeholder
  36.     ///These automatically run through the x, y values of the array
  37.     firstIndex x;
  38.     secondIndex y;
  39.  
  40.     Array<imageType,2> gauss(Size,Size);
  41.  
  42.     gauss = amplitude*exp( -( (x-x0)*(x-x0)/variance_x + (y-y0)*(y-y0)/variance_y ) );
  43.  
  44.     return gauss;
  45. }
  46.  

The function createGaussian with the line "gaussian = amplitude*exp( -( (x-x0)*(x-x0)/variance_x + (y-y0)*(y-y0)/variance_y ) );" defines the gaussian "exp( -(x^2+y^2) )" with the parameters given in the line above. The surface plot is done from the sebsequent four lines. All other code is standard Qt application code which can be referenced from the Qt documentation. One can see that it takes more code to generate the Gaussian!