Skip to content

Commit

Permalink
added skeleton for OHIF plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jodogne committed Jun 19, 2023
1 parent 6e6c105 commit 71f4cd6
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 1 deletion.
1 change: 1 addition & 0 deletions README-dockerhub.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Orthanc neuroimaging plugin 1.0
AWS S3 plugin 2.1.2
Orthanc Explorer 2 0.9.3
Kitware's VolView plugin 1.1
OHIF plugin 1.0
```

#### 23.5.1-full image
Expand Down
2 changes: 2 additions & 0 deletions WindowsInstaller/Resources/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Orthanc neuroimaging plugin 1.0
Orthanc Explorer 2 0.9.3
Azure blob storage plugin 2.1.2 (Win64 installers only !)
Kitware's VolView plugin 1.1
OHIF plugin 1.0


Folders
-------
Expand Down
26 changes: 26 additions & 0 deletions build-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,32 @@
"Resources": [
]
}]
},
{
"name": "Orthanc-ohif",
"repo": "https://orthanc.uclouvain.be/hg/orthanc-ohif/",
"repoType": "hg",
"comment": "# CHANGE_VERSION_OHIF",
"stable": "OrthancOHIF-1.0",
"unstable": "default",
"artifactsOSX": "libOrthancOHIF.dylib",
"buildForOSX": true,
"extraCMakeFlagsOSX": "-DUSE_LEGACY_BOOST=ON",
"preBuildStableOSX": "rm -rf /tmp/downloads/ && mkdir -p /tmp/downloads && wget https://orthanc.osimis.io/nightly-ohif-dist-builds/stable/dist.zip --output-document /tmp/downloads/dist.zip --quiet && mkdir -p ${GITHUB_WORKSPACE}/OHIF/dist && unzip /tmp/downloads/dist.zip -d ${GITHUB_WORKSPACE}/sources/OHIF/dist",
"preBuildUnstableOSX": "rm -rf /tmp/downloads/ && mkdir -p /tmp/downloads && wget https://orthanc.osimis.io/nightly-ohif-dist-builds/unstable/dist.zip --output-document /tmp/downloads/dist.zip --quiet && mkdir -p ${GITHUB_WORKSPACE}/OHIF/dist && unzip /tmp/downloads/dist.zip -d ${GITHUB_WORKSPACE}/sources/OHIF/dist",
"windows": [{
"Description": "OHIF plugin for Orthanc",
"Mandatory": false,
"Category": "plugins",
"Artifacts64": [
["OHIF 1.0 - LSB Release/libOrthancOHIF-Windows64.dll", "Plugins", "Comment: # CHANGE_VERSION_OHIF"]
],
"Artifacts32": [
["OHIF 1.0 - LSB Release/libOrthancOHIF-Windows32.dll", "Plugins", "Comment: # CHANGE_VERSION_OHIF"]
],
"Resources": [
]
}]
}
]

Expand Down
33 changes: 33 additions & 0 deletions docker/orthanc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,38 @@ RUN cmake -DALLOW_DOWNLOADS=ON -DCMAKE_BUILD_TYPE:STRING=Release -DUSE_SYSTEM_OR
RUN make -j 4


########################## OHIF for Orthanc

FROM node:19.7.0-bullseye-slim as build-ohif-dist

RUN apt-get -y clean && apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install mercurial wget && \
apt-get clean && rm -rf /var/lib/apt/lists/*

ARG ORTHANC_OHIF_COMMIT_ID
# CHANGE_VERSION_OHIF check version in https://orthanc.uclouvain.be/hg/orthanc-ohif/file/tip/Resources/CreateOHIFDist.sh
ARG OHIF_VERSION=3.6.0

RUN hg clone https://orthanc.uclouvain.be/hg/orthanc-ohif/ -r $ORTHANC_OHIF_COMMIT_ID /source
RUN wget https://orthanc.uclouvain.be/third-party-downloads/OHIF/Viewers-${OHIF_VERSION}.tar.gz --quiet --output-document /source/OHIF/Viewers-${OHIF_VERSION}.tar.gz

RUN mkdir /target
RUN chmod +x /source/Resources/CreateOHIFDist/build.sh
RUN /source/Resources/CreateOHIFDist/build.sh Viewers-${OHIF_VERSION}


FROM orthanc-builder-base as build-plugin-ohif

ARG ORTHANC_OHIF_COMMIT_ID
RUN hg clone https://orthanc.uclouvain.be/hg/orthanc-ohif/ -r $ORTHANC_OHIF_COMMIT_ID /sources
WORKDIR /build

COPY --from=build-ohif-dist /target/ /sources/OHIF/dist

RUN cmake -DALLOW_DOWNLOADS=ON -DCMAKE_BUILD_TYPE:STRING=Release -DUSE_SYSTEM_ORTHANC_SDK=OFF /sources
RUN make -j 4


########################## Orthanc downloads (since wget is not in the runner image)

FROM orthanc-builder-base as build-downloader
Expand Down Expand Up @@ -407,6 +439,7 @@ COPY --from=build-plugin-neuro /build/libOrthancNeuro.so /usr/share/orthanc/plug
COPY --from=build-stone-viewer /build/libStoneWebViewer.so /usr/share/orthanc/plugins-available/
COPY --from=build-oe2 /build/libOrthancExplorer2.so /usr/share/orthanc/plugins-available/
COPY --from=build-plugin-volview /build/libOrthancVolView.so /usr/share/orthanc/plugins-available/
COPY --from=build-plugin-ohif /build/libOrthancOHIF.so /usr/share/orthanc/plugins-available/

COPY --from=build-downloader /downloads/libOsimisWebViewer.so /usr/share/orthanc/plugins-available/
COPY --from=build-downloader /downloads/libOsimisWebViewerAlpha.so /usr/share/orthanc/plugins-available/
Expand Down
5 changes: 5 additions & 0 deletions docker/orthanc/plugins-def.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,10 @@
"VolView": {
"enablingEnvVar" : "VOLVIEW_PLUGIN_ENABLED",
"libs" : ["libOrthancVolView.so"]
},

"Ohif": {
"enablingEnvVar" : "OHIF_PLUGIN_ENABLED",
"libs" : ["libOrthancOHIF.so"]
}
}
4 changes: 3 additions & 1 deletion local-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ ORTHANC_AWS_STORAGE_COMMIT_ID=$(getCommitId "Orthanc-aws-storage" $version docke
ORTHANC_OE2_COMMIT_ID=$(getCommitId "Orthanc-explorer-2" $version docker $skipCommitChecks)
ORTHANC_OE2_VERSION=$(getBranchTagToBuildDocker "Orthanc-explorer-2" $version)
ORTHANC_VOLVIEW_COMMIT_ID=$(getCommitId "Orthanc-volview" $version docker $skipCommitChecks)
ORTHANC_OHIF_COMMIT_ID=$(getCommitId "Orthanc-ohif" $version docker $skipCommitChecks)

BASE_DEBIAN_IMAGE=bullseye-20230522-slim
BASE_BUILDER_IMAGE_TAG=$BASE_DEBIAN_IMAGE-$version

# list all intermediate targets. It allows us to "slow down" the build and see what's going wrong (which is not possible with 10 parallel builds)
buildTargets="build-orthanc build-gdcm build-plugin-pg build-plugin-mysql build-plugin-transfers build-plugin-dicomweb build-plugin-wsi build-plugin-owv build-plugin-auth build-plugin-python build-plugin-odbc build-plugin-indexer build-plugin-neuro build-plugin-tcia build-stone-viewer build-s3-object-storage build-oe2 build-plugin-volview"
buildTargets="build-orthanc build-gdcm build-plugin-pg build-plugin-mysql build-plugin-transfers build-plugin-dicomweb build-plugin-wsi build-plugin-owv build-plugin-auth build-plugin-python build-plugin-odbc build-plugin-indexer build-plugin-neuro build-plugin-tcia build-stone-viewer build-s3-object-storage build-oe2 build-plugin-volview build-plugin-ohif"

# by default, we try to build only the normal image (oposed to the full image with vcpkg and MSSQL drivers)
finalImageTarget=orthanc-no-vcpkg
Expand Down Expand Up @@ -242,6 +243,7 @@ for target in $buildTargets; do
--build-arg ORTHANC_OE2_COMMIT_ID=$ORTHANC_OE2_COMMIT_ID \
--build-arg ORTHANC_OE2_VERSION=$ORTHANC_OE2_VERSION \
--build-arg ORTHANC_VOLVIEW_COMMIT_ID=$ORTHANC_VOLVIEW_COMMIT_ID \
--build-arg ORTHANC_OHIF_COMMIT_ID=$ORTHANC_OHIF_COMMIT_ID \
--build-arg BASE_IMAGE_TAG=$BASE_BUILDER_IMAGE_TAG \
$from_cache_arg \
$to_cache_arg \
Expand Down
1 change: 1 addition & 0 deletions release-notes-docker-images.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ You should use the full image only if you need to use one of these:
Only the default tags are listed here. You just need to append `-full` for the full image.


- added OHIF plugin 1.0
- During startup, now performing standard env var substitution when reading the
configuration files.
23.6.0 : - POSSIBLE BREAKING CHANGE:
Expand Down
1 change: 1 addition & 0 deletions release-procedure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ List of CHANGE_VERSION_ variables:
- CHANGE_VERSION_AWS_OBJECT_STORAGE
- CHANGE_VERSION_GOOGLE_OBJECT_STORAGE
- CHANGE_VERSION_VOLVIEW
- CHANGE_VERSION_OHIF

0 comments on commit 71f4cd6

Please sign in to comment.