48 Bit RGB Data

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

48 Bit RGB Data

Phase GmbH
Hi,

what would be the best way to expose 48 Bit RGB (3x 16 bit) pixel array data
to the setPixels method of the image processor?

Any idea?

Thanks

Christian Kreutzfeldt
Reply | Threaded
Open this post in threaded view
|

Re: 48 Bit RGB Data

Wayne Rasband
> what would be the best way to expose 48 Bit RGB (3x 16 bit) pixel  
> array data to the setPixels method of the image processor?
>
> Any idea?

Create a three image stack and open it as a composite image. Here is  
an example:

    ImageStack stack = new ImageStack(width, height);
    stack.addSlice("red", a1);
    stack.addSlice("green", a2);
    stack.addSlice("blue", a3);
    ImagePlus imp = new ImagePlus("48-bit Image", stack);
    imp.setDimensions(3, 1, 1);
    imp = new CompositeImage(imp, CompositeImage.COLOR);
    imp.show();

where 'a1', 'a2' and 'a3' are short arrays.

The File>Open Samples>HeLa Cells image is an example of a 48-bit  
composite image. Use the Image>HyperStacks>Channels tool to switch  
display modes (composite, color or grayscale). Use the slider under  
the image to select the channel. Use the Image>Adjust>Brightness/
Contrast tool to adjust the brightness and contrast of a channel.  
Select a LUT in the Image>Lookup Tables menu to change the color of a  
channel.

-wayne