Login  Register

Perimeter in Partice Analysis - Macro language

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

Perimeter in Partice Analysis - Macro language

nckrzan
19 posts
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.

Regards
Marcel Krzan
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Perimeter in Partice Analysis - Macro language

BenTupper
122 posts
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