3D Threshold segmentation tool that allows you to segment several slices at once using a rectangle ROI
npm install cornerstonetools-rectangle-roi-threshold-segmentationsh
$ npm i "cornerstonetools-rectangle-roi-threshold-segmentation"
`
Usage
`js
import RectangleROIThresholdSegmentation from "cornerstonetools-rectangle-roi-threshold-segmentation";
cornerstoneTools.addToolForElement(element, RectangleROIThresholdSegmentation, {configuration: {thresholdLow: 200 , thresholdHigh: 1000, numberOfSlices: 10, inside: true}});
cornerstoneTools.setToolActive("RectangleROIThresholdSegmentation", { mouseButtonMask: 1 });
`
The threshold values, number of slices, and whether the segmentation is filled inside or outside the ROI rectangle can be modified on the fly.
`js
let brushThreshold = cornerstoneTools.store.state.tools.filter(tool => tool.name == 'RectangleROIThresholdSegmentation')[0].configuration
brushThreshold.thresholdLow = -29
brushThreshold.thresholdHigh = 150
brushThreshold.numberOfSlices = 10
brushThreshold.inside = true
``