Re: setting up multiple arrays using sequential name.
Posted by
grimper on
Feb 08, 2009; 8:26am
URL: http://imagej.273.s1.nabble.com/setting-up-multiple-arrays-using-sequential-name-tp3693809p3693811.html
Did you mean using setPixel() and getPixel() to put my data into the new image? But it seems to me that the pixel can only contain integer as value. What if my data contains decimal places upto 3 or 4?
Thanks a lot for your reply,
_ wrote
Hi,
unfortunately it is not possible to create a more dimensional array but
you can use a second image to store your data.
Greetings.
grimper schrieb:
> Hello,
>
> I am trying to write a macro to analysis multiple image stacks. For each
> stack, the analyzed result would put into an array respectively. As I have n
> stacks, I would need to define n arrays.
> Ex:
> a1 = newArray(nSlices);
> a2 = newArray(nSlices);
> .
> .
> .
> .
> an = newArray(nSlices);
>
> Could I use "for loop" to do this job? Like:
> for (i=1; i<nImages;i++){
> "a"+i = newArray(nSlices);
> }
>
> I tried this but it seems to me that by concatenating a string and a
> variable couldn't be assigned as the name of array.
>
> Thanks a lot,
>
>
>
>