help > Running error
Showing 1-7 of 7 posts
Results per page:
May 2, 2023  05:05 AM | Du Wang
Running error
Hi, I got following error when running mri_reface (V. 0.3.2):

$ sudo ./mri_reface ~/De-facing/Nifti/Test001.nii ~/ De-facing/Nifti/ -imType CT

Error: ./mri_reface: error while loading shared libraries: cannot open shared object file: No such file or directory

However, I checked my installation and find the 

$ find / -name 2>/dev/null


I also added the installed packages to my system path viaļ¼š nano ~/.bashrc

export ANTS_PATH=/opt/ants/bin
export MCRROOT="/opt/matlab-runtime/v912"
export LD_LIBRARY_PATH=$MCRROOT/runtime/glnxa64:$MCRROOT/bin/glnxa64:$MCRROOT/sys/os/glnxa64:$LD_LIBRARY_PATH
export PATH="/opt/mri_reface:$PATH"

I'm using:

Ubuntu 20.04.5 LTS
NiftyReg Version: 1.5.76
ANTs Version: 2.4.4.post1-g3c6c8b5

Do you have any suggestions about this issue?

Thank you!
May 2, 2023  04:05 PM | Christopher Schwarz - Mayo Clinic
RE: Running error
Please try running it using ./ rather than ./mri_reface directly. This will help set up and check the environment variables for you. You also don't need to use sudo; this runs without root access.

May 2, 2023  06:05 PM | Du Wang
RE: Running error
Thank you! 

That issue was resolved by running:

MCRROOT=/opt/MatLab_Runtime/v912 ./ ~/De-facing/Nifti/Test001.nii ~/ De-facing/Nifti/ -imType CT

But I got another error about ANTs:

Error: This software requires ANTS but it\'s not installed. Aborting.

I checked that my ANTs was installed under same parent folder /opt following ANTs github guideline without error. (I also added it to my system PATH)
May 2, 2023  06:05 PM | Christopher Schwarz - Mayo Clinic
RE: Running error
It sounds like you did not correctly add ANTS to your system path. The script is calling
`command -v ANTS`
, which checks whether there is an executable program named ANTS on your system path. This is equivalent to
`which ANTS`. 

If those commands are not returning the path to your ANTS binary, then it is not correctly added to your system PATH. You need to add the location where the ANTS binary exists from your compile. Typically this is in a subfolder named Examples.

May 2, 2023  06:05 PM | Du Wang
RE: Running error
The command does return the path of ANTS

(base) upenncarina@upenncarina-OMEN-30L-Desktop-GT13-0xxx:/opt$ which antsRegistration


(base) upenncarina@upenncarina-OMEN-30L-Desktop-GT13-0xxx:/opt$ command -v ANTS


Following is how I set the path: 

export ANTSPATH=/opt/ANTs/bin


May 2, 2023  11:05 PM | Du Wang
RE: Running error
Problem solved by adding 

export ANTSPATH=/opt/ANTs/bin

inside the sh file. 

All good now. 

Appreciate your help!
May 3, 2023  05:05 PM | Du Wang
RE: Running error
Hi Chris, 

Thank you again for assist me in set up. 
I test the tool with few HN CT nii images and find some issues there.

1. Is there any way to do bath process of multiple patients? (I try to list multiple images but seems doesn't work)

2. For some cases (both nii image input and CT DICOM folder input) I got NiftyReg Error (Please see the attached screenshot)

3. The generated masks were having: Box on top of the replaced face; Mask not at correct position, Generated images are distorted at some slices 

Thank you!
Attachment: Issues.docx