cornerstone
cornerstone copied to clipboard
contrast stretching
Hello,
I am interested in implementing the contrast stretching [1] feature on top of cornerstone.
Would you be able to give some high-level guidance on how I can go about doing the same.
Best, Anupam
http://what-when-how.com/embedded-image-processing-on-the-tms320c6000-dsp/contrast-stretching-image-processing/
Windowing, also known as grey-level mapping, contrast stretching, histogram modification or contrast enhancement
It sounds like "Contrast Stretching" is what is commonly referred to as Window Leveling. This functionality is already supported. You can see a basic example of it in this repository, and as the WW/WC tool in cornerstone-tools.
If I've misunderstood your question, please feel free to continue the discussion.
@dannyrb, Contrast stretching is not the same thing as window leveling. There are different ways to accomplish it. One, way as in the link, to determine the histogram and knock out the statistically bad pixels. In their case they used the data between the 5th and 95th percentiles. Other names I've seen are histogram stretching, histogram equalization, histogram normalization, and histogram flattening. See
- https://slidetodoc.com/image-enhancement-in-the-spatial-domain-human-vision/
- https://stackoverflow.com/questions/69595948/how-do-you-normalize-an-image-histogram-stretching-using-image-js-and-javascri
I have to use this technique on my current project because the WW/WC Dicom tags are incorrect.
I appreciate the correction!