SkillAgentSearch skills...

Cornerstone

[Deprecated] Use Cornerstone3D Instead https://cornerstonejs.org/

Install / Use

/learn @cornerstonejs/Cornerstone
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

🔔🔔🔔🔔 Attention: Cornerstone.js has evolved! We're excited to introduce Cornerstone3D 🚀. Expect advanced rendering, stellar performance, and a modern toolset. 🌐 Navigate to the new repository for the latest updates and improvements.

<div align="center"> <h1>cornerstone-core</h1> <p>Cornerstone.js delivers a complete web based medical imaging platform. This repository contains the Cornerstone.js "Core" component which is a lightweight JavaScript library for displaying medical images in modern web browsers that support the HTML5 canvas element.</p>

Read The Docs | Edit the docs

</div> <hr /> <!-- prettier-ignore-start -->

[![Coverage Status][coverage-image]][coverage-url] All Contributors

[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url]

<!-- prettier-ignore-end -->

Cornerstone Core is not meant to be a complete application itself, but instead a component that can be used as part of larger more complex applications. See the OHIF Viewer for an example of using the various Cornerstone libraries to build a simple study viewer.

Cornerstone Core is agnostic to the actual container used to store image pixels as well as the transport mechanism used to get the image data. In fact, Cornerstone Core itself has no ability to read/parse or load images and instead depends on one or more ImageLoaders to function.

The goal here is to avoid constraining developers to work within a single container and transport (e.g. DICOM) since images are stored in a variety of formats (including proprietary). By providing flexibility with respect to the container and transport, the highest performance image display may be obtained as no conversion to an alternate container or transport is required. It is hoped that developers feel empowered to load images from any type of image container using any kind of transport. See the CornerstoneWADOImageLoader project for an example of a DICOM WADO based Image Loader.

Cornerstone Core is agnostic to the exact interaction paradigm being used. It does not include any mouse, touch or keyboard bindings to manipulate the various image properties such as scale, translation or ww/wc. The goal here is to avoid constraining developers using this library to fit into a given ui paradigm. It is hoped that developers are empowered to create new paradigms possibly using new input mechanisms to interact with medical images (e.g. Kinect or Accelerometer). Cornerstone does provide a set of API's allowing manipulation of the image properties via javascript. See the CornerstoneTools library for an example of common tools built on top of Cornerstone.

Community

Have questions? Try posting on our google groups forum.

Live Examples

The best way to see the power of this library is to actually see it in use.

Click here for a list of examples of using the Cornerstone library.

Install

Get a packaged source file:

Or install via NPM:

Latest stable release:

npm install cornerstone-core

Pre-release, unstable, mostly for contributors:

npm install cornerstone-core@next

Key Features

  • HTML5/Javascript based library to easily add interactive medical images to web applications
  • Serves as a foundation to build more complex medical imaging applications from - enterprise viewer, report viewer, etc.
  • Supports all HTML5 based browsers including mobile, tablet and desktop
  • Displays all common medical image formats (e.g. 8 bit grayscale, 16 bit grayscale, RGB color)
  • High performance image display
  • Retrieval of images from different systems with different protocols via Image Loader plugin design
  • API support for changing viewport properties (e.g. ww/wc, zoom, pan, invert)

Links

Development Process

Installation

Developer Guide

View the wiki for documentation on the concepts and APIs

View Roadmap

View Backlog

2014 comp.protocols.dicom thread that started this project

CornerstoneTools - A library of common tools that can be used with Cornerstone

CornerstoneWADOImageLoader - A Cornerstone Image Loader that works with WADO-URI, WADO-RS and DICOM P10 files

CornerstoneWebImageLoader - A Cornerstone Image Loader that works with PNG and JPEG files

dicomParser - A JavaScript library designed to parse DICOM for web browsers

Code Contributors

I welcome pull requests, please see FAQ below for guidance on this.

  • @simonmd - CSS improvements in the cornerstoneDemo application
  • @doncharkowsky - The angle tool in cornerstoneTools
  • @prasath-rasterimages - Touch event bindings in cornerstoneTools
  • @jpamburn - Performance optimizations for signed data, fixes for image caching
  • @jmhmd - for getPixels() implementation
  • @devishree-raster - for flip and rotate implementation

FAQ

Why did you decide to license this library using the open source MIT license?

The main reason this library is released as open source is that I believe that medical imaging in particular can do a lot more to improve patient outcomes but the cost of doing so is prohibitive. Making this library open source removes the cost barrier and will hopefully usher in a new set of medical imaging based applications.

The old adage a picture is worth a thousand words is very true in medical imaging. When a patient is going through a disease process, they often face fear and confusion. Medical terminology amplifies these issues as it is hard to understand and therefore disempowering. Medical imaging allows a mysterious health issue to be visualized and therefore brings a level of understanding that just can't be accomplished via textual information found in lab or radiology reports. By helping a patient (and its supporting friends/family) connect with the disease visually through images, it is believed that fear, anxiety and confusion will all be reduced which will increase optimism and therefore patient outcomes.

It is my hope that this library be used to build a variety of applications and experiences to deliver on this vision. The MIT license allows this library to be used in any type of application - personal, open source and commercial and is therefore appropriate to support this vision. If you are reading this, I hope you can join me in this mission as there is still a lot to be done.

Why doesn't Cornerstone natively support the display of DICOM images?

While DICOM has support for just about every type of medical image, there are many cases where medical images are not stored in DICOM format. In many cases, a PACS may receive DICOM images but store them in a proprietary format on disk. In this case, it can be faster to access images by having an image loader that works with a proprietary PACS interface that would not require conversion from the proprietary format into a standard format like DICOM. Another example of this is is dermatology where images are often taken using standard digital cameras and are stored as JPEG not DICOM.

The main reason this library is not based around DICOM is that it wants to reach the widest possible adoption and that will be accomplished by supporting as many types of image containers and transports possible. Another side effect of this approach is that the code base is smaller and easier to understand since it is focused on doing exactly one thing. That being said, it is is expected that the majority of images displayed using this library will have originated as DICOM images. It is therefore important to make sure that there are no limitations with respect to displaying the different types of DICOM images and have robust supporting libraries for DICOM. Separate libraries to add DICOM specific support already exist, check out the CornerstoneWADOImageLoader library and the dicomParser library.

Why doesn't Cornerstone include basic tools like ww/wc using the mouse?

There is no standard for user interaction in medical imaging and a wide variety of interaction paradigms exist. For example, one medical imaging application may use the left mouse button to adjust ww/wc and another may use the right mouse button. The main reason this library does not include tools is that it wants to reach the widest possible adoption and that will only be a

Related Skills

View on GitHub
GitHub Stars2.1k
CategoryHealthcare
Updated3d ago
Forks595

Languages

JavaScript

Security Score

100/100

Audited on Mar 19, 2026

No findings