/neurostr

C++ Neuroanatomy library

Primary LanguageC++GNU General Public License v3.0GPL-3.0

NeuroSTR

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.

Documentation

Check out the documentation!

Dependencies

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:

Install

  1. Create a directory called build in the NeuroSTR source directory
  2. Change to build directory and run the cmake .. command to configure your build and generate the Makefile. On Windows you can do the same with the cmake-gui app.
  3. Run make from the build directory to compile the library and tools.
  4. Run make install from the build 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 binary
  • bin/ for the executables
  • include/neurostr for the library headers
  • include/ 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 directory
  • NO_INSTALL_BUNDLED If true, bundled headers are not installed
  • NO_INSTALL_RAPIDJSON If true, rapidjson headers are not installed
  • NO_INSTALL_SPDLOG If true, spdlog headers are not installed
  • NO_INSTALL_TREE If true, tree.hh header is not installed
  • NO_INSTALL_BASEN If true, basen.hhp header is not installed
  • NO_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.