http://imagej.273.s1.nabble.com/Check-if-command-is-finished-in-a-macro-tp5013045p5013052.html
Thank you for your answer.
with IJ methods.
function name".
> Hi Djoere,
>
>> I was wondering if it is possible to check whether a function has
> finished in a macro, in order to avoid the next command being initiated too
> early.
>
> I believe this is the purpose of the IJ.macroRunning[1] method.
>
> Instead of using wait(100), your while loop would look like this:
>
> while (IJ.macroRunning() {
> // Nothing needed here. Just wait for macro to end.
> }
>
> Hope that helps.
>
> Best,
> Mark
>
> [1]
>
https://github.com/imagej/ImageJA/blob/v1.49t/src/main/java/ij/IJ.java#L348-L350>
> On Fri, Jun 5, 2015 at 6:40 AM, Djoere Gaublomme <
[hidden email]>
> wrote:
>
>> Hi all,
>>
>> I was wondering if it is possible to check whether a function has finished
>> in a macro, in order to avoid the next command being initiated too early.
>>
>> I have read the following:
>>
http://imagej.1557.x6.nabble.com/Is-it-normal-to-use-a-wait-instruction-after-a-command-td5011551.html>> , and applied the proposed solution therein for functions that produce a
>> new image window as output.
>> For example:
>>
>> while (!isOpen("Resulting-Image")) {
>> wait(100);
>> }
>>
>> However, I would also like to be able to check if filters that don't
>> produce a new image window, such as the "Gaussian Blur 3D", were executed
>> completely.
>>
>> Is there a trick that allows you to do this?
>> Or is it necessary to change the plugin to allow for this? Would that be
>> a hard thing to do (I am only familiar with macros)?
>>
>> Thanks in advance for any ideas!
>>
>> Djoere
>>
>> --
>> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>>
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html