Batch (silently) measure ROIs ?

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

Batch (silently) measure ROIs ?

lechristophe
Dear all,

I've written a macro that sequentially measures ROIs from the ROI
manager. So the macro selects the ROI in the manager using
roiManager("select", index), uses the roiManager("Measure") function
to get results, processes some of the results into more results, write
these processed results to the Results table as new columns.

The problem is, with several hundreds of ROIs I can see the ROIs being
selected on the image one after another, and the results being written
to the Results table. Is it possible to accelerate the macro by doing
this in batch mode ? I added setBatchMode(true) at the beginning of
the macro and setBatchMode(exit and display) at the very end, but I
still see the ROIs being selected and measured. The macro
documentation states :

roiManager("select", index)
Note that macros that use this function sometimes run orders of
magnitude faster in batch mode

which leads me to think that it could be done silently. However I've
not seen any difference with or without batch mode. Do you know if it
is possible to select a ROI and measure it with no display update
before the end of the macro  ?

Thank you for your help,

Christophe


--
Christophe Leterrier
Postdoc
INSERM UMR641 // Ionic channels Lab
IFR Jean Roche, Mediterranée University
Marseille, France
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Batch (silently) measure ROIs ?

Jerome Mutterer-3
Christophe,

You get this behavior because you have a displayed image. If you open your
image and the ROI set after starting the batch mode, only the results will
be displayed.

Jerome.

setBatchMode(1);
run("Bridge (174K)");
roiManager("Open", "C:\\Documents and
Settings\\mutterer\\Bureau\\RoiSet.zip");
roiManager("Select", 0);
roiManager("Measure");



On Thu, Jun 24, 2010 at 10:13 AM, Christophe Leterrier <
[hidden email]> wrote:

> Dear all,
>
> I've written a macro that sequentially measures ROIs from the ROI
> manager. So the macro selects the ROI in the manager using
> roiManager("select", index), uses the roiManager("Measure") function
> to get results, processes some of the results into more results, write
> these processed results to the Results table as new columns.
>
> The problem is, with several hundreds of ROIs I can see the ROIs being
> selected on the image one after another, and the results being written
> to the Results table. Is it possible to accelerate the macro by doing
> this in batch mode ? I added setBatchMode(true) at the beginning of
> the macro and setBatchMode(exit and display) at the very end, but I
> still see the ROIs being selected and measured. The macro
> documentation states :
>
> roiManager("select", index)
> Note that macros that use this function sometimes run orders of
> magnitude faster in batch mode
>
> which leads me to think that it could be done silently. However I've
> not seen any difference with or without batch mode. Do you know if it
> is possible to select a ROI and measure it with no display update
> before the end of the macro  ?
>
> Thank you for your help,
>
> Christophe
>
>
> --
> Christophe Leterrier
> Postdoc
> INSERM UMR641 // Ionic channels Lab
> IFR Jean Roche, Mediterranée University
> Marseille, France
> [hidden email]
>