Skip to content

Latest commit

 

History

History
265 lines (229 loc) · 10.5 KB

README.md

File metadata and controls

265 lines (229 loc) · 10.5 KB
<style> .alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}.alert-primary hr{border-top-color:#9fcdff}.alert-primary .alert-link{color:#002752}.alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}.alert-secondary hr{border-top-color:#c8cbcf}.alert-secondary .alert-link{color:#202326}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert-success hr{border-top-color:#b1dfbb}.alert-success .alert-link{color:#0b2e13}.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-info hr{border-top-color:#abdde5}.alert-info .alert-link{color:#062c33}.alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.alert-warning hr{border-top-color:#ffe8a1}.alert-warning .alert-link{color:#533f03}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-danger hr{border-top-color:#f1b0b7}.alert-danger .alert-link{color:#491217}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}.alert-dark hr{border-top-color:#b9bbbe}.alert-dark .alert-link{color:#040505} </style>

Raccoon - Web-based DICOMWeb & FHIR ImagingStudy Server

Raccoon is a noSQL-based medical image archive for managing the DICOM images is primarily maintained by the Imaging Informatics Labs. It uses the MongoDB to manage the DICOM images and provide RESTful API, supported both FHIR ImagingStudy and DICOMweb to store, query/retrieve, and manage DICOM images. Raccoon is bulit on the top of the Burni FHIR Server to manage the FHIR resourcs related to medical images


Installation

  • Before starting Raccoon, MongoDB, imagemagick must be installed.
  • This project uses the submodule with BlueLight for DICOM viewer. If you want to use it, run git submodule init and git submodule update when the first time.
  • Node.js >= 14
  • Python >= 3.7

Windows

You can follow this Full Installation Guide 🎉
The guide above has every detailed installation step for each required software
😄 It's extremely friendly for newbie 😄

Test OS

  • Windows 10 64bits

requirement

Install dependencies

  • Go to project root path and run:
npm install
npm run build #This will download dcmtk executable binaries to ./models/dcmtk and generate example dotenv file.
Windows installation ends here, scroll down to see Configuration & Deploy guide

Linux

Test OS

  • Ubuntu v20.4

requirement

sudo api-get install python3-gdcm libgdcm3.0
  • imagemagick
sudo apt-get install imagemagick #ubuntu

Install dependencies

  • Go to project root path and run:
npm install
npm run build #This will download dcmtk using apt-get install and generate example dotenv file.

Configuration

Server dotenv

  • The .env file at project root.
  • You can copy the .env.template and modify it.
ENV='windows'  #input the os type. enum: windows , linux

MONGODB_NAME="Raccoon" 
MONGODB_HOSTS=["mongodb"]
MONGODB_PORTS=[27017]
MONGODB_USER="user"
MONGODB_PASSWORD="password"
MONGODB_SLAVEMODE=false


SERVER_HOST="localhost"
SERVER_PORT=8081

DICOM_STORE_ROOTPATH="C:/"  #The root path that DICOMweb STOW to store 
DICOMWEB_HOST="localhost" 
DICOMWEB_PORT=8081
DICOMWEB_API="dicom-web"

FHIRSERVER_APIPATH="api/fhir"
FHIRSERVER_HOST="localhost"
FHIRSERVER_PORT=8081
FHIR_NEED_PARSE_PATIENT=true #STOW will generate Patient data using DICOMTag. If you want custom FHIR patient , please change to false.

USE_CONDA=false
CONDA_PATH="C:\\Users\\chinHPlaptop\\anaconda3\\Scripts\\conda.exe"
CONDA_GDCM_ENV_NAME="gdcm"

USE_DCM2JPEG_PYTHONAPI=true
DCM2JPEG_PYTHONAPI_PORT=5000

ENABLE_LOGIN_ACCESS=false

Client Configuration

  • Config path : public/scripts/config.js
  • Change all hostname and port with your server config.
var envConfig = {
    QIDO : {
        hostName :'127.0.0.1' , 
        port : '9090' , 
        api : 'dicom-web' , 
        http : "http" //http or https
    } , 
    WADO : {
        hostName : '127.0.0.1' ,
        port : '9090' , 
        api : 'dicom-web' ,
        http : "http"
    } , 
    FHIR : {
        hostName : '127.0.0.1' , 
        port : '9090' , 
        api : 'api/fhir' , 
        http : "http"
    }
}
  • A simple web-based user interface is provided to manage the DICOM objects in Raccoon.
  • For DICOMWeb client, Raccoon can integrate with BlueLight, a lightweight Web-based DICOM Viewer.

Deploy

With Node.JS

node server

Deploy with docker-compose

  • The docker-compose example already in project root path.

Example:

version: '3.4'
services:
  mongodb:
    image: mongo:4.2
    container_name : mongodb
    restart: always
    ports:
      - 27017:27017
    volumes:
      - ./mongodb/db:/data/db
    environment:
      # provide your credentials here
      - MONGO_INITDB_DATABASE=admin
      - MONGO_INITDB_ROOT_USERNAME=root
      - MONGO_INITDB_ROOT_PASSWORD=Raccoon#Admin2Mongo
      - MONGO_PORT=27017
  raccoon:
    build:
      context : ./
      dockerfile : Dockerfile
    container_name: raccoon
    command: >
      /bin/sh -c '
      while ! nc -z mongodb 27017;
      do
        echo "waiting for database ...";
        sleep 3;
      done;
      echo "db is ready!";
      npm install;
      pm2-runtime start ecosystem.config.js --node-args="--max-old-space-size=4096";
      '
    volumes :
      - ./:/nodejs/raccoon
      - ./raccoon-storage:/dicomFiles
      - ./raccoon-null/node_modules:/nodejs/raccoon/node_modules
      - ./raccoon-null/build:/nodejs/raccoon/build
      - ./raccoon-null/models:/nodejs/raccoon/models/dcmtk/linux-lib
    ports:
      - 8081:8081
    depends_on:
      - mongodb
    tty : true
    restart: on-failure:3
    stdin_open : true

Set-up

docker-compose up -d

Usage

DICOMweb

QIDO-RS、WADO-RS、STOW-RS : /dicom-web/studies

WADO-URI : /api/dicom/wado

FHIR

base : /api/fhir/{resource} metadata : /api/fhir/metadata


About

  • Raccoon支援DICOMWeb標準傳輸協定,包含QIDO-RS, WADO-RS, WADO-URI, STOW等。
  • 支援各種Transfer Syntax 以及SOP Class影像
  • 通過台灣醫學資訊聯測 MI-TW 2020 - 項目: Track #4 - 醫學影像影像 DICOMWeb Query/Retrieve Source
  • 通過台灣醫學資訊聯測 MI-TW 2021 - 項目: Track #6 - 數位病理影像 DICOMWeb Query/Retrieve Source

Key Features

Cybersecurity

  • JSON Web Token(JWT) authentication
  • ID/Password login

DICOMWeb capabilities

  • Raccoon supports the following DICOMWeb API
    • metadata (JSON)
    • QIDO-RS: (JSON)
    • WAOD-RS
    • WADO-URI: supported both: DICOM and JPEG
    • STOW-RS

FHIR Resources

  • Raccoon can act a FHIR server supporting the following FHIR resources and FHIR API which can be found in FHIR metadata services
    • patient
    • organization
    • ImagingStudy
    • endpoint
  • Note: Raccoon is focused on medical imaging-related resources, not all FHIR resources, built on the top of the Simple-Express-FHIR-Server. If you are interesting in FHIR soultion, please visit Simple-Express-FHIR-Server.

Supported SOP Classes (particular)

Image

  • General image storages, e.g., CT, MR, X-ray, etc.
  • Multiframe Image Storage - partical support
  • Specifal SOP Class: VL Microscopic Image Storage: DICOM WSI

Non-Image

  • GSPS, Segementation, SR, etc.
  • Supplement 222: Whole Slide Microscopy Bulk Annotations Storage SOP Class

Supported library

  • Raccoon DICOM Server uses several open source libraries as following:
    • dcmtk use dcm2json to generating DICOM json and use dcmj2pnm to create jpeg image.
    • gdcm and pydicom convert DICOM JPEG2000 to jpeg for the retrieve option of the WADO-URI service

Related toolkits

  • fhir-mongoose-schema-generator. It can generate the collection's schema in MongoDB from mapping to FHIR resources used in Raccoon automatically.
  • Raccoon provides a tool to convert DICOM objects included in a study to a FHIR ImagingStudy resources stored as a MononDB document.
  • We hava another FHIR Server, is designed to creating a tiny FHIR server supported specified FHIR resources.

Roadmap

  • Dockerize
  • DICOM Protocol: C-ECHO SCP, C-STORE SCP, C-MOVE SCP.
  • IHE Invoke Image Display (IID) Profile [RAD-106]
  • DICOM Supplement 219 - JSON Representation of DICOM Structured Reports. Referenced standard: DICOM Sup 219
  • Write a new proposal of FHIR Implementation Guide of Raccoon modified from FHIR ImagingStudy Core Resource which lacks many tags commonly used in PACS.

Acknowledgement

  • This project is supported by a grant from the Ministry of Science and Technology Taiwan.
  • Thanks 琦雯Queenie, Queenie's github for contributing the logo design.