Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 💻 💬 🤔 ⚠️ 👀
Expand Down
21 changes: 20 additions & 1 deletion pypet2bids/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ make installpoetry buildpackage installpackage
<details>
<summary>Run Directly From Source</summary>

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
Expand All @@ -100,6 +100,25 @@ python dcm2niix4pet.py --help

</details>

<details>
<summary>Run Using Docker</summary>
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.
</details>

**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
Expand Down
Loading