help > Running error
Showing 1-7 of 7 posts
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: libmwlaunchermain.so: cannot open shared object file: No such file or directory
However, I checked my installation and find the libmwlaunchermain.so
$ find / -name libmwlaunchermain.so 2>/dev/null
/opt/matlab-runtime/v912/bin/glnxa64/libmwlaunchermain.so
I also added the installed packages to my system path viaļ¼ nano ~/.bashrc
export ANTS_PATH=/opt/ants/bin
export PATH=${ANTSPATH}:$PATH
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!
Du
$ sudo ./mri_reface ~/De-facing/Nifti/Test001.nii ~/ De-facing/Nifti/ -imType CT
Error: ./mri_reface: error while loading shared libraries: libmwlaunchermain.so: cannot open shared object file: No such file or directory
However, I checked my installation and find the libmwlaunchermain.so
$ find / -name libmwlaunchermain.so 2>/dev/null
/opt/matlab-runtime/v912/bin/glnxa64/libmwlaunchermain.so
I also added the installed packages to my system path viaļ¼ nano ~/.bashrc
export ANTS_PATH=/opt/ants/bin
export PATH=${ANTSPATH}:$PATH
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!
Du
May 2, 2023 04:05 PM | Christopher Schwarz - Mayo Clinic
RE: Running error
Du,
Please try running it using ./run_mri_reface.sh 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.
Chris
Please try running it using ./run_mri_reface.sh 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.
Chris
May 2, 2023 06:05 PM | Du Wang
RE: Running error
Thank you!
That issue was resolved by running:
MCRROOT=/opt/MatLab_Runtime/v912 ./run_mri_reface.sh ~/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)
That issue was resolved by running:
MCRROOT=/opt/MatLab_Runtime/v912 ./run_mri_reface.sh ~/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.
Chris
`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.
Chris
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
/opt/ANTs/bin/antsRegistration
(base) upenncarina@upenncarina-OMEN-30L-Desktop-GT13-0xxx:/opt$ command -v ANTS
/opt/ANTs/bin/ANTS
Following is how I set the path:
export ANTSPATH=/opt/ANTs/bin
export PATH=${ANTSPATH}:$PATH
Du
(base) upenncarina@upenncarina-OMEN-30L-Desktop-GT13-0xxx:/opt$ which antsRegistration
/opt/ANTs/bin/antsRegistration
(base) upenncarina@upenncarina-OMEN-30L-Desktop-GT13-0xxx:/opt$ command -v ANTS
/opt/ANTs/bin/ANTS
Following is how I set the path:
export ANTSPATH=/opt/ANTs/bin
export PATH=${ANTSPATH}:$PATH
Du
May 2, 2023 11:05 PM | Du Wang
RE: Running error
Problem solved by adding
export ANTSPATH=/opt/ANTs/bin
export PATH=${ANTSPATH}:$PATH
inside the sh file.
All good now.
Appreciate your help!
Du
export ANTSPATH=/opt/ANTs/bin
export PATH=${ANTSPATH}:$PATH
inside the sh file.
All good now.
Appreciate your help!
Du
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!
Du
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!
Du