diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fad8099 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,39 @@ +FROM python:3.11-slim + +LABEL maintainer="OpenNeuroPET team" +LABEL description="PET2BIDS" + +# Install system dependencies +RUN apt-get update && apt-get install -y \ + git \ + curl \ + wget \ + unzip \ + cmake \ + build-essential \ + pkg-config \ + libturbojpeg0-dev \ + libopenjp2-7-dev \ + libjpeg-dev \ + libcharls-dev \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /tmp +# Build and install dcm2niix +RUN git clone https://github.com/rordenlab/dcm2niix.git && \ + cd dcm2niix && \ + mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DZLIB_IMPLEMENTATION=Cloudflare -DUSE_JPEGLS=ON -DUSE_OPENJPEG=ON .. && \ + make && \ + make install && \ + ldconfig && \ + cd / && rm -rf /tmp/dcm2niix + +# Verify dcm2niix installation and ensure it's in PATH +RUN which dcm2niix && dcm2niix -h +ENV PATH="/usr/local/bin:${PATH}" + +WORKDIR /out +# Install pypet2bids +RUN pip install pypet2bids \ No newline at end of file diff --git a/contributors.md b/contributors.md index 79a3374..6f503ff 100644 --- a/contributors.md +++ b/contributors.md @@ -6,7 +6,8 @@ some icons needs to be added or your name is not listed, please add it. Murat Bilgel 💻 🐛 💡 Anthony Galassi 💻 📖 💬 🎨 💡 ⚠️ Melanie Ganz-Benjaminsen 🔍 💬 🤔 📋 -Gabriel Gonzalez-Escamilla 💻 ⚠️ 🐛 👀 +Gabriel Gonzalez-Escamilla 💻 ⚠️ 🐛 👀 +Rami Hamati 💻 🐛 Gitte Knudsen 💡💵 Granville Matheson 📝 🐛 ✅ Martin Norgaard 💻 💬 🤔 ⚠️ 👀 diff --git a/pypet2bids/README.md b/pypet2bids/README.md index d4ce011..d718514 100644 --- a/pypet2bids/README.md +++ b/pypet2bids/README.md @@ -77,7 +77,7 @@ make installpoetry buildpackage installpackage
Run Directly From Source -Lastly, if one wishes run pypet2bids directly from the source code in this repository or to help contribute to the python portion of this project or any of the documentation they can do so via the following options: +If one wishes run pypet2bids directly from the source code in this repository or to help contribute to the python portion of this project or any of the documentation they can do so via the following options: ```bash cd PET2BIDS/pypet2bids @@ -100,6 +100,25 @@ python dcm2niix4pet.py --help
+
+Run Using Docker +Lastly, we provide a Docker container that includes dcm2niix and pypet2bids. This can be installed using Docker. To build the docker file run: + +``` +docker build . -t openneuropet/pet2bids +``` + +Then mount and run conversions on your input folders like so: + +``` +docker run --rm -it \ +-v /path/to/dicoms:/dicoms:ro \ +-v /path/to/outputdir:/out \ +openneuropet/pet2bids dcm2niix4pet /dicoms --destination-path /out +``` +Please note the latest version of dcm2niix is pulled and installed at the time of building the Docker container. +
+ **Note:** *We recommend using dcm2niix v1.0.20220720 or newer; we rely on metadata included in these later releases. It's best to collect releases from the [rorden lab/dcm2niix/releases](https://github.com/rordenlab/dcm2niix/releases) page. We have