Coder Social home page Coder Social logo

docker-images's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-images's Issues

Issue with running deface on NIFTI images

Hello,
I was trying to run mri_deface after running DICOM to NIFTY converter. For the output of DICOM 2 NIFTY converter, I am used the argument -z y which generates a .nii.gz file as an output. However, when I try to run mri_deface over the .nii.gz files, I am getting the error GCAalloc: could not allocate nodes Cannot allocate memory
My commands.json file looks as follows:

{
    "name": "mri_deface",
    "description": "Runs MRI_Deface",
    "label": "mri_deface",
    "info-url": "https://github.com/rordenlab/dcm2niix",
    "version": "1.6",
    "schema-version": "1.0",
    "type": "docker",
    "image": "nshreyasvi/mri_deface",
    "command-line": "./mri_deface [BIDS] [OTHER_OPTIONS] talairach_mixed_with_skull.gca face.gca /input/*.nii.gz /output",
    "mounts": [
        {
            "name": "nifti-in",
            "writable": "false",
            "path": "/input"
        },
        {
            "name": "deface-out",
            "writable": "true",
            "path": "/output"
        }
    ],
    "inputs": [
        {
            "name": "bids",
            "description": "Create BIDS metadata file",
            "type": "boolean",
            "required": false,
            "default-value": false,
            "replacement-key": "[BIDS]",
            "command-line-flag": "-b",
            "true-value": "y",
            "false-value": "n"
        },
        {
            "name": "other-options",
            "description": "Other command-line flags to pass to dcm2niix",
            "type": "string",
            "required": false,
            "replacement-key": "[OTHER_OPTIONS]"
        }
    ],
    "outputs": [
        {
            "name": "deface",
            "description": "The defaced files",
            "mount": "deface-out",
            "required": "true"
        }
    ],
    "xnat": [
        {
            "name": "deface-on-scan",
            "description": "Run pydeface on a Scan",
            "label": "defacing",
            "contexts": ["xnat:imageScanData"],
            "external-inputs": [
                {
                    "name": "scan",
                    "description": "Input scan",
                    "type": "Scan",
                    "required": true,
                    "matcher": "'NIFTI' in @.resources[*].label"
                }
            ],
            "derived-inputs": [
                {
                    "name": "scan-nifti",
                    "description": "The nifti resource on the scan",
                    "type": "Resource",
                    "derived-from-wrapper-input": "scan",
                    "provides-files-for-command-mount": "nifti-in",
                    "matcher": "@.label == 'NIFTI'"
                }
            ],
            "output-handlers": [
                {
                    "name": "deface-resource",
                    "accepts-command-output": "deface",
                    "as-a-child-of-wrapper-input": "scan",
                    "type": "Resource",
                    "label": "DEFACE"
                }
            ]
        }
    ]
}

And Dockerfile looks as follows:

FROM debian:stretch

ARG DEBIAN_FRONTEND=noninteractive

#----------------------------------------------------------
# Install common dependencies and create default entrypoint
#----------------------------------------------------------
ENV LANG="en_US.UTF-8" \
    LC_ALL="C.UTF-8" \
    ND_ENTRYPOINT="/neurodocker/startup.sh"
RUN apt-get update -qq && apt-get install -yq --no-install-recommends  \
    	apt-utils bzip2 ca-certificates curl locales unzip \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
    && localedef --force --inputfile=en_US --charmap=UTF-8 C.UTF-8 \
    && chmod 777 /opt && chmod a+s /opt \
    && mkdir -p /neurodocker \
    && if [ ! -f "$ND_ENTRYPOINT" ]; then \
         echo '#!/usr/bin/env bash' >> $ND_ENTRYPOINT \
         && echo 'set +x' >> $ND_ENTRYPOINT \
         && echo 'if [ -z "$*" ]; then /usr/bin/env bash; else $*; fi' >> $ND_ENTRYPOINT; \
       fi \
    && chmod -R 777 /neurodocker && chmod a+s /neurodocker
ENTRYPOINT ["/neurodocker/startup.sh"]

USER root

RUN apt-get update -qq \
    && apt-get install -y -q --no-install-recommends git \
                                                     vim \
                                                     wget \
                                                     unzip \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN apt-get update
