Skip to content

Commit

Permalink
Merge pull request #819 from thomshaw92/add-dcm2niix
Browse files Browse the repository at this point in the history
dcm2niix container recipe
  • Loading branch information
stebo85 authored Sep 27, 2024
2 parents 39262fc + 9ab572f commit 967500e
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
23 changes: 23 additions & 0 deletions recipes/dcm2niix/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

----------------------------------
## dcm2niix/v1.0.20240202' ##
dcm2niix is designed to convert neuroimaging data from the DICOM format to the NIfTI format. This web page hosts the developmental source code - a compiled version for Linux, MacOS, and Windows of the most recent stable release is included with MRIcroGL. A full manual for this software is available in the form of a NITRC wiki.

Example:
```
./dcm2niix ./test-dicom-dir -b y
```

More documentation can be found here: (https://github.com/rordenlab/dcm2niix?tab=readme-ov-file)

To make the executables and scripts inside this container transparently available in the command line of environments where Neurocommand is installed: ml dcm2niix/v1.0.20240202

Citation:
```
Li X, Morgan PS, Ashburner J, Smith J, Rorden C (2016) The first step for neuroimaging data analysis: DICOM to NIfTI conversion. J Neurosci Methods. 264:47-56. doi: 10.1016/j.jneumeth.2016.03.001. PMID: 26945974
```

License: This software is open source. The bulk of the code is covered by the BSD license. Some units are either public domain (nifti*.*, miniz.c) or use the MIT license (ujpeg.cpp). See the license.txt file for more details.
https://github.com/rordenlab/dcm2niix/blob/master/license.txt

----------------------------------
35 changes: 35 additions & 0 deletions recipes/dcm2niix/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
set -e

export toolName='dcm2niix'
export toolVersion='v1.0.20240202'

# Don't forget to update version change in README.md!!!!!

if [ "$1" != "" ]; then
echo "Entering Debug mode"
export debug=$1
fi

source ../main_setup.sh

neurodocker generate ${neurodocker_buildMode} \
--base-image ubuntu:20.04 \
--pkg-manager apt \
--run="printf '#!/bin/bash\nls -la' > /usr/bin/ll" \
--run="chmod +x /usr/bin/ll" \
--run="mkdir -p ${mountPointList}" \
--install git wget ca-certificates pigz \
--workdir /opt/${toolName}-${toolVersion} \
--run="curl -fLO https://github.com/rordenlab/dcm2niix/releases/latest/download/dcm2niix_lnx.zip \
&& unzip dcm2niix_lnx.zip \
&& chmod a+rwx /opt/${toolName}-${toolVersion}/${toolName} \
&& rm -rf dcm2niix_lnx.zip" \
--env PATH='$PATH':/opt/${toolName}-${toolVersion} \
--env DEPLOY_PATH=/opt/${toolName}-${toolVersion} \
--copy README.md /README.md \
> ${imageName}.${neurodocker_buildExt}

if [ "$1" != "" ]; then
./../main_build.sh
fi
1 change: 1 addition & 0 deletions recipes/dcm2niix/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dcm2niix

0 comments on commit 967500e

Please sign in to comment.