I'd like to use an external library that performs image manipulation on canvas images and I have dicom images that are 8bit gray scale. The image.getPixelData function returns an 8 bit array of 0-255 ints representing gray scale, and the canvas requires an array that represents rgba. I figure that cornerstone is doing that conversion somewhere internally since it ultimately is drawn on the canvas. Is there a straightforward way to do that conversion with cornerstone?
I'd like to use an external library that performs image manipulation on canvas images and I have dicom images that are 8bit gray scale. The image.getPixelData function returns an 8 bit array of 0-255 ints representing gray scale, and the canvas requires an array that represents rgba. I figure that cornerstone is doing that conversion somewhere internally since it ultimately is drawn on the canvas. Is there a straightforward way to do that conversion with cornerstone?