Tips & Tricks

Setup bash shell environment

Troubleshot AFNI on Mac

dyld: Library not loaded: /usr/local/lib/libgcc_s.1.dylib

Just add the following setting in .bash_profile

export DYLD_FALLBACK_LIBRARY_PATH=/path/afni

export DYLD_LIBRARY_PATH=/opt/X11/lib/flat_namespace

@update.afni.binaries -d

Install ANTs

export ANTSPATH=${HOME}/ants/bin

export PATH=${ANTSPATH}:$PATH

Compile ANTs on Mac

Speedup FSL

Install FSL or AFNI in Windows without virtual machine

sudo apt-get install libmng2

sudo ln -s /usr/lib/x86_64-linux-gnu/libmng.so.2 /usr/lib/x86_64-linux-gnu/libmng.so.1

 sudo apt-get install libjpeg-dev

sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so.8 /usr/lib/x86_64-linux-gnu/libjpeg.so.62                            

sudo /usr/local/fsl/fslpython/bin/conda install -c conda-forge fsleyes

The program 'fsleyes' received an X Window System error.

This probably reflects a bug in the program.

The error was 'GLXBadContext'.

Install ANTs

Note: Recommend to install the linux version on Windows using the WLS. That allows fully streamlined pipeline with FSL and AFNI on Windows.

export ANTSPATH=${HOME}/ants/bin  (or where you installed ANTs)

export PATH=${ANTSPATH}:$PATH

Run SPM on Matlab for Apple Silicon M1/M2

Compile with openmp support on MacOS (Apple Silicon)

cmake -D CMAKE_C_COMPILER=/opt/homebrew/opt/gcc/bin/gcc-14 -D CMAKE_CXX_COMPILER=/opt/homebrew/opt/gcc/bin/g++-14

Note: