Shapeworks Studio  2.1
Shape analysis software suite
main.cc
1 #include <QApplication>
2 #include <QResource>
3 #include <Visualization/ShapeWorksStudioApp.h>
4 #include <iostream>
5 
6 #include <itkMacro.h>
7 
8 int main(int argc, char** argv) {
9  try {
10 
11  std::cerr << "ShapeWorksStudio initializing...\n";
12 
13  QApplication app(argc, argv);
14 
15  QSharedPointer<ShapeWorksStudioApp> studio_app =
16  QSharedPointer<ShapeWorksStudioApp>(new ShapeWorksStudioApp(argc, argv));
17  QResource::registerResource(RSCS_FILE);
18  studio_app->setWindowIcon(QIcon(ICON_FILE));
19  studio_app->show();
20 
21  // do this after "show" for mac initialization
22  studio_app->initialize_vtk();
23 
24  QStringList files;
25 
26  if (argc == 2) {
27  studio_app->open_project(QString(argv[1]));
28  }
29  return app.exec();
30  } catch (itk::ExceptionObject & excep) {
31  std::cerr << excep << std::endl;
32  } catch (std::exception e) {
33  std::cerr << "Exception caught!" << std::endl;
34  std::cerr << e.what() << "\n";
35  }
36 }
Main ShapeWorksStudio window.