In Javascript, is there a way to convert an array of pixels to an ImagePlus object that I can save as an image file?
The reason I’d like to do this is because I have 8-bit images that contain a color LUT. I’d like to convert them to images without this LUT. Using the getPixels() routine produces the array of pixel values, without the LUT, but I have no idea how to convert this pixel array back to an ImagePlus object. I assume it’s dead easy since I can’t find any examples about how to do this online.
Thanks.