WCHN / CTseg

Brain CT image segmentation, normalisation, skull-stripping and total brain/intracranial volume computation.
GNU General Public License v3.0
60 stars 16 forks source link

Undefined function 'spm_CTseg' #26

Open Alvi305 opened 9 months ago

Alvi305 commented 9 months ago

I am using my forked repository of the original here : https://github.com/Alvi305/CTseg/tree/master.

The change is in the # Install SPM Standalone in /opt/spm12/ section where my Dockerfile uses SPM_REVISION r7771 and specific URL to download SPM since the original one gives me the following error:

` ERROR [4/5] RUN wget --no-check-certificate --progress=bar:force -P /opt https://www.fil.ion.ucl.ac.uk/spm/do 3.3s

[4/5] RUN wget --no-check-certificate --progress=bar:force -P /opt https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/tbx/spm12_latest_tbx_Linux_R2019b.zip && unzip -q /opt/spm12_latest_tbx_Linux_R2019b.zip -d /opt && rm -f /opt/spm12_latest_tbx_Linux_R2019b.zip && /opt/spm12/spm12 function exit && chmod +x /opt/spm12/spm12: 0.434 --2023-12-31 05:18:15-- https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/tbx/spm12_latest_tbx_Linux_R2019b.zip 0.454 Resolving www.fil.ion.ucl.ac.uk (www.fil.ion.ucl.ac.uk)... 193.62.66.18 1.900 Connecting to www.fil.ion.ucl.ac.uk (www.fil.ion.ucl.ac.uk)|193.62.66.18|:443... connected. 2.428 HTTP request sent, awaiting response... 404 Not Found 3.218 2023-12-31 05:18:18 ERROR 404: Not Found. 3.218

Dockerfile:36

35 | # Also, set +x on the entrypoint for non-root container invocations 36 | RUN wget --no-check-certificate --progress=bar:force -P /opt https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/tbx/spm${SPM_VERSION}_${SPM_REVISION}_tbx_Linux_${MATLAB_VERSION}.zip \ 37 | && unzip -q /opt/spm${SPMVERSION}${SPM_REVISION}_tbxLinux${MATLAB_VERSION}.zip -d /opt \ 38 | && rm -f /opt/spm${SPMVERSION}${SPM_REVISION}_tbxLinux${MATLAB_VERSION}.zip \ 39 | && /opt/spm${SPM_VERSION}/spm${SPM_VERSION} function exit \ 40 | && chmod +x /opt/spm${SPM_VERSION}/spm${SPM_VERSION} 41 |

ERROR: failed to solve: process "/bin/sh -c wget --no-check-certificate --progress=bar:force -P /opt https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/tbx/spm${SPM_VERSION}_${SPM_REVISION}_tbx_Linux_${MATLAB_VERSION}.zip && unzip -q /opt/spm${SPMVERSION}${SPM_REVISION}_tbxLinux${MATLAB_VERSION}.zip -d /opt && rm -f /opt/spm${SPMVERSION}${SPM_REVISION}_tbxLinux${MATLAB_VERSION}.zip && /opt/spm${SPM_VERSION}/spm${SPM_VERSION} function exit && chmod +x /opt/spm${SPM_VERSION}/spm${SPM_VERSION}" did not complete successfully: exit code: 8`

Using my Dockerfile does not give the above error. However, when I try to run the spm_CTseg function using the docker command: docker run --rm -it -v C:\Braillic\CTseg:/data ubuntu:ctseg function spm_CTseg '/data/MR_Gd.nii', I get this error:

C:\Braillic\CTseg>docker run --rm -it -v "C:\Braillic\CTseg":/data ubuntu:ctseg function spm_CTseg '/data/MR_Gd.nii' SPM12, version 7771 (standalone) MATLAB, version 9.7.0.1737446 (R2019b) Update 9


/ )( ( \/ ) _ \ )_/ ) ( Statistical Parametric Mapping (/() (/\/_) SPM12 - https://www.fil.ion.ucl.ac.uk/spm/

Error using feval Undefined function 'spm_CTseg' for input arguments of type 'char'. Error in spm_standalone (line 132)

Could anyone kindly tell me how I can resolve the issue?

Thank you.

brudfors commented 9 months ago

Hello @Alvi305

I have updated the Dockerfile, can you please try again with the latest master branch?