Computer Assited Medical Intervention Tool Kit  version 5.0
Core.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2021 Univ. Grenoble Alpes, CNRS, Grenoble INP, TIMC, 38000 Grenoble, France
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 #ifndef CAMITKCORE_H
27 #define CAMITKCORE_H
28 
29 
30 
31 // -- Core stuff
32 #include "CamiTKAPI.h"
33 #include "HistoryItem.h"
34 
35 // -- Qt stuff
36 #include <QStack>
37 
38 
39 
40 namespace camitk {
73 class CAMITK_API Core {
74 public:
75 
78 
84  static const QStringList getComponentDirectories();
85 
92  static const QStringList getActionDirectories();
93 
100  static const QStringList getViewerDirectories();
101 
114  static const QString getTestDataDir();
115 
129  static const QStringList getInstallDirectories(QString suffix, bool exitOnError = true);
130 
132  static const QString getConfig();
133 
135  static const QString getPaths();
136 
138  static const QString getGlobalInstallDir();
139 
141  static const QString getUserInstallDir();
142 
144  static const QString getCurrentWorkingDir();
145 
147  static const QString getBugReport();
148 
150 
155  static const bool isDebugBuild();
157 
158 
162  static const char* version;
164  static const char* shortVersion;
166  static const char* soVersion;
168  static const char* debugPostfix;
176  static const char* libDir;
178 
179 private:
184  static const QStringList getExtensionDirectories(QString extensionType);
185 };
186 
187 }
188 
189 #endif // CAMITKCORE_H
190 
camitk::Core::shortVersion
static const char * shortVersion
short version string (all in lower case, without the patch number)
Definition: Core.h:210
camitk::Core::getGlobalInstallDir
static const QString getGlobalInstallDir()
get the CAMITK_DIR (where camitk-config is installed)
Definition: Core.cpp:376
camitk::Core::getConfig
static const QString getConfig()
get more information about installation, etc...
Definition: Core.cpp:145
CamiTKVersion.h
camitk::Core::getPaths
static const QString getPaths()
get all important paths
Definition: Core.cpp:90
CamiTKAPI.h
camitk::Application::getSettings
static QSettings & getSettings()
Get the Core wide settings.
Definition: Application.cpp:309
a
#define a
camitk::ComponentExtension
This class describes what is a generic Component extension. To add a ComponentExtension to CamiTK cor...
Definition: ComponentExtension.h:83
camitk::Core::libDir
static const char * libDir
library folder set depending on the compiler and environement choice (it could be lib/ or lib64/ on L...
Definition: Core.h:222
Action.h
camitk::Core::getViewerDirectories
static const QStringList getViewerDirectories()
get all the viewers directories.
Definition: Core.cpp:356
camitk::Core::soVersion
static const char * soVersion
version used for so name
Definition: Core.h:212
camitk::Core::getBugReport
static const QString getBugReport()
get a well formed bug report with all necessary information
Definition: Core.cpp:428
Log.h
camitk::Core::getCurrentWorkingDir
static const QString getCurrentWorkingDir()
get the current working directory (during dev, this should be the build directory,...
Definition: Core.cpp:423
camitk::Core::getTestDataDir
static const QString getTestDataDir()
Get a valid camitk test data directory name.
Definition: Core.cpp:361
camitk::ExtensionManager::getViewerExtensionsList
static const QList< ViewerExtension * > getViewerExtensionsList()
Get the list of registered ViewerExtension.
Definition: ExtensionManager.cpp:536
camitk::ComponentExtension::getFileExtensions
virtual QStringList getFileExtensions() const =0
get the list of managed extensions (each file with an extension in the list can be loaded by this Com...
camitk::Core::getUserInstallDir
static const QString getUserInstallDir()
get the user config directory (this is the local installation directory)
Definition: Core.cpp:417
camitk::Core::isDebugBuild
static const bool isDebugBuild()
Definition: Core.cpp:452
camitk::AbortException
Exception class to handle abortion in component instantiation. Particularly useful to handle construc...
Definition: AbortException.h:66
camitk::ExtensionManager::getComponentExtensionsList
static const QList< ComponentExtension * > getComponentExtensionsList()
Get the list of registered ComponentExtension.
Definition: ExtensionManager.cpp:464
camitk::Core::getInstallDirectories
static const QStringList getInstallDirectories(QString suffix, bool exitOnError=true)
get all installation directories, suffixed by the given word.
Definition: Core.cpp:303
camitk::Core::getExtensionDirectories
static const QStringList getExtensionDirectories(QString extensionType)
Used by getInstallDirectories to determine the list of extension repositories This method check both ...
Definition: Core.cpp:336
camitk::Core::getComponentDirectories
static const QStringList getComponentDirectories()
get all the component directories.
Definition: Core.cpp:351
camitk::ExtensionManager::getDataDirectoryComponentsList
static const QList< ComponentExtension * > getDataDirectoryComponentsList()
Get the list of registered ComponentExtension working on directory.
Definition: ExtensionManager.cpp:472
camitk::Application::getName
static QString getName()
get the application name
Definition: Application.cpp:203
Viewer.h
CAMITK_ERROR_ALT
#define CAMITK_ERROR_ALT(MSG)
Definition: Log.h:277
HistoryItem.h
camitk::ExtensionManager::getInstallationString
static QString getInstallationString(QString file, const QString &globalInstallDir, const QString &userInstallDir, const QString &currentWorkingDir)
Returns a three char string that corresponds to the installation directory of a given shared library.
Definition: ExtensionManager.cpp:363
camitk::Core::version
static const char * version
Definition: Core.h:208
camitk::ComponentExtension::getLocation
QString getLocation() const
get the file path (location of the .dll/.so/.dylib) of this plugin
Definition: ComponentExtension.h:143
Core.h
camitk::ExtensionManager::getActionExtensionsList
static const QList< ActionExtension * > getActionExtensionsList()
Get the list of registered ActionExtension.
Definition: ExtensionManager.cpp:498
ExtensionManager.h
camitk::Core::getActionDirectories
static const QStringList getActionDirectories()
get all the action directories.
Definition: Core.cpp:346
camitk::ComponentExtension::getName
virtual QString getName() const =0
Application.h
CAMITK_API
#define CAMITK_API
Definition: CamiTKAPI.h:49
camitk
Definition: Action.cpp:35