Computer Assited Medical Intervention Tool Kit  version 4.1
List of all members
camitk::Core Class Reference

Core class specifies the basic static information for the CamiTK API. More...

#include <Core.h>

Static Public Member Functions

runtime directory information
static const QStringList getComponentDirectories ()
 get all the component directories. More...
 
static const QStringList getActionDirectories ()
 get all the action directories. More...
 
static const QString getTestDataDir ()
 Get a valid camitk test data directory name. More...
 
static const QStringList getInstallDirectories (QString suffix)
 get all installation directories, suffixed by the given word. More...
 
static const QString getConfig ()
 get more information about installation, etc... More...
 
static const QString getPaths ()
 get all important paths More...
 
static const QString getGlobalInstallDir ()
 get the CAMITK_DIR (where camitk-config is installed) More...
 
static const QString getUserInstallDir ()
 get the user config directory (this is the local installation directory) More...
 
static const QString getCurrentWorkingDir ()
 get the current working directory (during dev, this should be the build directory, which is an installation directory) More...
 
static const QString getBugReport ()
 get a well formed bug report with all necessary information More...
 
runtime build information

get the type of build we are running, Debug or Release

Returns
true if running in Debug, elsewhere false for Release build.
static const bool isDebugBuild ()
 

Static Public Attributes

miscallaneous utility method or variables

complete version string

static const char * version
 
static const char * shortVersion
 short version string (all in lower case, without the patch number) More...
 
static const char * soVersion
 version used for so name More...
 
static const char * debugPostfix
 debug postfix used on MSVC to distinguished between release and debug version More...
 

Detailed Description

Core class specifies the basic static information for the CamiTK API.

Extensions can only be in three different places:

Member Function Documentation

◆ getActionDirectories()

const QStringList camitk::Core::getActionDirectories ( )
static

get all the action directories.

It gets all the valid directories where components are installed, and insert them in this particular order:

  1. current working directory (build install tree)
  2. user config directory (user install tree)
  3. CamiTK SDK installation directory (global install tree)

References getInstallDirectories(), and shortVersion.

Referenced by camitk::ExtensionManager::autoload(), getPaths(), and camitk::SettingsDialog::on_addActionExtensionButton_released().

◆ getBugReport()

const QString camitk::Core::getBugReport ( )
static

get a well formed bug report with all necessary information

References getConfig().

Referenced by main(), and GenerateBugReportProcess::run().

◆ getComponentDirectories()

const QStringList camitk::Core::getComponentDirectories ( )
static

get all the component directories.

It gets all the valid directories where components are installed, and insert them in this particular order:

  1. current working directory (build install tree)
  2. user config directory (user install tree)
  3. CamiTK SDK installation directory (global install tree)

References getInstallDirectories(), and shortVersion.

Referenced by camitk::ExtensionManager::autoload(), getPaths(), camitk::SettingsDialog::on_addComponentExtensionButton_released(), camitk::Application::open(), camitk::Application::openDirectory(), and camitk::Application::save().

◆ getConfig()

const QString camitk::Core::getConfig ( )
static

◆ getCurrentWorkingDir()

const QString camitk::Core::getCurrentWorkingDir ( )
static

get the current working directory (during dev, this should be the build directory, which is an installation directory)

Referenced by getConfig(), getInstallDirectories(), getPaths(), camitk::ExtensionManager::initPrivateLibDirs(), and camitk::Application::saveHistoryAsSXML().

◆ getGlobalInstallDir()

const QString camitk::Core::getGlobalInstallDir ( )
static

◆ getInstallDirectories()

const QStringList camitk::Core::getInstallDirectories ( QString  suffix)
static

get all installation directories, suffixed by the given word.

All the returned Strings are unique valid directories, sorted in this particular order:

  1. current working directory (build install tree)
  2. user config directory (user install tree)
  3. CamiTK SDK installation directory (global install tree)

References getCurrentWorkingDir(), getGlobalInstallDir(), and getUserInstallDir().

Referenced by getActionDirectories(), getComponentDirectories(), and getTestDataDir().

◆ getPaths()

const QString camitk::Core::getPaths ( )
static

◆ getTestDataDir()

const QString camitk::Core::getTestDataDir ( )
static

Get a valid camitk test data directory name.

It returns the first valid test data directory that is found. Checking is done in this particular order:

  1. current working directory (build install tree)
  2. user config directory (user install tree)
  3. CamiTK SDK installation directory (global install tree)

If none of this three directories is valid, return user's home directory.

A test data directory is valid if it exists and contains a least one file.

Returns
a null QString, checkable with isNull(), if no test data directory found

References getInstallDirectories(), and shortVersion.

Referenced by camitk::Application::Application(), and getPaths().

◆ getUserInstallDir()

const QString camitk::Core::getUserInstallDir ( )
static

get the user config directory (this is the local installation directory)

References camitk::Application::getSettings().

Referenced by getConfig(), getGlobalInstallDir(), getInstallDirectories(), getPaths(), and camitk::ExtensionManager::initPrivateLibDirs().

◆ isDebugBuild()

const bool camitk::Core::isDebugBuild ( )
static

Member Data Documentation

◆ debugPostfix

const char* camitk::Core::debugPostfix
static

debug postfix used on MSVC to distinguished between release and debug version

Referenced by camitk::ExtensionManager::getExtensionFilter(), and camitk::ExtensionManager::getPluginFileNames().

◆ shortVersion

const char* camitk::Core::shortVersion
static

◆ soVersion

const char* camitk::Core::soVersion
static

version used for so name

Referenced by camitk::ExtensionManager::getExtensionFilter(), and getPaths().

◆ version

const char* camitk::Core::version
static

The documentation for this class was generated from the following files: