2 //----------------------------------------------------------------------
3 // File: ann_sample.cpp
4 // Programmer: Sunil Arya and David Mount
5 // Last modified: 03/04/98 (Release 0.1)
6 // Description: Sample program for ANN
7 //----------------------------------------------------------------------
8 // Copyright (c) 1997-2005 University of Maryland and Sunil Arya and
9 // David Mount. All Rights Reserved.
11 // This software and related documentation is part of the Approximate
12 // Nearest Neighbor Library (ANN). This software is provided under
13 // the provisions of the Lesser GNU Public License (LGPL). See the
14 // file ../ReadMe.txt for further information.
16 // The University of Maryland (U.M.) and the authors make no
17 // representations about the suitability or fitness of this software for
18 // any purpose. It is provided "as is" without express or implied
20 //----------------------------------------------------------------------
22 #include "qtvtkviewerwidget.h"
23 #include <QMainWindow>
24 #include <QApplication>
32 #include "OpenImageDialog.h"
35 using namespace creaMaracasVisuKernel;
38 int main(int argc, char **argv)
47 vtkImageData* img = 0;
51 OpenImageDialog open(true);
52 img = open.getImageData();
55 std::cout << "ERROR: Image filename missing. usage qtvtkviewer <image filename>"
60 std::string inputFilename = argv[1];
64 QApplication app(argc, argv);
67 QMainWindow* mainwindow = new QMainWindow();
69 QtVTKViewerWidget *viewer = new QtVTKViewerWidget(mainwindow);
71 mainwindow-> setCentralWidget(viewer);
76 viewer->setImage(img);
77 //viewer->SetLookupTable((vtkLookupTable*)colortransfer);