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

tests/transform/transform.cpp

Go to the documentation of this file.
00001 #include <QApplication>
00002 #include <QObject>
00003 
00004 #include "DGVImage.h"
00005 #include "DGVTransform.h"
00006 
00007 int main(int argc, char *argv[])
00008 {
00009     QApplication app(argc,argv);
00010     DGVImage Image, *Result;
00011     DGVTransform *transform;
00012     QFileDialog *fileOpener = new QFileDialog;
00013 
00014     QString filename = fileOpener->getOpenFileName(0,
00015                            QObject::tr("Select File to Open"),
00016                            ".",
00017                            QObject::tr("Images (*.png *.ppm *.pgm *.pbm *pnm *.tif *tiff *.jpeg *.jpg *.bmp)"));
00018 
00019     if(!Image.openImage(filename))
00020     {
00021         cerr << "Error Loading file" << endl;
00022         return EXIT_FAILURE;
00023     }
00024 
00025     Image.setScaledContents(true);
00026     Image.show();
00027 
00028     transform = new DGVTransform(&Image);
00029     transform->alwaysWaitTillComplete(true); 
00030     transform->frt(&Image);
00031     Result = transform->getImageResult();
00032     Result->show();
00033 
00034         return app.exec();
00035 }

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