Re: Show an Image without opening file but by directly passing height, width, pixels array. VERY URGENT.

Posted by dscho on
URL: http://imagej.273.s1.nabble.com/Show-an-Image-without-opening-file-but-by-directly-passing-height-width-pixels-array-VERY-URGENT-tp3703721p3703724.html

Hi,

On Wed, 15 Feb 2006, Nihar Dhruva wrote:

> Thanks for your suggestion, but I don't get the image as file, instead, I
> have image as single dimensional pixel array of int type (the way .png files
> are stored basically). I don't have to convert it to an Image, that's my
> restriction. So, ultimately, I need some way to display it on the applet.
>
> please suggest me some way to do that.

In that case you'll have to adapt ImageJApplet.java. Just add another "if"
after the "for", where you check that certain Parameters are there. Then,
constructing the ImagePlus from the array is just a matter of converting
the types of the parameters accordingly. If all succeded, you can "show()"
the image.

Hth,
Dscho