Skip to content

Commit db97f9b

Browse files
committed
finalize quickshear exampel
1 parent a9197db commit db97f9b

File tree

6 files changed

+498
-11
lines changed

6 files changed

+498
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ recipes/fsl/fslinstaller.py
2121
.DS_Store
2222
.vscode/settings.json
2323
*.nii
24+
*.nii.gz
2425
*.h5

recipes/main_setup.sh

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,26 @@
44
#install neurodocker
55
#pip install --no-cache-dir https://github.com/kaczmarj/neurodocker/tarball/master --user
66

7-
# install development version
8-
yes | pip uninstall neurodocker
9-
# python -m pip install --no-cache-dir https://github.com/ReproNim/neurodocker/tarball/master --upgrade
10-
# For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
7+
# Parse command line arguments
8+
reinstall_neurodocker="true" # default value
9+
for arg in "$@"
10+
do
11+
case $arg in
12+
--reinstall_neurodocker=*)
13+
reinstall_neurodocker="${arg#*=}"
14+
shift
15+
;;
16+
esac
17+
done
1118

12-
python -m pip install --no-cache-dir git+https://github.com/ReproNim/neurodocker.git#egg=neurodocker --upgrade
19+
# Check for reinstall_neurodocker parameter
20+
if [ "$reinstall_neurodocker" = "true" ]; then
21+
# install development version
22+
yes | pip uninstall neurodocker
23+
# python -m pip install --no-cache-dir https://github.com/ReproNim/neurodocker/tarball/master --upgrade
24+
# For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
25+
python -m pip install --no-cache-dir git+https://github.com/ReproNim/neurodocker.git#egg=neurodocker --upgrade
26+
fi
1327

1428

1529
export PATH=$PATH:~/.local/bin

recipes/quickshear/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
----------------------------------
3-
## quickshear/toolVersion ##
3+
## quickshear/1.1.0 ##
44
Quickshear uses a skull stripped version of an anatomical image as a reference to deface the unaltered anatomical image.
55

66
Example:
@@ -12,7 +12,7 @@ quickshear input.nii.gz mask.nii.gz defaced.nii.gz
1212

1313
More documentation can be found here: [link_to_documentation](https://github.com/nipy/quickshear)
1414

15-
To make the executables and scripts inside this container transparently available in the command line of environments where Neurocommand is installed: ml quickshear/toolVersion
15+
To make the executables and scripts inside this container transparently available in the command line of environments where Neurocommand is installed: ml quickshear/1.1.0
1616

1717
Citation:
1818
```

recipes/quickshear/build.sh

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ if [ "$1" != "" ]; then
55
echo "Entering Debug mode"
66
export debug=$1
77
fi
8-
source ../main_setup.sh
8+
9+
source ../main_setup.sh --reinstall_neurodocker=false
10+
11+
# freesurfer/synthstrip:1.6 = Ubuntu Jammy 22.04
912

1013
neurodocker generate ${neurodocker_buildMode} \
1114
--base-image freesurfer/synthstrip:1.6 \
@@ -17,6 +20,28 @@ neurodocker generate ${neurodocker_buildMode} \
1720
--workdir /opt \
1821
--install wget git curl ca-certificates python3 python3-pip \
1922
--run="pip install quickshear==1.2.0" \
23+
--install build-essential libxslt1.1 libhdf5-103 libboost-program-options1.74.0 libpugixml1v5 vim dos2unix git cmake g++ libhdf5-dev libxml2-dev libxslt1-dev libboost-all-dev libfftw3-dev libpugixml-dev \
24+
--workdir='/opt/code' \
25+
--run='git clone https://github.com/ismrmrd/ismrmrd.git && \
26+
cd ./ismrmrd && \
27+
cmake . && \
28+
make -j $(nproc) && \
29+
make install' \
30+
--run='git clone https://github.com/ismrmrd/siemens_to_ismrmrd.git && \
31+
cd siemens_to_ismrmrd && \
32+
mkdir build && \
33+
cd build && \
34+
cmake .. && \
35+
make -j $(nproc) && \
36+
make install' \
37+
--run='pip3 install h5py ismrmrd matplotlib pydicom pynetdicom nibabel' \
38+
--run='git clone https://github.com/ismrmrd/ismrmrd-python-tools.git && \
39+
cd ismrmrd-python-tools && \
40+
pip3 install --no-cache-dir .' \
41+
--run='git clone https://github.com/kspaceKelvin/python-ismrmrd-server && \
42+
find /opt/code/python-ismrmrd-server -name "*.sh" -exec chmod +x {} \; && \
43+
find /opt/code/python-ismrmrd-server -name "*.sh" | xargs dos2unix' \
44+
--copy invertcontrast.py /opt/code/python-ismrmrd-server/invertcontrast.py \
2045
--env DEPLOY_BINS=mri_synthstrip:quickshear \
2146
--copy README.md /README.md \
2247
--entrypoint bash \

0 commit comments

Comments
 (0)