How to add cornerstone tools and dicom segmentation to OHIF's docker image?

Describe Your Question

  • I am trying to create a segmentation workflow using OHIF. I have read the following docs:
  1. @ohif/extension-cornerstone - npm
  2. Docs: viewer/configuration.html
  3. Docs: extensions

(I cannot post more than 2 links apparently).

But do not know how to customize/add settings so that the segmentation panel becomes available in the dicom viewer. The documentation is rather confusing.

  • Docker version: v4.12.30.19094.

What steps can we follow to reproduce the bug?

  1. I have customized /usr/share/nginx/html/app-config.js with the following content:
 cornerstoneExtensionConfig: {
    tools: {
      ArrowAnnotate: {
        configuration: {
          getTextCallback: (callback, eventDetails) =>
            callback(prompt("Enter your custom annotation")),
    stackPrefetch: {
      enabled: true,
      maxImagesToPrefetch: Infinity,
      preserveExistingPool: false,
      maxSimultaneousRequests: 20,
    hideHandles: true,

Is there something I am missing? Should I build the Dockerfile myself with any additional settings so that the segmentation extension and etc become available?

does the viewer container reflect your customization?

docker exec -it [viewer] /bin/bash
more /usr/share/nginx/html/app-config.js

if not, customize /platform/viewer/public/config/default.js and build the Dockerfile yourself