Using the Ruler.

Back to Contents

First, make sure you have:

(as of June 2020)

This isn't a true tutorial, just pointers:
Look in scripts/ruler.js for a simple 2D ruler.

Call rulerStart( consoleID, start, optional widthInInches) where:
  • consoleID is the id of an html element you wish to print ruler information to
  • start is a true or false value stating whether you are turning the ruler on or off
  • widthInInches is the width of the image in inches (this can be gotten from a dicom viewer). The default value is 14.

You will need to add rulerClick() to your window.viewerListenerInput so that the ruler knows when to place a marker.

You can check whether the ruler is active at any time with rulerInactive().

make sure to turn the ruler off (rulerStart(consoleID, false);) when you leave a page, otherwise the ruler stays active.