help > Error running mri_reface
Showing 1-10 of 10 posts
Jan 6, 2023 09:01 PM | David G Ellis - University of Nebraska Medical Center
Error running mri_reface
When I try to run mri_reface, I get the following error:
$ ./mri_reface ~/Downloads/CT.nii ~/Downloads/ -imType CT
-------------------------------------------------------
Running mri_reface, version 0.3
By: Christopher G. Schwarz schwarz.christopher@mayo.edu
Temp directory: /tmp/tp2b0a7f62_e01f_4f69_a895_b6b21c0d1523
Target file: /home/david/Downloads/CT.nii
Output directory: /home/david/Downloads/
Target image type: CT
Template: /home/david/.mcrCache9.4/mri_re0/images/MCALT_FaceTemplate_CT-PIB.nii
Face atlas: /home/david/.mcrCache9.4/mri_re0/images/MCALT_FaceMask.nii
I am using:
NiftyReg Version: 1.3.9
ANTs Version: v2.4.2-g6c72971
It seems that reg_aladin isn't expecting the "-omp" flag. Is there a different version of NiftyReg that I should be using?
Thanks,
David
$ ./mri_reface ~/Downloads/CT.nii ~/Downloads/ -imType CT
-------------------------------------------------------
Running mri_reface, version 0.3
By: Christopher G. Schwarz schwarz.christopher@mayo.edu
Temp directory: /tmp/tp2b0a7f62_e01f_4f69_a895_b6b21c0d1523
Target file: /home/david/Downloads/CT.nii
Output directory: /home/david/Downloads/
Target image type: CT
Template: /home/david/.mcrCache9.4/mri_re0/images/MCALT_FaceTemplate_CT-PIB.nii
Face atlas: /home/david/.mcrCache9.4/mri_re0/images/MCALT_FaceMask.nii
Calculating affine parameters to template.
This will take some time.
Error using ADIR_coreg_to_T1 (line 313)
/home/david/Apps/NiftyReg/bin/reg_aladin -source moving_CT_forCoreg.nii -target fixed_MCALT_FaceTemplate_CT-PIB.nii -aff CT_forCoreg_to_MCALT_FaceTemplate_CT-PIB_AladinAffine.txt -tmask fixed_MCALT_FaceTemplate_CT-PIB_masked_dilatedMask.nii -omp 1failed with output: Err: Parameter -omp unknown.
Error using ADIR_coreg_to_T1 (line 313)
/home/david/Apps/NiftyReg/bin/reg_aladin -source moving_CT_forCoreg.nii -target fixed_MCALT_FaceTemplate_CT-PIB.nii -aff CT_forCoreg_to_MCALT_FaceTemplate_CT-PIB_AladinAffine.txt -tmask fixed_MCALT_FaceTemplate_CT-PIB_masked_dilatedMask.nii -omp 1failed with output: Err: Parameter -omp unknown.
reg_aladin
Usage: /home/david/Apps/NiftyReg/bin/reg_aladin -ref -flo [OPTIONS].
See the help for more details (-h).
Usage: /home/david/Apps/NiftyReg/bin/reg_aladin -ref -flo [OPTIONS].
See the help for more details (-h).
Error in ADIR_ReFace (line 443)
I am using:
NiftyReg Version: 1.3.9
ANTs Version: v2.4.2-g6c72971
It seems that reg_aladin isn't expecting the "-omp" flag. Is there a different version of NiftyReg that I should be using?
Thanks,
David
Jan 7, 2023 12:01 AM | Christopher Schwarz - Mayo Clinic
Error running mri_reface
David,
You will want to compile niftyreg version 1.5 or better. Their github is he=
re https://github.com/KCL-BMEIS/niftyreg. It may be possible to get around =
the omp requirement, but failure rates with 1.3.x will be higher than with =
1.5.x.
Chris Schwarz
Jan 17, 2023 10:01 PM | David G Ellis - University of Nebraska Medical Center
RE: Error running mri_reface
Hello Chris,
Thank you for your help! I was able to build a docker image that could run mri_reface, though, it returns an error when trying to generate the face renderings. It seems like there is a problem with using matlab runtime. But I don't really care about the face renderings, so I've given up on debugging it.
I've attached the Dockerfile I created in case anyone is interested in using it. It is designed to be built within the mri_reface folder.
Thanks again,
David
Thank you for your help! I was able to build a docker image that could run mri_reface, though, it returns an error when trying to generate the face renderings. It seems like there is a problem with using matlab runtime. But I don't really care about the face renderings, so I've given up on debugging it.
I've attached the Dockerfile I created in case anyone is interested in using it. It is designed to be built within the mri_reface folder.
Thanks again,
David
Jan 18, 2023 01:01 AM | Christopher Schwarz - Mayo Clinic
RE: Error running mri_reface
David,
I'm glad you got it mostly working, although I can't seem to view your attachment. When I click the attachment, Nitrc opens a window with nothing in it but a button to close the window, and some unrelated information. Are you able to view/download your own attachment? I'm trying to figure out if the problem is with nitrc software, my downloading, or your uploading.
Thanks,
Chris
I'm glad you got it mostly working, although I can't seem to view your attachment. When I click the attachment, Nitrc opens a window with nothing in it but a button to close the window, and some unrelated information. Are you able to view/download your own attachment? I'm trying to figure out if the problem is with nitrc software, my downloading, or your uploading.
Thanks,
Chris
Jan 18, 2023 02:01 PM | David G Ellis - University of Nebraska Medical Center
RE: Error running mri_reface
Hello Chris,
I cannot access my own attachment either. I went ahead and made a GitHub repository with the Dockerfile in it here:
https://github.com/ellisdg/mri_reface_dockerfile
Best,
David
I cannot access my own attachment either. I went ahead and made a GitHub repository with the Dockerfile in it here:
https://github.com/ellisdg/mri_reface_dockerfile
Best,
David
Jan 18, 2023 03:01 PM | NITRC Moderator
RE: Error running mri_reface
Hi (on behalf of NITRC),
This does appear to be an issue with NITRC, and we're looking into it.
Until then, I've posted the data below.
This does appear to be an issue with NITRC, and we're looking into it.
Until then, I've posted the data below.
# Use Ubuntu 22.04 LTS
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND="noninteractive" \
LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8"
RUN apt-get update && \
apt-get install -y --no-install-recommends \
apt-utils \
autoconf \
build-essential \
bzip2 \
ca-certificates \
curl \
git \
libtool \
lsb-release \
netbase \
pkg-config \
xorg \
unzip \
wget \
cmake \
make \
xvfb && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Installing ANTs 2.3.3 (NeuroDocker build)
# Note: the URL says 2.3.4 but it is actually 2.3.3
ENV ANTSPATH="/opt/ants" \
PATH="/opt/ants:$PATH"
WORKDIR $ANTSPATH
RUN curl -sSL "https://dl.dropbox.com/s/gwf51ykkk5bifyj/ants-Linux-centos6_x86_64-v2.3.4.tar.gz" \
| tar -xzC $ANTSPATH --strip-components 1
# Installing niftyreg
WORKDIR "/opt"
RUN git clone https://github.com/KCL-BMEIS/niftyreg.gi...
RUN mkdir niftyreg-build
RUN cd ./niftyreg-build && cmake ../niftyreg && make
# setup niftyreg
RUN rm -rf ./niftyreg && mv ./niftyreg-build /opt/niftyreg
ENV PATH="/opt/niftyreg/reg-io:/opt/niftyreg/reg-apps:$PATH"
# Install matlab-runtime
# Modified from https://github.com/dafnifacility/matlab-...
# Install pre-requisites
RUN mkdir -p /matlab-runtime /opt/matlab-runtime/v94/archives /code/model
# Download and install Matlab runtime
RUN wget https://ssd.mathworks.com/supportfiles/d... && \
unzip MCR_R2018a_glnxa64_installer.zip && \
rm -rf MCR_R2018a_glnxa64_installer.zip && \
./install -destinationFolder /opt/matlab-runtime -agreeToLicense yes -mode silent -outputFile /log.txt $$ \
rm -rf /matlab-runtime
ENV MCRROOT=/opt/matlab-runtime/v94
# Point to the newly installed Matlab runtime binaries
ENV LD_LIBRARY_PATH $MCRROOT:$MCRROOT/runtime/glnxa64:$MCRROOT/bin/glnxa64:$MCRROOT/sys/os/glnxa64:$MCRROOT/sys/opengl/lib/glnxa64:$MCRROOT/extern/bin/glnxa64
# Add mri_reface
COPY * /opt/mri_reface/
ENV PATH="/opt/mri_reface:$PATH"
WORKDIR "/home"
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND="noninteractive" \
LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8"
RUN apt-get update && \
apt-get install -y --no-install-recommends \
apt-utils \
autoconf \
build-essential \
bzip2 \
ca-certificates \
curl \
git \
libtool \
lsb-release \
netbase \
pkg-config \
xorg \
unzip \
wget \
cmake \
make \
xvfb && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Installing ANTs 2.3.3 (NeuroDocker build)
# Note: the URL says 2.3.4 but it is actually 2.3.3
ENV ANTSPATH="/opt/ants" \
PATH="/opt/ants:$PATH"
WORKDIR $ANTSPATH
RUN curl -sSL "https://dl.dropbox.com/s/gwf51ykkk5bifyj/ants-Linux-centos6_x86_64-v2.3.4.tar.gz" \
| tar -xzC $ANTSPATH --strip-components 1
# Installing niftyreg
WORKDIR "/opt"
RUN git clone https://github.com/KCL-BMEIS/niftyreg.gi...
RUN mkdir niftyreg-build
RUN cd ./niftyreg-build && cmake ../niftyreg && make
# setup niftyreg
RUN rm -rf ./niftyreg && mv ./niftyreg-build /opt/niftyreg
ENV PATH="/opt/niftyreg/reg-io:/opt/niftyreg/reg-apps:$PATH"
# Install matlab-runtime
# Modified from https://github.com/dafnifacility/matlab-...
# Install pre-requisites
RUN mkdir -p /matlab-runtime /opt/matlab-runtime/v94/archives /code/model
# Download and install Matlab runtime
RUN wget https://ssd.mathworks.com/supportfiles/d... && \
unzip MCR_R2018a_glnxa64_installer.zip && \
rm -rf MCR_R2018a_glnxa64_installer.zip && \
./install -destinationFolder /opt/matlab-runtime -agreeToLicense yes -mode silent -outputFile /log.txt $$ \
rm -rf /matlab-runtime
ENV MCRROOT=/opt/matlab-runtime/v94
# Point to the newly installed Matlab runtime binaries
ENV LD_LIBRARY_PATH $MCRROOT:$MCRROOT/runtime/glnxa64:$MCRROOT/bin/glnxa64:$MCRROOT/sys/os/glnxa64:$MCRROOT/sys/opengl/lib/glnxa64:$MCRROOT/extern/bin/glnxa64
# Add mri_reface
COPY * /opt/mri_reface/
ENV PATH="/opt/mri_reface:$PATH"
WORKDIR "/home"
Jan 18, 2023 03:01 PM | Christopher Schwarz - Mayo Clinic
RE: Error running mri_reface
Thanks for sharing! We do plan to do this officially someday but
there are a lot of competing priorities. Your version can help
others in the meantime.
Jan 18, 2023 03:01 PM | Christopher Schwarz - Mayo Clinic
RE: Error running mri_reface
Thanks for looking into it, NITRC team!
Apr 26, 2023 09:04 PM | Christopher Schwarz - Mayo Clinic
RE: Error running mri_reface
David,
You may be interested in our new 0.3.2 release, which now has an officially supported Docker image. It took a while, but we found a way around the remder/openGL errors inside Docker. We had to create the Docker image using Matlab's own tools during the initial compile of mri_reface, and then amend that Matlab-created Dockerfile with our additional dependencies. Matlab seems to do something special with the Matlab runtime in the Docker images that it creates.
Chris
You may be interested in our new 0.3.2 release, which now has an officially supported Docker image. It took a while, but we found a way around the remder/openGL errors inside Docker. We had to create the Docker image using Matlab's own tools during the initial compile of mri_reface, and then amend that Matlab-created Dockerfile with our additional dependencies. Matlab seems to do something special with the Matlab runtime in the Docker images that it creates.
Chris
Apr 26, 2023 09:04 PM | David G Ellis - University of Nebraska Medical Center
RE: Error running mri_reface
Chris,
Thanks for letting me know!
David
Thanks for letting me know!
David