STIR 6.4.0
common.h File Reference

basic configuration include file More...

#include "stir/config.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>

Go to the source code of this file.

Namespaces

namespace  stir
 Namespace for the STIR library (and some/most of its applications)
 

Macros

#define START_NAMESPACE_STIR
 
#define END_NAMESPACE_STIR   }
 
#define USING_NAMESPACE_STIR   using namespace stir;
 
#define __OS_UNIX__
 
#define _PI   3.1415926535897932384626433832795028841971693993751058209749445923078164062
 The constant pi to high precision.
 

Functions

template<class NUMBER>
NUMBER stir::square (const NUMBER &x)
 returns the square of a number, templated.
 

Variables

constexpr double stir::speed_of_light_in_mm_per_ps = 0.299792458
 Define the speed of light in mm / ps.
 
constexpr double stir::speed_of_light_in_mm_per_ps_div2 = speed_of_light_in_mm_per_ps * 0.5
 This ratio is used often.
 

Detailed Description

basic configuration include file

Author
Kris Thielemans
Alexey Zverovich
Darren Hague
PARAPET project

This include file defines some commonly used macros, templates and functions in an attempt to smooth out some system dependencies. It also defines some functions which are used very often.

Macros and system dependencies:

  • macros for namespace support: #defines START_NAMESPACE_STIR etc.

  • preprocessor definitions which attempt to determine the operating system this is going to run on. use as "#ifdef <strong>OS_WIN</strong> ... #elif ... #endif" Possible values are OS_WIN, OS_MAC, OS_VAX, OS_UNIX The OS_UNIX case has 'subbranches'. At the moment we attempt to find out on OS_AIX, OS_SUN, OS_OSF, OS_LINUX. (If the attempts fail to determine the correct OS, you can pass the correct value as a preprocessor definition to the compiler)
  • #includes cstdio, cstdlib, cstring, cmath, cassert

stir namespace members declared here

  • const double _PI

  • inline template <class NUMBER> NUMBER square(const NUMBER &x)

stir include files included here

  • stir/config.h sets various preprocessor defines (generated from STIRConfig.in)

Macro Definition Documentation

◆ START_NAMESPACE_STIR

#define START_NAMESPACE_STIR
Value:
namespace stir \
{
Namespace for the STIR library (and some/most of its applications)
Definition General_Reconstruction.h:19