Cell counter mouse click macro

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

Cell counter mouse click macro

Flemming Ravn Merkel

Dear All,

We're using the nice Cell Counter plugin by Kurt De Vos, including the setType macros to speed up the selection of the different category counters:

   macro "Type 1 [1]" {call("CellCounter.setType", "1");}
   macro "Type 2 [2]" {call("CellCounter.setType", "2");}

Would it be possible to extend these macros to also perform a mouse-click (add a marker)? Thus, when activating e.g. macro “1” I would like it to first switch to the “Type 1” counter and subsequently add a marker at the current position of the cursor.

Would this be possible or would this require changes to the Cell Counter plugin code?

In the same way it would be nice with a macro to “delete” the last marker point?

We’re using Cell Counter to count the number of seabirds in huge seabird colonies, but our current assistant is developing injuries to his wrist due to all the mouse clicks. I would be grateful for your help to solve this problem.

Thanks

Flemming

---------------------------------------------------------------------------
Flemming Merkel, PhD
Senior Researcher
Arctic Environment, Dept. Bioscience, Aarhus University
Greenland Institute of Natural Resources
Frederiksborgvej 399
P.O. box 358
4000 Roskilde
Denmark
[hidden email]<mailto:[hidden email]>
+45 3078 3173
-------------------------------------------------------------------------




--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Cell counter mouse click macro

ctrueden
Hi Flemming,

> Would it be possible to extend these macros to also perform a
> mouse-click (add a marker)?

One possibility is to use the getCursorLoc and makePoint macro functions to
add points:

* http://imagej.net/developer/macro/functions.html#getCursorLoc
* http://imagej.net/developer/macro/functions.html#makePoint

Then add the point to the ROI Manager:
* http://imagej.nih.gov/ij/developer/macro/functions.html#roiManager

> We’re using Cell Counter to count the number of seabirds in huge
> seabird colonies, but our current assistant is developing injuries to
> his wrist due to all the mouse clicks. I would be grateful for your
> help to solve this problem.

Note that the Cell Counter plugin is old, and not actively being
maintained. ImageJ's built in multi-point tool may work better, especially
from the perspective of macro scripting.

I would also strongly encourage you to try automating your segmentation if
at all possible: http://imagej.net/Segmentation

Regards,
Curtis

On Tue, May 5, 2015 at 3:41 PM, Flemming Ravn Merkel <[hidden email]> wrote:

>
> Dear All,
>
> We're using the nice Cell Counter plugin by Kurt De Vos, including the
> setType macros to speed up the selection of the different category counters:
>
>    macro "Type 1 [1]" {call("CellCounter.setType", "1");}
>    macro "Type 2 [2]" {call("CellCounter.setType", "2");}
>
> Would it be possible to extend these macros to also perform a mouse-click
> (add a marker)? Thus, when activating e.g. macro “1” I would like it to
> first switch to the “Type 1” counter and subsequently add a marker at the
> current position of the cursor.
>
> Would this be possible or would this require changes to the Cell Counter
> plugin code?
>
> In the same way it would be nice with a macro to “delete” the last marker
> point?
>
> We’re using Cell Counter to count the number of seabirds in huge seabird
> colonies, but our current assistant is developing injuries to his wrist due
> to all the mouse clicks. I would be grateful for your help to solve this
> problem.
>
> Thanks
>
> Flemming
>
> ---------------------------------------------------------------------------
> Flemming Merkel, PhD
> Senior Researcher
> Arctic Environment, Dept. Bioscience, Aarhus University
> Greenland Institute of Natural Resources
> Frederiksborgvej 399
> P.O. box 358
> 4000 Roskilde
> Denmark
> [hidden email]<mailto:[hidden email]>
> +45 3078 3173
> -------------------------------------------------------------------------
>
>
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html