Login  Register

Re: wait for a result to appear

Posted by Aryeh Weiss on Aug 17, 2016; 2:41am
URL: http://imagej.273.s1.nabble.com/wait-for-a-result-to-appear-tp5017029p5017031.html

On 17/08/2016 4:34 AM, Feinstein, Timothy N wrote:
> Hello,
>
> I am trying to automate the plugin Parallel Iterative Deconvolution.  This plugin does not seem designed for multi-channel images and especially for doing them in batches, so I am trying to patch together a work-around.  The workflow is basically to pre-process for background subtraction, split channels, deconvolve each channel with the appropriate point spread function, delete the originals, merge the results back into one composite and save.
>
> This all works fine, except that ImageJ cannot tell that the plugin is still running, so it blazes ahead without the results appearing.  I believe in theory I can use the WHILE statement to say something like:
>
> while (isOpen("C1-"+Filename[i]+"_WPL_decon") = False) {
> wait(1000);
> }

I think you need == , not =.
Try:

while (isOpen("C1-"+Filename[i]+"_WPL_decon") == False) {


> Ideally this should hold the macro in stasis until the deconvolution cycle is finished and a result appears.  However ImageJ seems to think I am missing a parentheses at the equals sign.  And I am not sure whether this strategy would work anyway.
>
> Any advice would be appreciated.  Best,
>
>
> Tim
>
> Timothy Feinstein, Ph.D.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html


--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051

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