cornerstone icon indicating copy to clipboard operation
cornerstone copied to clipboard

Applying colormap on color images (like ultrasounds)

Open Bolkonski opened this issue 2 years ago • 2 comments

Hello First of all, I wanna thank the Cornerstone creators and team in general. For 3 years I've been using this libraries in my work. The documentation and forums also helped me a lot. There was only one issue I couldn't find an answer for. When applying colormaps to an image in color (mostly ultrasounds), the canvas shows a distorted image (see the attached picture). colormap us error Recently i made this update to de cornerstone.js file stored in my project assets's and fixed the problem for me. This pull request is my first ever. I have read the contributor guidelines and hope i am not violating any rules. Above all, i expect this to be useful. Any feedback in my pull request will be apreciated.

Bolkonski avatar Oct 31 '21 19:10 Bolkonski

@Bolkonski Is it safe to ignore other colors than the Red channel? If the acquired image has some green or blue colored region in original series, that might be considered as black when applying LUT ! Here is another existing PR for same issue. https://github.com/cornerstonejs/cornerstone/pull/545

sen-trenser avatar Nov 12 '21 09:11 sen-trenser

@Bolkonski Is it safe to ignore other colors than the Red channel? If the acquired image has some green or blue colored region in original series, that might be considered as black when applying LUT ! Here is another existing PR for same issue. #545

@sen-trenser absolutely true! I was so fixated with image distortion that i forgot to actually convert to grayscale. There is another commit using Luminosity Method. I read #545 and got some ideas, altho I didn't understand why relative luminance. Maybe I am missing something.

Bolkonski avatar Nov 12 '21 21:11 Bolkonski