• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

tests/imagevtk/imagevtk.cpp

Go to the documentation of this file.
00001 #include <QApplication>
00002 
00003 #include "DGVImageVTK.h"
00004 #include "DGVImage.h"
00005 
00006 #include "vtkImageDataGeometryFilter.h"
00007 #include "vtkWarpScalar.h"
00008 #include "vtkMergeFilter.h"
00009 #include "vtkPolyDataNormals.h"
00010 #include "vtkPolyDataMapper.h"
00011 #include "vtkActor.h"
00012 #include "vtkRenderer.h"
00013 #include "vtkRenderWindow.h"
00014 
00015 int main(int argc, char *argv[])
00016 {
00017         QApplication app(argc,argv);
00018         DGVImageVTK image;
00019 
00020         QString filename = QFileDialog::getOpenFileName(&image,
00021                            QObject::tr("Select File to Open"),
00022                            ".",
00023                            QObject::tr("Images (*.png *.pbm *.ppm *.pgm *.jpeg *.jpg *.bmp *.tiff *.tif)\nMedical Images (*.dcm *.dicom)"));
00024 
00025         if(!filename.isEmpty())
00026         {
00027                 image.openImage(filename);
00028                 image.adjustSize();
00029                 image.show();
00030 
00031                 return app.exec();
00032         }
00033         else
00034         {
00035                 cerr << "Error in Filename. Aborting." << endl;
00036                 return EXIT_FAILURE;
00037         }
00038 }

Generated on Wed Sep 8 2010 01:36:51 for DGV by  doxygen 1.7.1