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
buildin the NeuroSTR source directory - Change to
builddirectory 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
makefrom thebuilddirectory to compile the library and tools. - Run
make installfrom thebuilddirectory 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/neurostrfor 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_PREFIXDefault install directoryNO_INSTALL_BUNDLEDIf true, bundled headers are not installedNO_INSTALL_RAPIDJSONIf true, rapidjson headers are not installedNO_INSTALL_SPDLOGIf true, spdlog headers are not installedNO_INSTALL_TREEIf true, tree.hh header is not installedNO_INSTALL_BASENIf true, basen.hhp header is not installedNO_INSTALL_TOOLSIf 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.