Cornerstone tools




















While changing a Tool's mode , you also have the option of updating its internal configuration. While Tool configuration varies widely, there are a few commonly used configuration values.

For example, all Tools that respond to mouse input use mouseButtonMask to determine which mouse button triggers their behavior. To better understand how configuration is applied, check out the below examples:. Then maintain a list here that denotes what each property is used for? Tools may optionally have multiple strategies of operation. BaseTool , from which all Tools inherit, takes two arguments related to the Tools strategies:.

Upon instantiation of the Tool, the activeStrategy is set to the defaultStrategy. If defaultStrategy is absent, the first function of the strategies is used. The strategies mechanism is entirely optional. BaseTool has the function applyActiveStrategy evt, this. The strategy can be changed by setting tool. Ideally, tools created using cornerstone-tools can be easily shared, allowing for the creation of a broader ecosystem. Below is a simplified example of creating a tool by extending cornerstone-tool 's BaseTool class.

This module is distributed via npm which is bundled with node and should be installed as one of your project's dependencies :. If you need to support the IE11 Browser, you will need to provide polyfills as needed. Our BrowserList target:.

Setting up and configuring cornerstone-tools 's depency can be the biggest hurdle to getting started. Be sure to check out our docs for assistance. The latest major version has just been published. We are still flushing out our examples. Check out this jsfiddle! Looking for a Deploy Preview? Deploy Preview for Cornerstone Tools. No results matching " ".

Renders our image, and provides useful events and methods to make tools that respond to viewport changes possible. A tiny JavaScript debugging utility modelled after Node. Works in Node. The mixins prop can be used as with BaseTool , but at least one segmentation mixin must be used. The strategies prop defines a set of operations that can be executed at the end of delineation. The strategies implemented should expect operationData of the form provided by the segmentation mixin implemented by the Tool.

Tool Types. Tool Types In order to make development of new Tools quick, easy and relatively boilerplate-free, all Tools extend a base class, which provides the functionality required to integrate seamlessly into the cornerstoneTools framework.



0コメント

  • 1000 / 1000