Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
MitkDiffusion.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #include <mitkBaseApplication.h>
18 
19 #include <QPixmap>
20 #include <QSplashScreen>
21 #include <QTimer>
22 #include <QVariant>
23 
24 int main(int argc, char **argv)
25 {
26  mitk::BaseApplication app(argc, argv);
27 
28  app.setSingleMode(true);
29  app.setApplicationName("MitkDiffusion");
30  app.setOrganizationName("DKFZ");
31 
32  /*
33  bool showSplashScreen(true);
34 
35  QPixmap pixmap(":/splash/splashscreen.png");
36  QSplashScreen splash(pixmap);
37  splash.setMask(pixmap.mask());
38  splash.setWindowFlags(Qt::SplashScreen | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint);
39 
40  if (showSplashScreen)
41  {
42  splash.show();
43 
44  app.sendPostedEvents();
45  app.processEvents();
46  qSafeApp.flush();
47 
48  QTimer::singleShot(4000, &splash, SLOT(close()));
49  }
50  */
51  // Preload the org.mitk.gui.qt.ext plug-in (and hence also QmitkExt) to speed
52  // up a clean-cache start. This also works around bugs in older gcc and glibc implementations,
53  // which have difficulties with multiple dynamic opening and closing of shared libraries with
54  // many global static initializers. It also helps if dependent libraries have weird static
55  // initialization methods and/or missing de-initialization code.
56  QStringList preloadLibs;
57  preloadLibs << "liborg_mitk_gui_qt_ext";
58  app.setPreloadLibraries(preloadLibs);
59 
60  // app.setProperty(mitk::BaseApplication::PROP_APPLICATION, "org.mitk.qt.diffusionimagingapp");
61  app.setProperty(mitk::BaseApplication::PROP_PRODUCT, "org.mitk.gui.qt.diffusionimagingapp.diffusion");
62 
63  // Run the workbench.
64  return app.run();
65 }
void setPreloadLibraries(const QStringList &libraryBaseNames)
int main(int argc, char **argv)
void setProperty(const QString &property, const QVariant &value)
void setOrganizationName(const QString &name)
void setSingleMode(bool singleMode)
void setApplicationName(const QString &name)