Go to the documentation of this file.00001 #include <fstream>
00002 #include <QApplication>
00003
00004 #include "DGVSurfacePlotVTK.h"
00005 #include "DGVImageVTK.h"
00006
00007 #include "vtkXYPlotActor.h"
00008 #include "vtkLineSource.h"
00009 #include "vtkTransform.h"
00010 #include "vtkTransformPolyDataFilter.h"
00011 #include "vtkProbeFilter.h"
00012
00013 const int Size = 256;
00014
00015 int main(int argc, char *argv[])
00016 {
00017 QApplication app(argc,argv);
00018 DGVSurfacePlotVTK MainWindow;
00019 Array<imageType,2> gaussian(Size,Size);
00020 firstIndex x;
00021 secondIndex y;
00022 ofstream outFile("gauss.csv");
00023
00025 double amplitude = 100.0, stdDev_x = Size/2, stdDev_y = Size/2, x0 = Size/2, y0 = Size/2;
00026 double variance_x = stdDev_x*stdDev_x, variance_y = stdDev_y*stdDev_y;
00027 gaussian = amplitude*exp( -( (x-x0)*(x-x0)/variance_x + (y-y0)*(y-y0)/variance_y ) );
00028
00030 for (int j = 0; j < Size; j++)
00031 {
00032 for (int k = 0; k < Size; k ++)
00033 outFile << gaussian(j,k) << ", ";
00034 outFile << endl;
00035 }
00036 outFile.close();
00037
00039 MainWindow.setData(gaussian);
00040 MainWindow.generatePlot();
00041 MainWindow.generateAxes();
00042
00043 MainWindow.show();
00044
00045 return app.exec();
00046 }
00047