GithubHelp home page GithubHelp logo

igoroctaviano / dicom-microscopy-viewer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from imagingdatacommons/dicom-microscopy-viewer

0.0 1.0 1.0 5.18 MB

Web-based viewer for DICOM Visible Light Whole Slide Microscopy Images

Home Page: https://mghcomputationalpathology.github.io/dicom-microscopy-viewer

License: MIT License

JavaScript 100.00%

dicom-microscopy-viewer's Introduction

Build Status

DICOM Microscopy Viewer

Vanilla JS library for web-based visualization of DICOM VL Whole Slide Microscopy Image datasets.

Motivation and implementation

The library is intended to provide a lightweight and standard-compliant viewer for microscopy images in DICOM format. The viewer relies on Openlayers for rendering pyramid images and dynamically retrieves pyramid tiles (image frames) via DICOMweb WADO-RS using dicomweb-client. However, the viewer API fully abstracts the underlying rendering library and doesn't expose the lower level Openlayers API directly, such that another rendering library could in principle be used in the future if this would be of advantage.

Live demo

Check out the online examples at microscopy.dcmjs.org.

Installation

Install the dicom-microscopy-viewer package using the npm package manager:

npm install dicom-microscopy-viewer

Building and testing

Build and test code locally:

git clone https://github.com/mghcomputationalpathology/dicom-microscopy-viewer ~/dicom-microscopy-viewer
cd ~/dicom-microscopy-viewer
npm install
npm run build
npm test

We use rollup for bundling and mochify for testing (based on mocha and chai).

Build the documentation:

npm run generateDocs

Usage

<script type="text/javascript" src="https://unpkg.com/dicom-microscopy-viewer"></script>

The viewer can be embedded in any website, one only needs to

  • Create an instance of the viewer.VolumeViewer. The constructor requires an instance of DICOMwebClient for retrieving frames from the archive as well as the metadata for each DICOM image instance formatted according to the DICOM JSON Model.

  • Call the render() method, passing it the HTML element (or the name of the element), which shall contain the viewport.

const url = 'http://localhost:8080/dicomweb';
const client = new DICOMwebClient.api.DICOMwebClient({url});
const studyInstanceUID = '1.2.3.4';
const seriesInstanceUID = '1.2.3.5';
const searchInstanceOptions = {
  studyInstanceUID,
  seriesInstanceUID
};
client.searchForInstances(searchInstanceOptions).then((instances) => {
  const promises = []
  for (let i = 0; i < instances.length; i++) {
    const sopInstanceUID = instances[i]["00080018"]["Value"][0];
    const retrieveInstanceOptions = {
      studyInstanceUID,
      seriesInstanceUID,
      sopInstanceUID,
    };
    const promise = client.retrieveInstanceMetadata(retrieveInstanceOptions).then(metadata => {
      const imageType = metadata[0]["00080008"]["Value"];
      if (imageType[2] === "VOLUME") {
        return(metadata[0]);
      }
    });
    promises.push(promise);
  }
  return(Promise.all(promises));
}).then(metadata => {
  metadata = metadata.filter(m => m);
  const viewer = new DICOMMicroscopyViewer.viewer.VolumeViewer({
    client,
    metadata
  });
  viewer.render({container: 'viewport'});
});

Status

Investigational use only!

The viewer allows visualization of VL Whole Slide Microscopy Image datasets stored in a DICOMweb compatible archive. It leverages the dicomweb-client JavaScript library to retrieve data from the archive.

Features

  • Display of different image types: VOLUME, OVERVIEW, LABEL
  • Server-side rendering of images with inclusion of ICC profiles for color reproducibility
  • Client-side assembly of concatenations
  • Vector graphic annotation of regions of interest (ROI) based on 3-dimensional spatial coordinates (SCOORD3D): POINT, MULTIPOINT, POLYLINE, POLYGON, ELLIPSE, ELLIPSOID

Limitations

Currently, the viewer only supports

  • Brightfield illumination (no fluorescence)
  • 2D images (no z-stacks)

Citation

Please cite the following article when using the viewer for scientific studies: Herrmann et al. J Path Inform. 2018:

@article{jpathinform-2018-9-37,
    Author={
        Herrmann, M. D. and Clunie, D. A. and Fedorov A. and Doyle, S. W. and Pieper, S. and
        Klepeis, V. and Le, L. P. and Mutter, G. L. and Milstone, D. S. and Schultz, T. J. and
        Kikinis, R. and Kotecha, G. K. and Hwang, D. H. and Andriole, K, P. and Iafrate, A. J. and
        Brink, J. A. and Boland, G. W. and Dreyer, K. J. and Michalski, M. and
        Golden, J. A. and Louis, D. N. and Lennerz, J. K.
    },
    Title={Implementing the {DICOM} standard for digital pathology},
    Journal={Journal of Pathology Informatics},
    Year={2018},
    Number={1},
    Volume={9},
    Number={37}
}

Documentation

The online Application Programming Interface (API) documentation is available at mghcomputationalpathology.github.io/dicom-microscopy-viewer.

Getting started

Take a look at the examples in the /examples directory. They are also available online at microscopy.dcmjs.org.

Support

The developers gratefully acknowledge their reseach support:

dicom-microscopy-viewer's People

Contributors

biharck avatar hackermd avatar swederik avatar pieper avatar dependabot[bot] avatar zia-chang avatar

Watchers

James Cloos avatar

Forkers

radicalimaging

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.