Brush Tool state (get/set segmentations)

Describe Your Question

I want to be able to get and set the tool state of brush tool the same way as probe tool. Anyhow it doesn’t work with the same procedure:

const probeState = cornerstoneTools.default.getToolState(this.element, “Probe”); => WORKS
const brushState = cornerstoneTools.default.getToolState(this.element, “Brush”); => UNDEFINED

HOW should I be able to get the brush tool state? The examples don’t work. Thank you so much for your help! :slight_smile:

What steps can we follow to reproduce the bug?

I want to create segmentations the same way as probe points here, but how should I do it??

const probe = this.createProbePoint(point[0], point[1], element);
cornerstoneTools.setToolActive(‘Probe’, { mouseButtonMask: 1 })
cornerstoneTools.addToolState(element, “Probe”, probe)