Re: Plugin- new image, set pixels-newbie question

Posted by Graeme Kidd on
URL: http://imagej.273.s1.nabble.com/Plugin-new-image-set-pixels-newbie-question-tp3701144p3701145.html

Sorry for such a short reply as I am about to go to bed.
If you are wanting to make a plug-in then it will be beneficial to you if
you give this tutorial on "Writing ImageJ Plugins-A Tutorial" a read. It
shows you how to make a plug-in and how to use the createByteImage which
creates a new 8 bit greyscale or colour image with the specified title,
width and height.

http://mtd.fh-hagenberg.at/depot/imaging/imagej/tutorial171.pdf

Is there any command for setPixels?
"The pixel array you work on is a reference to the ImageProcessor's pixel
array. So any modifications affect the ImageProcessor immediately. However,
if you want the Image - Processor to use another (perhaps newly created)
array, you can do this using:
void setPixels(java.lang.Object pixels)"

Hope that helps in someway.
-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Liisa
Palomaa
Sent: 30 October 2006 02:59
To: [hidden email]
Subject: Plugin- new image, set pixels-newbie question

Hi everyone!

I try to find a plugin -that create a newimage-and lets me to set the
pixelvalues.
I want to have a new image wthat is 384*384 pixels.(8bit)

Should I use this command:
static ImagePlus createByteImage (java.lang.String title, int width,
int height, int fill)
How and where should I put the width and height? How should the plugin
look like? Do I have to write something for string title?

Is there any command for setPixels?

Sorry for sending this kind of newbie questions- but I can't get my
plugin to work.

Thanks in advance
//Liisa