floodFill() and scaled unit xy-values

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

floodFill() and scaled unit xy-values

Jan Eglinger-5
Dear all,


the floodFill(x,y) macro function only takes pixel coordinates.

On calibrated images (i.e. pixel width != 1) the "x=" and "y=" values on
the status bar are in scaled values, as expected, and so are all
measurements that act on x,y.

In a macro, is there a way other than multiplying my measured
coordinates by the pixel width, to tell the floodFill function which
point to fill?


Best,
Jan
Reply | Threaded
Open this post in threaded view
|

Re: floodFill() and scaled unit xy-values

Wayne Rasband
 > Dear all,
 >
 > the floodFill(x,y) macro function only takes pixel
 > coordinates.
 >
 > On calibrated images (i.e. pixel width != 1) the "x=" and
 > "y=" values on the status bar are in scaled values, as
 > expected, and so are all measurements that act on x,y.

You can get ImageJ to display pixel coordinates in the status bar by
holding down the alt key.

 > In a macro, is there a way other than multiplying my
 > measured coordinates by the pixel width, to tell the
 > floodFill function which point to fill?

You can get the floodFill() macro function to work with scaled
coordinates by getting the pixel width and height and dividing. Here is
an example:

    getVoxelSize(w, h, d, unit);
    floodFill(x/w, y/h);

-wayne