Package Exports
- cornerstonetools-thresholdbrush
- cornerstonetools-thresholdbrush/src/ThresholdBrushTool.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cornerstonetools-thresholdbrush) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cornerstonetools-thresholdbrush
A threshold brush that draws pixels only within the specified threshold low and high range.

Notice how it only draws on the bone which is in a threshold range of 200 to 100. and If I attempt to draw on other pixels outside of that range, nothing gets drawn.
Dependencies
Demo
Installation
$ npm i cornerstonetools-thresholdbrushExample
import ThresholdBrush from "cornerstonetools-thresholdbrush";
cornerstoneTools.addToolForElement(element, ThresholdBrush, {configuration: {thresholdLow: 200 , thresholdHigh: 1000}});
cornerstoneTools.setToolActive("ThresholdBrush", { mouseButtonMask: 1 });
You can modify the threshold low an threshold high configuration on the fly like the following
let brushThreshold = cornerstoneTools.store.state.tools.filter(tool => tool.name == 'ThresholdBrush')[0].configuration
brushThreshold.thresholdLow = -29
brushThreshold.thresholdHigh = 150
LICENSE
MIT