Posted by
Nihar Dhruva on
URL: http://imagej.273.s1.nabble.com/Show-an-Image-without-opening-file-but-by-directly-passing-height-width-pixels-array-VERY-URGENT-tp3703721p3703725.html
Hi, it means that if i do following, will it do?
imp = new ImagePlus("TEST", new ColorProcessor(width, height, pixels));
if (imp!=null) imp.show();
----- Original Message -----
From: "Johannes Schindelin" <
[hidden email]>
To: <
[hidden email]>
Sent: Wednesday, February 15, 2006 1:55 PM
Subject: Re: Show an Image without opening file but by directly passing
height, width, pixels array. VERY URGENT.
> 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