WCHN / CTseg

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

Error running CTseg in Docker #12

Closed maloneytc closed 3 years ago

maloneytc commented 3 years ago

1) correction in running the docker image should be to use ubuntu:ctseg instead of ubuntu/ctseg for the image name.

2) I had to wrap function spm_CTseg('/data/CT.nii') in double quotes to avoid getting the error: bash: syntax error near unexpected token('`

3) With the above correction implemented, when I try to run CTseg I get the following errors: docker run --rm -it -v /data/CT.nii:/data/CT.nii ubuntu:ctseg function "spm_CTseg('/data/CT.nii')"

Error using spm_cli (line 56)
Cannot find module function spm_CTseg('/data/CT.nii').

Error in spm_cli (line 56)
Error in spm_standalone (line 157)

I tried another spm function (spm_get_space) and got the same error. However, spm_get_space works if a use eval instead of function e.g. docker run --rm -it -v /data/CT.nii:/data/CT.nii ubuntu:ctseg eval "spm_get_space('/data/CT.nii')"

but when I try it with CTSeg I get:

docker run --rm -it -v /data/CT.nii:/data/CT.nii ubuntu:ctseg eval "spm_CTSeg('/data/CT.nii')"

Error using eval
Undefined function 'spm_CTSeg' for input arguments of type 'char'.
Error in spm_standalone (line 146)

Any thoughts?

maloneytc commented 3 years ago

Just realized the last error was because I was calling spm_CTSeg instead of spm_CTseg. It is now working with the docker command:

docker run --rm -it -v /data/CT.nii:/data/CT.nii ubuntu:ctseg eval "spm_CTseg('/data/CT.nii')"

gllmflndn commented 3 years ago

Thanks @maloneytc, it should also work like this:

docker run ... function spm_CTseg /data/CT.nii
brudfors commented 3 years ago

Thanks! The run command is now fixed.