Hide results window in batch mode

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

Hide results window in batch mode

JimPhillips
Hi, does anybody know how to stop the results window appearing when the run("Measure") command is executed in a macro in batch mode?  The getStatistics command does not cover the value I need (centre of mass).

Thanks

Jim Phillips
Reply | Threaded
Open this post in threaded view
|

Re: Hide results window in batch mode

Rasband, Wayne (NIH/NIMH) [E]
> On Nov 27, 2015, at 11:00 AM, JimPhillips <[hidden email]> wrote:
>
> Hi, does anybody know how to stop the results window appearing when the
> run("Measure") command is executed in a macro in batch mode?  The
> getStatistics command does not cover the value I need (centre of mass).

You can use the List.setMeasurements macro function to retrieve any measurement value without displaying the Results table. The following example retrieves the center of mass.

-wayne

   List.setMeasurements;
   xm = List.getValue("XM");
   ym = List.getValue("YM");
   print("Center of Mass: "+xm+","+ym);


> Thanks
>
> Jim Phillips
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Hide-results-window-in-batch-mode-tp5015037.html
> Sent from the ImageJ mailing list archive at Nabble.com.

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