A C++ Neuroanatomy Library.
Alpha version 0.0.1
NeuroSTR is a neuroanatomy toolbox for C++. It reads and processes three-dimensional neuron reconstructions in the most common file formats and offers a huge set of functions and utilities to work with them.
NeuroSTR uses CMake as a general build tool. It requires CMake 3.2.0 or superior.
The library uses some of the C++14 standard features, so it needs a compiler with C++14 support.
Compiler | Version | Tested |
---|---|---|
g++ | >5 | Tested: 5.4.1 |
NeuroSTR also uses the following software depèndencies, some of them are header libraries bundled in the package:
Library | Version | License | Bundled | What for? |
---|---|---|---|---|
Boost | >1.62.0 | BSL-1 | No | Everything... |
Eigen3 | 3.X | MPL-2 | No | Singular value decomposition and quaternion calculation |
tree.hh | 3.1 | GPL2/3 | Yes | Neurite tree structure container |
rapidJSON | 1.1.0 | MIT | Yes | JSON file read/write |
spdlog | 0.11.0 | MIT | Yes | Logging |
base-n | 1.0 | MIT | Yes | Write binary data (image) as base64 string |
(optional) UnitTest++ | 1.6.1 | MIT | No | Unit tests |
Specifically, these are the boost libraries used in NeuroSTR:
- Geometry (header only)
- Iterator (header only)
- Any (header only)
- Tokenizer (header only)
- Format (header only)
- Math (header only)
- Filesystem
- Program options
- Create a directory called
build
in the NeuroSTR source directory - Change to
build
directory and run thecmake ..
command to configure your build and generate the Makefile. On Windows you can do the same with the cmake-gui app. - Run
make
from thebuild
directory to compile the library and tools. - Run
make install
from thebuild
directory to install the library headers, binaries and their bundled dependencies.
Note: To speed up the compilation process you can parallelize it using the -j
flag in the make
command. For example, to use 8 parallel threads the command will be make -j 8 neurostr
The make install
command will copy the library headers, binaries and their bundled dependencies to the following directories in the install directory:
lib/neurostr/
for the library binarybin/
for the executablesinclude/neurostr
for the library headersinclude/
for the bundled headers
There are several variables that you can set while running the cmake
command to change the default install directory (/usr/local
) or to avoid installing the bundled libraries or the executables:
CMAKE_INSTALL_PREFIX
Default install directoryNO_INSTALL_BUNDLED
If true, bundled headers are not installedNO_INSTALL_RAPIDJSON
If true, rapidjson headers are not installedNO_INSTALL_SPDLOG
If true, spdlog headers are not installedNO_INSTALL_TREE
If true, tree.hh header is not installedNO_INSTALL_BASEN
If true, basen.hhp header is not installedNO_INSTALL_TOOLS
If true, executables are not installed
For example, this will install the library but not the tools at /home/cig/local
:
cmake -DCMAKE_INSTALL_PREFIX="/home/cig/local" -DNO_INSTALL_TOOLS=true ..
Warning: You will probably need super user privileges to install the library in the default install directory.