cornerstoneTools icon indicating copy to clipboard operation
cornerstoneTools copied to clipboard

How to load annotations in the database?

Open choijinkyung opened this issue 4 years ago • 0 comments

Prerequisites

  • [v4.2.0 ] Which version are you using? (Is it latest?)
  • [yes ] Are you reporting to the correct repository?
  • [yes] Did you search existing issues? (Were any related?)

Description

Steps to Reproduce the issue

I want to save the cornerstone tool data in the database and then load it back and draw it.

The tool is drawn on top of the image, and then the data is sent to the database. Close the Internet window. I come back to my pacs and draw the tool data in the database.

It is stored in this form of data.

{"RectangleRoi":{"data":[{"visible":true,"active":false,"invalidated":false,"handles":{"start":{"x":96.74309789972898,"y":198.64006393970192,"highlight":true,"active":false},"end":{"x":303.1387618563686,"y":366.87854632452576,"highlight":true,"active":false},"initialRotation":0,"textBox":{"active":false,"hasMoved":false,"movesIndependently":false,"drawnIndependently":true,"allowedOutsideImage":true,"hasBoundingBox":true,"x":303.1387618563686,"y":282.7593051321138,"boundingBox":{"width":238.47900390625,"height":45,"left":397.2784423828125,"top":140.52841186523438}}},"cachedStats":{"area":8680.923318718284,"count":34983,"mean":172.52622702455477,"variance":15297.026203776266,"stdDev":123.68114732559795,"min":0,"max":583},"unit":""}]}}

I tried all the methods on other issues, but the tools didn't load.

  1. cornerstoneTools.addToolState(element,toolROIType,toolROIData)

  2. toolStateManager.restoreToolState(toolROIData) I applied various codes such as this.

Is there a way to import and draw the tool data in the database?

choijinkyung avatar May 27 '21 00:05 choijinkyung