LogoopenSUSE Build Service > Projects
Sign Up | Log In

Discrete Geometry Viewer

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:

* PNG, TIFF, PNM (PGM etc.), BMP and JPEG images
* DICOM images with multiple slices
* VTK XML Image (VTI) format with multiple slices
* Comma Seperated Values (CSV) files
* Image Stacks (of the filename form as .pgm.# or .png.# only atm)
* GNUPlot Format (2-tuple) Files
* Blitz++ Array Format Files

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:

* Fast Fourier Transforms (FFTs) of Complex and real data.
* View complex valued data.
* View raw data of the files above through the use of tables.
* Edit the raw data, thus allowing some filtering ability.
* Surface plots of the data or results of transforms.
* Volume plots via VTI files.
* Animation of volume slices (surfaces) using surface plots.
* 1D FFTs of data in tables.
* 1D Line plots of raw data.
* Save plots as vector file formats.
* Animations of 1D plots of raw data.
* Images are viewed in a 3D scene allowing gamma control via the mouse.
* Zooming, rotation and translation of images.
* Volume and Surface plots are in full OpenGL 3D graphics.
* Arithmetic with Images as well as functions like exp and log.
* Convert images to and from the above formats.
* Histogram of images of arbitrary data ranges.
* Apply all of the above to individual slices of the data.
* Load very large files via 64-bit support.
* Memory usage is dependent only on the data being viewed, hence allowing some user control.
* Save complex valued data (in native format) for loading and display.

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:

00001 ///Code for generating a 2D Gaussian Surface and its plot
00002 #include
00004 #include "DGVSurfacePlotVTK.h"
00005 ///Use the Surface Plot class utilising VTK
00006 const int Size = 256;
00008 int main(int argc, char *argv[])
00009 {
00010 QApplication app(argc,argv);
00011 DGVSurfacePlotVTK MainWindow;
00012 Array gaussian(Size,Size);
00013 firstIndex x; //Used to run through first dimension
00014 secondIndex y; //Used to run through second dimension
00016 double amplitude = 100.0, stdDev_x = Size/2, stdDev_y = Size/2, x0 = Size/2, y0 = Size/2;
00017 double variance_x = stdDev_x*stdDev_x, variance_y = stdDev_y*stdDev_y;
00018 gaussian = amplitude*exp( -( (x-x0)*(x-x0)/variance_x + (y-y0)*(y-y0)/variance_y ) );
00020 MainWindow.setData(gaussian);
00021 MainWindow.generatePlot();
00022 MainWindow.generateAxes();
00023 MainWindow.show();
00025 return app.exec();
00026 }
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. 

Comments for home:shakes76:dgv (0)

Login required, please login or signup in order to comment