-
Notifications
You must be signed in to change notification settings - Fork 597
markup
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:
- Get rid of data-cornerstoneEnabled and just key off of data-cornerstoneImageId?
- Add markup attributes to active tools
- Combine data-cornerstoneViewportWindowWidth with data-cornerstoneViewportWindowCenter
- Combine data-cornerstoneViewportCenterX with data-cornerstoneViewportCenterY