Re: Defining and using a 2D array (=matrix)
Posted by
Rafael Carazo-Salas on
Nov 07, 2005; 9:45am
URL: http://imagej.273.s1.nabble.com/Defining-and-using-a-2D-array-matrix-tp3704527p3704529.html
Hi Wayne thank you for the advice it works ! Kind regards ,
RECS
On Fri, 4 Nov 2005, Wayne Rasband wrote:
> > 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
>