Skip to content
chafey edited this page Mar 23, 2014 · 4 revisions

A DOM element can be made an enabled element in cornerstone by specifying the following attributes in markup:

  • data-cornerstoneEnabled="true" - marks this element as an Enabled Element
  • data-cornerstoneImageId="imageId" - The ImageId to display (String)

Additionally, the following attributes can specify viewport properties:

  • data-cornerstoneViewportWindowWidth - Window Width (Number)
  • data-cornerstoneViewportWindowCenter - Window Center (Number)
  • data-cornerstoneViewportScale - The scale to use - 1.0 is no scale, .5 is zoomed out by 2x 2.0 is zoomed in by 2x (Number)
  • data-cornerstoneViewportCenterX - The X translation of the image in Pixel Coordinate System
  • data-cornerstoneViewportCenterY - The y translation of the image in Pixel Coordinate System

NOTE: Additional attributes will be added here in the future to support flip, rotate and invert functionality when it is implemented

Things to consider:

  1. Get rid of data-cornerstoneEnabled and just key off of data-cornerstoneImageId?
  2. Add markup attributes to active tools
  3. Combine data-cornerstoneViewportWindowWidth with data-cornerstoneViewportWindowCenter
  4. Combine data-cornerstoneViewportCenterX with data-cornerstoneViewportCenterY