Hi,
On Oct 25, 2011, at 12:42 PM, Marcel Krzan wrote:
> Hi,
>
> Can I ask You one more time about help?
> Thanks again ...
>
>
> Using the Particle Analysis function in Macro I need to find the
> coordinates of the Perimeter points (points belonged to the Perimeter)...
> In my procedure I always found ca. 2- 4 particles on each picture .. and
> for each of particles I need to recalculate few various values.
>
I think you could add the following to your steps...
a. Make sure you "Include starts" in your run of Particle Analyzer. This is a dialog check box that appears in the Particle Analyzer GUI. When check your results table will have "XStart" and "YStart"
b. Use the macro function getResult() to get the XStart and YStart coordinates for your particle at rowNumber in the Results Table.
x0 = getResult("XStart", rowNumber);
y0 = getResult("YStart", rowNumber);
c. Use the macro command doWand to select the perimeter of your particle as shown on your mask image
doWand(x0, y0, .... < other arguments here > ....);
d. Use the macro command getSelectionCoordinates()
getSelectionCoordinates(x, y);
x and y now hold the pixel coordinates of your perimeter. Note that this is the "conservative" collection of perimeter pixels - just the corners. If you need the coordinate of every pixel along the outer edge then you have to tell the wand too to operate that way. To do that start, with the command
option("wand", true);
Cheers,
Ben