[SOLVED] DeconvolutionLab2: How to know when it has finished?

Dear all,

I am programming a Jython script for Fiji, in which I need to make use of EPFL’s DeconvolutionLab2. I do:

Deconvolution(title, command).deconvolve();

My issue appears when I want to access the results file, in order to continue processing it in my script’s pipeline. The line of code above seems to finish its execution immediately, although the fact is that the deconvolution takes a considerable amount of time to compute (as it is logical).
Therefore, when I try to access the ‘outcome.tif’, my script terminates unexpectedly because it throws an IO Exception, as it doesn’t exist yet. Nevertheless, after a while, ‘outcome.tif’ is indeed written to disk.

I’ve also tried as follows, but the behaviour seems the same:

Deconvolution(title, command, Deconvolution.Finish.ALIVE).deconvolve();

Do you know of any way to check programmatically whether the deconvolution has finished? I believe that just checking if ‘outcome.tif’ exists in disk is not sufficient, because I have observed that it changes its size during computations.

Thank you very much in advance, I really appreciate assistance.

Fernando

OK, this ended up being easy. I just had to substitute .deconvolve() by .run()

2 Likes