RUN apt-get install libgomp1
RUN wget https://surfer.nmr.mgh.harvard.edu/pub/dist/mri_deface/mri_deface_linux
RUN mv mri_deface_linux mri_deface
RUN chmod a+x mri_deface
RUN wget https://surfer.nmr.mgh.harvard.edu/pub/dist/mri_deface/talairach_mixed_with_skull.gca.gz
RUN wget https://surfer.nmr.mgh.harvard.edu/pub/dist/mri_deface/face.gca.gz
RUN gunzip talairach_mixed_with_skull.gca.gz
RUN gunzip face.gca.gz


LABEL org.nrg.commands="[{\"name\": \"mri_deface\", \"description\": \"Runs MRI_Deface\", \"label\": \"mri_deface\", \"info-url\": \"https://github.com/rordenlab/dcm2niix\", \"version\": \"1.6\", \"schema-version\": \"1.0\", \"type\": \"docker\", \"image\": \"nshreyasvi/mri_deface\", \"command-line\": \"./mri_deface [BIDS] [OTHER_OPTIONS] talairach_mixed_with_skull.gca face.gca /input/*.nii.gz /output\", \"mounts\": [{\"name\": \"nifti-in\", \"writable\": \"false\", \"path\": \"/input\"}, {\"name\": \"deface-out\", \"writable\": \"true\", \"path\": \"/output\"}], \"inputs\": [{\"name\": \"bids\", \"description\": \"Create BIDS metadata file\", \"type\": \"boolean\", \"required\": false, \"default-value\": false, \"replacement-key\": \"[BIDS]\", \"command-line-flag\": \"-b\", \"true-value\": \"y\", \"false-value\": \"n\"}, {\"name\": \"other-options\", \"description\": \"Other command-line flags to pass to dcm2niix\", \"type\": \"string\", \"required\": false, \"replacement-key\": \"[OTHER_OPTIONS]\"}], \"outputs\": [{\"name\": \"deface\", \"description\": \"The defaced files\", \"mount\": \"deface-out\", \"required\": \"true\"}], \"xnat\": [{\"name\": \"deface-on-scan\", \"description\": \"Run pydeface on a Scan\", \"label\": \"defacing\", \"contexts\": [\"xnat:imageScanData\"], \"external-inputs\": [{\"name\": \"scan\", \"description\": \"Input scan\", \"type\": \"Scan\", \"required\": true, \"matcher\": \"'NIFTI' in @.resources[*].label\"}], \"derived-inputs\": [{\"name\": \"scan-nifti\", \"description\": \"The nifti resource on the scan\", \"type\": \"Resource\", \"derived-from-wrapper-input\": \"scan\", \"provides-files-for-command-mount\": \"nifti-in\", \"matcher\": \"@.label == 'NIFTI'\"}], \"output-handlers\": [{\"name\": \"deface-resource\", \"accepts-command-output\": \"deface\", \"as-a-child-of-wrapper-input\": \"scan\", \"type\": \"Resource\", \"label\": \"DEFACE\"}]}]}]"

I would like to know what would be the cause of the error and how could I fix it?

Tutorials on usage?

Hi
wondering if there is any tutorial on how to use this container ? I have some RTSTRUCT files that I want to upload to XNAT and to be viewed in XNAT OHIF Viewer.
Thanks!

orchestration of xnat service

hey @nrgxnat-bot team! I am helping to deploy some cloud pipelines at the School of Medicine, and wanted to ask if you have documentation / examples for (likely a docker-compose) that can bring up the database, xnat service, and any dicom bits easily. From poking around your docs and repos I see the container service has modular containers to perform specific functions, and I've also found various (third party) xnat-server repos around Github, but I'm (hopefully) looking for one provided by you guys as a starting point to evaluate. As an example, here is one that deploys a database, web server, and worker. Thanks in advance!

Upgrade to Python3

Some of the docker images (and scripts used by them) still use Python 2 which is no longer supported. Maintenance wise, I would suggest porting those to Python 3.

See dcm2bids-session and xnat2bids as examples.

dcm2niix image needs to be updated badly

Could the dcm2niix image please be updated? dcm2niix has had numerous bugfixes and improvements since v1.0.20180622. For instance, we have a Prisma FIT which uses some dicom features that v1.0.20180622 can't handle, but v1.0.20211006 can.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.