No command "reg_aladin" found on host

Hi!

I’ve successfully installed Niftyreg by following this tutorial:
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftyReg_install

When I’m running it from the terminal it works without any problem. But when I try to execute it via nipype in jupyter notebook, the following error occures:

OSError: No command “reg_aladin” found on host neurodebian. Please check that the corresponding package is installed.

I’ve read that some have had similiar issues (but with FSL and MATLAB) and I’ve tried to open ancaonda navigator (from which I start jupyter notebook) from the folder where niftyreg is installed but that doesn’t work.

Here’s the code I try to execute:

from nipype.interfaces.niftyreg.reg import RegAladin
from nipype import Node, Workflow
from nipype.interfaces.io import  DataSink

reg = Node(RegAladin(), name="registration")
reg.inputs.ref_file = '/home/brain/Documents/data/iNPH/BIDS/bids_nii/sub-43/ses-1/anat/sub-43_ses-1_FLAIR.nii.gz'
reg.inputs.flo_file = '/home/brain/Documents/data/iNPH/BIDS/bids_nii/sub-43/ses-1/dwi/sub-43_ses-1_adc.nii.gz'
reg.inputs.rig_only_flag = True
reg.inputs.environ = {}

sink = Node(DataSink(base_directory = '/home/brain/Documents/inph', container= "datasink"), name="datasink")
wf_test = Workflow(name='test', base_dir = '/home/brain/Documents/inph')
wf_test.connect([(reg, sink,[('res_file','result')])
                ])

wf_test.run()

Here’s some lines from my .bashrc file:

export NIFTYREG_INSTALL=/home/brain/Downloads/nifty_reg/install
PATH=${PATH}:${NIFTYREG_INSTALL}/bin
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NIFTYREG_INSTALL}/lib
export PATH
export LD_LIBRARY_PATH

Don’t know what I did wrong the first time but solved it by adding this to the .profile file:

export NIFTYREG_INSTALL=<niftyreg_install_folder>
PATH=${PATH}:${NIFTYREG_INSTALL}/bin
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NIFTYREG_INSTALL}/lib
export PATH
export LD_LIBRARY_PATH

Hi! I am having a similar issue… What exactly did you put in <niftyreg_install_folder>? I understand it is the absolute path to the niftyreg install directory, but it is not working for me unfortunately.

Thanks!

gvfs-tree /PATH/TO/INSTALL/FOLDER/<niftyreg_install_folder>

|-- bin
|   |-- reg_aladin
|   |-- reg_average
|   |-- reg_f3d
|   |-- reg_jacobian
|   |-- reg_resample
|   |-- reg_tools
|   `-- reg_transform
|-- include
|   |-- _reg_KLdivergence.h
|   |-- _reg_ReadWriteImage.h
|   |-- _reg_aladin.cpp
|   |-- _reg_aladin.h
|   |-- _reg_blockMatching.h
|   |-- _reg_f3d.cpp
|   |-- _reg_f3d.h
|   |-- _reg_f3d2.cpp
|   |-- _reg_f3d2.h
|   |-- _reg_f3d_sym.cpp
|   |-- _reg_f3d_sym.h
|   |-- _reg_femTransformation.h
|   |-- _reg_globalTransformation.h
|   |-- _reg_localTransformation.h
|   |-- _reg_macros.h
|   |-- _reg_maths.h
|   |-- _reg_mutualinformation.h
|   |-- _reg_resampling.h
|   |-- _reg_ssd.h
|   |-- _reg_thinPlateSpline.cpp
|   |-- _reg_thinPlateSpline.h
|   |-- _reg_tools.h
|   |-- nifti1.h
|   |-- nifti1_io.h
|   |-- readpng.h
|   |-- reg_nrrd.h
|   |-- reg_png.h
|   `-- znzlib.h
`-- lib
    |-- lib_reg_KLdivergence.a
    |-- lib_reg_ReadWriteImage.a
    |-- lib_reg_aladin.so
    |-- lib_reg_blockMatching.a
    |-- lib_reg_f3d.so
    |-- lib_reg_femTransformation.a
    |-- lib_reg_globalTransformation.a
    |-- lib_reg_localTransformation.a
    |-- lib_reg_maths.a
    |-- lib_reg_mutualinformation.a
    |-- lib_reg_resampling.a
    |-- lib_reg_ssd.a
    |-- lib_reg_thinPlateSpline.so
    |-- lib_reg_tools.a
    |-- libreg_nifti.a
    |-- libreg_nrrd.a
    `-- libreg_png.a

Hope it helps!