-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #405 from Emory-HITI/dev
Some recent contributions
- Loading branch information
Showing
8 changed files
with
105 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM python:3.10.10-bullseye | ||
|
||
# download and add DCM4CHE | ||
ADD https://sourceforge.net/projects/dcm4che/files/dcm4che3/5.22.5/dcm4che-5.22.5-bin.zip/download /opt/dcm4che-5.22.5-bin.zip | ||
RUN set -eux; \ | ||
# install JRE for DCM4CHE, mailutils | ||
apt update && \ | ||
apt install -y openjdk-11-jre mailutils && \ | ||
# extract and install DCM4CHE | ||
cd /opt; \ | ||
unzip dcm4che-5.22.5-bin.zip && \ | ||
rm dcm4che-5.22.5-bin.zip; \ | ||
# create default dicom storage directory | ||
mkdir -p /opt/data/new-study | ||
|
||
COPY . /usr/src/niffler-cold-extraction | ||
WORKDIR /usr/src/niffler-cold-extraction | ||
|
||
# install required python packages | ||
RUN pip install -r requirements.txt | ||
|
||
CMD ["python", "ColdDataRetriever.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -345,3 +345,28 @@ nohup /opt/dcm4che-5.22.5/bin/movescu -c "[email protected]:104" -b "QBNIFFLE | |
|
||
If the testing with DCM4CHE as above does not work, that is an issue likely with your PACS configuration to send DICOM data to your endpoint. Please get the above to work first in that case before attempting the execution with Niffler. | ||
|
||
## Using Docker | ||
|
||
To use as a docker container, first navigate to this directory (`modules/cold-extraction`) and build the image. | ||
|
||
``` | ||
cd modules/cold-extraction | ||
docker build -t niffler/cold-extraction . | ||
``` | ||
|
||
Then, run using the image tag used above. | ||
|
||
``` | ||
docker run --network pacs_network --rm niffler/cold-extraction | ||
``` | ||
|
||
Replace `pacs_network` with the docker network where the PACS is reachable. | ||
|
||
When the configuration or system JSON, as well as the CSV files change, either rebuild the image or mount as a volume before running the container. | ||
|
||
For ease, a docker compose file is also included. After configuring the volumes, networks, and everything else on the `docker-compose.yml` file, simply run: | ||
|
||
``` | ||
docker compose up | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: '3.1' | ||
services: | ||
niffler-cold-extraction: | ||
build: . | ||
volumes: | ||
- ./config.json:/usr/src/niffler-cold-extraction/config.json | ||
- ./system.json:/usr/src/niffler-cold-extraction/system.json | ||
- ./csv/:/usr/src/niffler-cold-extraction/csv/ | ||
- ./storage:/opt/data/new-study | ||
networks: | ||
- default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
schedule | ||
pandas | ||
pynetdicom | ||
pydicom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM python:3.10.10-bullseye | ||
|
||
# install JRE for DCM4CHE | ||
RUN set -eux; \ | ||
apt update && \ | ||
apt install -y openjdk-11-jre | ||
|
||
# install DCM4CHE | ||
RUN set -eux; \ | ||
cd /opt; \ | ||
curl -L https://sourceforge.net/projects/dcm4che/files/dcm4che3/5.22.5/dcm4che-5.22.5-bin.zip/download \ | ||
-o dcm4che-5.22.5-bin.zip; \ | ||
unzip dcm4che-5.22.5-bin.zip && \ | ||
rm dcm4che-5.22.5-bin.zip | ||
|
||
COPY . /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
# install required python packages | ||
RUN pip install -r requirements.txt | ||
|
||
# create default dicom storage directory | ||
RUN mkdir /opt/niffler-dicom-root | ||
|
||
CMD ["python", "MetadataExtractor.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: '3' | ||
services: | ||
niffler-meta-extraction: | ||
build: . | ||
environment: | ||
MONGO_URI: user:password@mongo:27017 | ||
mongo: | ||
image: mongo:5.0 | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: user | ||
MONGO_INITDB_ROOT_PASSWORD: password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pymongo | ||
pydicom | ||
schedule | ||
pandas | ||
requests |