3 CASToR installation
CASToR source code is available on the CASToR website at castor-project.org, once you complete
the short registration form (castor-project.org/form/castor-registration-form). Do not hesitate to
subscribe to the mailing-list in order to receive information about new versions of the platform and
follow the CASToR community. In addition, if you are interested in contributing as a developer
in the CASToR platform, please fill in the required fields in the subscription form. Once the
CASToR collaboration will be ready to open the project for external contributions, you will be
contacted with details on how to proceed. In the meantime, if you already developed something
that may be interesting for others, please let us know on the mailing list.
3.1 Operating systems: 32 bits VS 64 bits
If run on 64 bits systems, any datafile can be read and used whatever its size, even if its size exceeds
the size of the memory, thanks to datafile mapping. However, if run on 32 bits systems, it is not
possible to process datafiles bigger than 2 GB, whatever the size of the memory.
3.2 Computation and data precision
In CASToR, the precision of floating point numbers can be customized. This is implemented through
the use of macro definitions interpreted by the pre-processor of the compiler, defining the type of
different variables throughout the code, as follows:
FLTNB: General floating-point precision (input/intermediary/output image matrices and some
floating point operations).
HPFLTNB: Higher floating-point precision for sensitive computations that require at least
double precision (projector implementation, random number generators, etc).
FLTNBDATA: Precision of the floating point variables read or written into CASToR datafiles.
FLTNBLUT: Precision of the floating point variables read or written into CASToR scanner
LUT elements.
The types of these macros are defined in the include/management/gVariables.hh and are all set
to float simple precision by default expect for HPFLTNB which is set to double precision. They can
be changed to double or long double precision as desired, assuming that the operating system and
the compiler are both able to take these types into account (see https://en.wikipedia.org/wiki/
Long_double). When any of these definitions is changed, the code needs to be entirely recompiled.
Note also that the memory requirements of the CASToR program will double with the use of double
precision compared to float precision.
3.3 CASToR configuration folder
The CASToR programs may use a bunch of configuration files, for scanners, default module’s con-
figurations, isotopes database, etc. In the CASToR source tree, there is a folder named config, which
contains all these configuration files. For instance, a datafile is linked to a scanner description; this
scanner description, either based on a geometrical file or a LUT file (see section 5), is located in
the config/scanner sub-folder. There is also one sub-folder per type of modules (e.g. projector,
convolver, etc). And finally, there is a config/misc folder containing miscellaneous configuration
files, such as isotopes’ database with their associated half-life and branching ratio.
When running CASToR, the configuration folder is localized by the CASTOR CONFIG envi-
ronment variable. If the code was compiled using the CMake tools (see sub-sections 3.4.2 and 3.5.1),
this variable has been hard-linked to the executable during the compilation. If the code was com-
piled using the provided Makefile (see sub-section 3.4.1), this variable is read dynamically from the
CASTOR CONFIG environment variable; so this variable must exist during run-time and point to
the absolute path of the config directory. If the code is cross-compiled from a 64-bits Unix system
9