nibrary is an evolving collection of functions designed to support research in computational neuroimaging across various imaging modalities for developing new methods, tools, and applications.
nibrary is natively supported on Linux, Windows, and macOS. nibrary can be installed with a minimal set of standard development tools.
- CMake: min v3.15.0
- OpenMP
- C/C++ Compiler: The following compilers have been tested and are known to work:
- GCC (min v9.0)
- Clang: v18.0.0 (v19 is known not to work)
- Microsoft Visual C++ (MSVC): Visual Studio 2022
To install nibrary, first clone the repository with all the submodules as shown below.
git clone --recurse-submodules https://github.com/nibrary/nibraryThen follow the instructions below to build nibrary from source for different operating systems.
Debian/Ubuntu:
sudo apt install cmake libomp-dev build-essentialFedora/CentOS/RHEL:
sudo dnf install cmake openmp-devel
sudo dnf group install "Development Tools"Arch Linux/Manjaro:
sudo pacman -S cmake openmp
sudo pacman -S base-develThe following will install a statically built library under the build-static folder using the default compiler in the system.
cd nibrary
sh build_linux.shEdit the build_linux.sh script to customize your installation.
The provided installation script for macOS, build_mac.sh, will install the dependencies, set the environment variables, compile and install nibrary under the build-static folder.
cd nibrary
sh build_macOS.shNote that nibrary requires llvm and libomp in macOS. We have successfully tested llvm v18 to build nibrary; however, compilation with the more recent version, v19, fails. The provided build script installs llvm@18 and libomp in the system. However, it does not permanently set environment variables for future use. The build_mac.sh script contains information about how to permanently set these environment variables if needed.
Edit the build_mac.sh script to customize your installation.
Install Visual Studio 2022 (other versions might work too but they have not been tested). Open command window and use the following to install a statically built library under the build-static folder:
cd nibrary
call build_win.batEdit the build_win.bat script to customize your installation.
nibrary utilizes the following third-party libraries, which are included as Git submodules and are built locally as part of the nibrary build process:
Important: These dependencies are built within the nibrary source tree and do not affect or modify your system's existing installations. They will co-exist peacefully with any previously installed versions of these libraries. You do not need to install these libraries separately.
nibrary is licensed under the BSD 3-Clause License. Third-party software included in the external directory have their own respective licenses, detailed in the external/LICENSE.md file.
© 2025 Dogu Baran Aydogan, baran.aydogan@uef.fi