Re: Defining and using a 2D array (=matrix)
Posted by Wayne Rasband on Nov 04, 2005; 7:48pm
URL: http://imagej.273.s1.nabble.com/Defining-and-using-a-2D-array-matrix-tp3704527p3704528.html
> Hi all I have a kind of basic question : how does one define a
> 2D array (2D matrix) in ImageJ ? I know that for a normal
> 1D array it is name = newArray(size) . Thanks in advance !
The ImageJ macro language does not directly support 2D arrays. You have
to is either create an image and use getPixel() and setPixel(), or
create a 1D array using a = newArray(xmax*ymax) and do your own
indexing (e.g., value = a[x + y*xmax]).
-wayne