This is a package of standalone layer (functional) magnetic resonance imaging (layer-fMRI) C++ programs that depends only on a C++ compiler. The purpose of this package is to provide layer-analysis software that are not (yet) included in the other major MRI analysis software.
Most essential programs (so far) are:
LN2_LAYERS
: To generate equi-distant or equi-volume layers from gray matter segmentation. (Alternative toLN_GROW_LAYERS
in older versions of LayNii).LN_LAYER_SMOOTH
: For layer-specific spatial smoothing.LN_BOCO
: BOLD correction to attain the VASO contrast with SS-SI-VASO.LN2_MULTILATERATE & LN2_PATCH_FLATTEN
: For flattening cortical chunks (see an application here)
If you use LayNii in your research please cite the following article:
- Huber, L., Poser, B. A., Bandettini, P. A., Arora, K., Wagstyl, K., Cho, S., Goense, J., Nothnagel, N., Morgan, A. T., van den Hurk, J., Mueller A. K., Reynolds, R. C., Glen, D. R., Goebel, R. W., Gulban, O. F. (2021). LayNii: A software suite for layer-fMRI. NeuroImage, 118091. https://doi.org/10.1016/j.neuroimage.2021.118091
In addition, please cite the software version of LayNii by using our Zenodo integration:
-
Choose the right version for your computer from our releases page: https://github.com/layerfMRI/LAYNII/releases
-
Unzip the downloaded zip file to a desired location (e.g.
/home/user1/LayNii
) -
Navigate to the unzipped folder in your terminal and execute a LayNii command:
cd /home/user1/LayNii
./LN2_LAYERS -h
A detailed descriptions of how to set up LayNii is provided here: https://layerfmri.com/laynii-setup/ A brief instruction is also given below.
- Download the latest release and unzip it or clone the repository with the command:
git clone --depth 1 https://github.com/layerfMRI/laynii
- Change directory to laynii folder:
cd laynii
- Compile it with:
make all
Note-1: See this comment on cross-platform compatibility.
Note-2: See this comment on makefile and compilers.
See https://hub.docker.com/repositories/layerfmri .
git clone --depth 1 https://github.com/layerfMRI/laynii
cd laynii
docker build . -t laynii:latest
The template below would map some directories on your comptuer
to the /output
and /input
inside the container.
--user "$(id -u):$(id -g)"
would ensure that the output of this docker run
is not owned by the root user (which is the default in docker).
OUPUT_DIR=FIXME
INPUT_DIR=FIXME
docker run -it --rm \
--user "$(id -u):$(id -g)" \
-v "${OUPUT_DIR}":/output \
-v "${INPUT_DIR}":/input \
laynii:latest \
laynii_command
Example to be run from the root folder of the LAYNII repository.
INPUT_DIR=${PWD}/test_data
mkdir ${PWD}/output
OUTPUT_DIR=${PWD}/output
docker run -it --rm \
-v "${OUTPUT_DIR}":/output \
-v "${INPUT_DIR}":/input \
--user "$(id -u):$(id -g)" \
laynii:latest \
LN_BOCO \
-Nulled "/input/lo_Nulled_intemp.nii" \
-BOLD "/input/lo_BOLD_intemp.nii" \
-trialBOCO 40 -shift \
-output /output/lo_BOLD
Tutorials on layering, layer-smoothing, columnar analysis are here in layerfmri blog and here in ofgulban's youtube channel. Various pipeline script in the context of LayNii see the LayNii_extras Links to instruction of the specific programs are included in the help output of the respective programs and below"
- LN2_LAYERS algorithm
- LN2_LAYERS example application
- LN2_DEVEIN
- LN_BOCO
- LN_COLUMNAR_DIST
- LN_IMAGIRO
- LN_LAYER_SMOOTH
- LN_GRADSMOOTH
- LN_GRADSMOOTH_ITER
- LN_DIRECT_SMOOTH
- LN_TEMPSMOOTH
- LN_INTPRO
- LN_MP2RAGE_DNOISE
- LN_SKEW
- LN_NOISE_KERNEL
- LN_LEAKY_LAYERS
- LN_LOITUMA
- LN_GROW_LAYERS usage
- LN_GROW_LAYERS example application
- LN_GROW_LAYERS example application
- LN_GROW_LAYERS example application
If you have any issues when using LayNii, or want to request a new feature, we are happy to see them posted on our issues page. Please employ this as your preferred method (instead of sending individual emails to the authors), since fellow researchers might have similar issues and suggestions.
- Renzo Huber
- Omer Faruk Gulban
- Remi Gau
- Alessandra Pizzuti
- Sebastian Dresbach
LayNii is licensed under BSD-3-Clause.
In order to read and write Nifti data, we have adapted code that was originally developed by the Neuroimaging Informatics Technology Initiative. We thank Bob Cox, Daniel Glen and Rick Reynolds. Between 2019-2022, Renzo Huber was supported by NWO Veni Grant in Maastricht University. Since early 2020, development and maintenance of this project is being actively supported by Brain Innovation as one of the developers (Omer Faruk Gulban) works there.