cornerstonejs / cornerstoneTools

A framework for tools built on top of Cornerstone.
https://tools.cornerstonejs.org/
MIT License
579 stars 455 forks source link

Ultrasound Regions #210

Open kofifus opened 7 years ago

kofifus commented 7 years ago

How can I get the Length tool to show the length in mm / get the correct scale with an image using the ultrasound region calibration information ?

Thx!

dannyrb commented 6 years ago

@kofifus, I might be able to help if you provide an example image and information? I'm not a radiologist, so I'm not sure what "utrasound region calibration information" is.

kofifus commented 6 years ago

Thanks!

Please see here: http://dicom.nema.org/medical/dicom/2016c/output/chtml/part03/sect_C.8.5.5.html

"US images often contain multiple regions that have independent data regions, e.g., quad screen loops that may have different calibration information. The data presented in the various regions of a US image can represent a multiplicity of physical parameters, e.g., spatial distance, blood velocity, time, volume, etc., and these are often contained in the value of the pixel itself. It is therefore imperative that physical information be available for the various regions of a single region independent of each other."

dannyrb commented 6 years ago

@kofifus, I believe images currently only support a single calibration. If ultrasounds contain metadata that would allow regions with different calibrations, I'm sure the functionality you want could work.

Are there specific tags that contain the data? If its in the pixel data itself, how would you propose adding this functionality?

kofifus commented 6 years ago

The relevant DICOM standard is here http://dicom.nema.org/medical/dicom/2016e/output/chtml/part03/sect_C.8.5.5.html

Cornerstone should have this as its reasonably common, however I don't have the knowledge to implement it...

dannyrb commented 6 years ago

Do you know of other viewers that implement this that we could look to as an example? It's been over a year and you're the only requester that I am aware of. Realistically, for this to be accomplished in the near future would require, at a minimum:

I'd be happy to offer guidance, but I don't have the domain knowledge required, or the time, to do either of the above. Is this something you would like to take ownership of?

jdnarvaez commented 6 years ago

I’ve implemented this previously and it’s on my list of things to do, but hasn’t been a high priority.

Sent from my iPhone

On Aug 20, 2018, at 5:05 AM, Danny Brown notifications@github.com wrote:

Do you know of other views that implement this that we could look to as an example? It's been over a year and you're the only requester that I am aware of. Realistically, for this to be accomplished in the near future would require, at a minimum:

one of more people to volunteer scoping out requirements one or more people spearheading those requirements I'd be happy to offer guidance, but I don't have the domain knowledge required, or the time, to do either of the above. Is this something you would like to take ownership of?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

ghost commented 6 years ago

We are currently looking into using cornerstone for an DICOM ultrasound viewer. In ultrasound images or clips with several regions having different meaning and calibrations are common. Typical examples are

  1. Multi images: An DICOM image shows several images next to each other. So each calibration region corresponds to one of those images. The pixel distance in each region might be different. Any measurements should happen only within one region with the correct pixel distance. Measuring across region boundaries or off any region does not make any sense.

  2. M-Mode: A DICOM clip (multi-frame interpreted as clip) shows in one region a cross section of the heart or a vessel. One or several other regions next to each other show the pixel values of a specific line through the cross section over time (M-Mode or TM-Mode). So while the cross section is a typical 2 dimensional area with all the corresponding measurements, the other regions have a different meaning. There the y-axis shows is a distance while the x-axis is time. Typical measurements would be the y-distance of two or several points with the same x-value.

  3. Doppler: A DICOM clip shows two regions. The main region, often covering the whole image, shows a cross section of the heart or a vessel with the speed of the blood represented with color. Another region, typically at the bottom of the image, shows a graph with the blood speed over time. So while the main region should have the typical 2D measurements, the region with the graph has a different meaning. The y-axis is speed and the x-axis is time. y-values usually have an absolute value, i.e. the region definition not only contains the pixel distances, but also a reference point within the region and its absolute y (and x) value. Typical measurements would be a probe showing the absolute values, or the integral of a section of the graph. Note that in this kind of images, the regions often overlap.

Most important would be supporting the first use case, since the current implementation bears the risk of wrong measurements. The definition of the first region is applied to the whole image, and a user thus may take wrong measurements in the other regions.

I will be happy to provide example DICOM files or further details, if someone would like to work on this issue.

swederik commented 6 years ago

@jdnarvaez If you can share your implementation we can try to get it in. That would be great. @rudlofth Thanks for the feedback! We will probably need some example files for this.

jdnarvaez commented 6 years ago

@swederik I'll try to generalize it and submit a patch, but it probably won't be for a couple weeks.

swederik commented 6 years ago

Awesome!

ghost commented 6 years ago

This is an example with two 2D regions having different pixel distance: different_length.zip

I have some nice examples for M-Mode regions too, but they are about 100MB. Any way to get them uploaded?

dannyrb commented 6 years ago

If you send a Firefox Send download URL to danny.ri.brown@gmail.com, I can upload them to my company's server for redistribution? Not sure what/if any large free file-share alternatives there are, but that would be the preferred route.

ghost commented 6 years ago

I created some small single frame images. Not very beautiful, but they have the calibration regions. The folder contains on M-Mode example, two examples with a doppler spectrum and one example with several 2D regions: examples.zip

Still looking for an example with a Waveform ...