Posted by
Nihar Dhruva on
Feb 15, 2006; 8:51am
URL: http://imagej.273.s1.nabble.com/Show-an-Image-without-opening-file-but-by-directly-passing-height-width-pixels-array-VERY-URGENT-tp3703721p3703728.html
So, it means, that if I put following code after "for" in ImageJApplet.java,
will it do?
ip = new ColorProcessor(width, height, (int[])pixels);
imp = new ImagePlus("TEST", ip);
If i need to do something else, kindly explain me the things in details, as
the code is very difficult to understand, and I don't have much time to go
deep in code.
Thanks for your support, and sorry that i am disturbing you a lot.
Thanks again,
Nihar.
----- 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