Posted by
Joachim Wesner on
Oct 02, 2009; 8:38am
URL: http://imagej.273.s1.nabble.com/ImageJ-Java-Question-tp3690936p3690939.html
Hi,
this is so much easier with an ImageStack!
show() will not "un"show other images!
Simply create a stack and cycle throught it with setSlice!
Mit freundlichen Grüßen / Best regards
Joachim Wesner
David William
Webster
<dwwebster00@GMAI An
L.COM>
[hidden email]
Gesendet von: Kopie
ImageJ Interest
Group Thema
<
[hidden email]. ImageJ/Java Question
GOV>
02.10.2009 04:38
Bitte antworten
an
ImageJ Interest
Group
<
[hidden email].
GOV>
All,
I ran into the situation desribed below, but don't understand
Java well enough to know why what I'm doing is done this way. For
what it's worth, I suspect I could do what I want to do easier using
Stacks.
I have an array of 5 ImageProcessor objects called ip.
I want to display each object in turn using a loop. So
first I declare an array of ImagePlus objects, called im.
This is shown below. But, the array entries ar all null
at this point. So, in the in the loop I again use new and
an ImagePlus constructor to create an ImagePlus object, im[k],
My question is can this be done without using "new" twice and/or
is this correct.
ImagePlus im[] = new ImagePlus[5];
for(int k = 0; k < 5; k++)
{
im[k] = new ImagePlus();
im[k].setProcessor("name",ip[k]);
im[k].show();
}
david Webster
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit
http://www.messagelabs.com/email
______________________________________________________________________