cornerstonejs / cornerstone

JavaScript library to display interactive medical images including but not limited to DICOM
https://docs.cornerstonejs.org/
MIT License
2.05k stars 598 forks source link

Updated the CLUT lookup for the 4 channel color image pixel data for correct pseudo coloring and rendering #545

Open Trenser-SandeepNayathil opened 3 years ago

Trenser-SandeepNayathil commented 3 years ago

Below are the summary of the updates to correct the pseudo coloring of 4 channel data similar to the issue reported in https://github.com/cornerstonejs/cornerstone/issues/463

  1. Updated the CLUT lookup for the 4 channel color image pixel data for correct pseudo coloring and rendering as below
    • Calculate the relative luminance from RGB linear components of each pixel(4 byte).
    • Skipping the Alpha channel
    • Handle similarly for the minimum pixel value -ve and 0 or above scenarios
  2. Modifications in "storedPixelDataToCanvasImageDataPseudocolorLUT" done by following the same way as existing similar functions with separate handling of the minimum pixel value scenarios.
  3. Added unit test for the updates in "storedPixelDataToCanvasImageDataPseudocolorLUT" for the 4 byte color image CLUT lookup.
Trenser-SandeepNayathil commented 2 years ago

Hi @swederik, Could you please review the updates? Also, as part of this update some checks found to be failed in it. Could you please suggest how to fix those deploy and CircleCI test issues. Thanks In Advance..

andydoe19 commented 2 years ago

Helloo @Trenser-SandeepNayathil @swederik , has this issue finally been fixed? Cos am unable to apply colormap to my images loaded with cornerstoneWebImageLoader, and wondering if this could help. If not I'll be glad if anyone can point me in the right direction. Thank you in advance!