A brush tool that allows you to set a low and high threshold range in HU units while drawing segmentations.
npm install cornerstonetools-thresholdbrushsh
$ npm i cornerstonetools-thresholdbrush
`
Example
`js
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
`js
let brushThreshold = cornerstoneTools.store.state.tools.filter(tool => tool.name == 'ThresholdBrush')[0].configuration
brushThreshold.thresholdLow = -29
brushThreshold.thresholdHigh = 150
``