Couting from point selection

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

Couting from point selection

AJBell
Is there a way to get just the number of points selected using the point selection tool?

Currently using the exisiting settings I can get can measurements of individual points in the Results window, or(/and) have the points added to the ROI manager, but what I would like is a total count of how many there are in the window. I know I could just take a look at the Results window and see the point number there, but I would like to add this into a macro where the user selects a number of varrying points in the image, and it is the number per image I would like.

Any suggestions are welcome.

With regards,

Andrew
Reply | Threaded
Open this post in threaded view
|

Re: Couting from point selection

Jerome Mutterer-3
Andrew,
You can use:

getSelectionCoordinates(x, y);
print (x.length);

Sincerely,

Jerome



On Wed, Mar 23, 2011 at 3:24 PM, Andrew Bell <[hidden email]> wrote:

> Is there a way to get just the number of points selected using the point
> selection tool?
>
> Currently using the exisiting settings I can get can measurements of
> individual points in the Results window, or(/and) have the points added to
> the ROI manager, but what I would like is a total count of how many there
> are in the window. I know I could just take a look at the Results window and
> see the point number there, but I would like to add this into a macro where
> the user selects a number of varrying points in the image, and it is the
> number per image I would like.
>
> Any suggestions are welcome.
>
> With regards,
>
> Andrew
>
Reply | Threaded
Open this post in threaded view
|

Re: Couting from point selection

AJBell
In reply to this post by AJBell
Goodness me that was embaressingly straight forward. Many thanks.

Andrew

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Jerome Mutterer
Sent: 23 March 2011 14:35
To: [hidden email]
Subject: Re: Couting from point selection

Andrew,
You can use:

getSelectionCoordinates(x, y);
print (x.length);

Sincerely,

Jerome



On Wed, Mar 23, 2011 at 3:24 PM, Andrew Bell <[hidden email]> wrote:

> Is there a way to get just the number of points selected using the point
> selection tool?
>
> Currently using the exisiting settings I can get can measurements of
> individual points in the Results window, or(/and) have the points added to
> the ROI manager, but what I would like is a total count of how many there
> are in the window. I know I could just take a look at the Results window and
> see the point number there, but I would like to add this into a macro where
> the user selects a number of varrying points in the image, and it is the
> number per image I would like.
>
> Any suggestions are welcome.
>
> With regards,
>
> Andrew
>