cornerstonejs / cornerstoneTools

[Deprecated] Use Cornerstone3D Instead https://cornerstonejs.org/
MIT License
579 stars 456 forks source link

Doc, Example, and Test for Toggling Display of (6xxx,yyyy) DICOM Overlays #1529

Open clairestreb opened 1 year ago

clairestreb commented 1 year ago

Prerequisites

Description

I have DICOM files with one or multiple overlays starting at DICOM header tag (6000,0010) and need to toggle their display on and off.

Steps to Reproduce the issue

  1. I need to use the latest or older cornerstone / cornerstoneWADOImageLoader / cornerstoneTools combination (whatever is needed) to toggle on and off the display of the overlay(s).
  2. I cannot find the documentation to do this. I cannot find an example or a test that does this.
  3. I am stuck and would appreciate some guidance.

Expected behavior: (What you expected to happen) To toggle on and off the display of the overlay(s).

Actual behavior: (What actually happened) No overlay displays, for example, in the latest cornerstoneWADOImageLoader\examples\dicomfile example.

CodeSandbox With Reproduction of Issue:

See "Actual behavior" above.

Example DICOM file can be retrieved from https://github.com/cornerstonejs/cornerstoneTools/issues/780 called ovly_p01.zip

clairestreb commented 1 year ago

@kofifus?

clairestrebva commented 1 year ago

@swederik? @khadakeb? @jdnarvaez? @dannyrb?

jdnarvaez commented 1 year ago

@clairestreb You need to extract the DICOM 6000 overlay yourself and display it on the image, AFAIK there is nothing in cornerstone today that will do that for you. I previously linked a gist that provides most of the code required to do it. It looks like maybe a tool was added, but I don't know if it was officially released.

Long thread here: https://github.com/cornerstonejs/cornerstoneTools/issues/780

I no longer work at the company I previously did while contributing to these codebases, and the code that I wrote to display the overlays and manipulate them is proprietary to them and I don't own it.

You should be able to use cornerstone WADO image loader to extract the overlays, then write a tool to display the overlay on a canvas or as an SVG.

clairestrebva commented 1 year ago

@jdnarvaez, thank you so much for your reply. I referenced #780 in my description. I saw your gist,, but it looks to me like they merged the feature a different way, although I could be wrong. Are you saying cornerstoneTools\src\tools\OverlayTool.js has nothing to do with this feature, or even if it does, that I can still use your gist as custom code?

jdnarvaez commented 1 year ago

@clairestrebva you could still use the gist I provided to display overlays, regardless of the other tool.

clairestrebva commented 1 year ago

Thank you!

clairestrebva commented 1 year ago

Please close this issue. (It appears I do not have permission to do that.)