Viewers icon indicating copy to clipboard operation
Viewers copied to clipboard

delete the measurement in measurement-list but still showing in on image.

Open Vishal568 opened this issue 7 years ago • 2 comments

I want to remove all the measurements. How can I delete from on Images?

I try to this code.

var toolsGrops = OHIF.measurements.MeasurementApi.Instance.tools;
  Object.entries(toolsGrops).forEach(([key, tooldata]) => {
    if (tooldata.length > 0) {
      tooldata.forEach(tool => {
        var toolType = tool.toolType;
        var toolId = tool.toolType;
        measurementApi.deleteMeasurements(toolType, eventData.measurementTypeId, { toolId });
      });
    }
  });

Please anyone help me what i wrong and how can I solve this issue.

Vishal568 avatar Sep 04 '19 11:09 Vishal568

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 30 '19 15:09 stale[bot]

@Vishal568, I don't know that there's a great way to do this currently. If you use the cornerstone tools API to remove the toolstate, it should emit the proper event that would cause the measurement to be deleted from the Measurement's Panel as well?

What we really need is a Measurements Service that the cornerstone extension updates, and the Measurements Panel reads from.

dannyrb avatar Oct 09 '19 15:10 dannyrb