Posted by
Johannes Koch on
Sep 18, 2013; 6:40am
URL: http://imagej.273.s1.nabble.com/ImageJ-does-not-wait-for-ImageJ-tp5004817p5004843.html
Thanks Michael and Gabriel for the inputs. As the macro works as
expected (now) I do not want to break off time (and nerve) consuming
diagnosis.
The only thing is that I am confused that selectWindow had the same
effect as a wait command. Maybe it is as Michael wrote, I am running on
a i7-3770 @ 3.4GHz with 16GB RAM.
Maybe that by selecting the image, the code does not have a chance to
wait for the previous operation.
To answer your questions: atm, the macro doesn't run in batch mode. I do
not cycle through the images, as I close all processed images within the
loop (and I annotate the results with the title). No need for keeping
them open.
In the end, this "macro" is neither very elegant nor was it intended to
be. I just have a few hundred images at hand from which I want to
extract some information and I was naturally too lazy for manual
processing. Since I am not coming from the informatics side-of-life, I
unwantedly produced some logic errors (in code-writing). Mistakes, a
programmer would not do (even *if* there was a problem with multithreads
and/or other things).
Anyway, I will keep that in mind for the future!
Best,
Johannes
*Dr. Johannes Koch*
*Tissue Med Biosciences GmbH*
Magnesitstrasse1 | A-3500 Krems
T: +43/2732/87470-300 | M:
[hidden email]
<mailto:
[hidden email]>
*www.tmbiosciences.com <
http://www.tmbiosciences.com/>*
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Information. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtümlich erhalten haben, informieren Sie bitte unverzüglich den
Absender und vernichten Sie diese E-Mail sofort. Das unerlaubte Kopieren
sowie die unbefugte Weitergabe dieser E-Mail sind nicht gestattet.
This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient or have received this e-mail in error
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
Am 17.09.2013 15:14, schrieb Gabriel Landini:
> On Tuesday 17 Sep 2013 13:44:59 Michael Schmid wrote:
>> well, in principle, running a macro in ImageJ should be deterministic...
>>
>> The current problem sounds like a race condition to me, a frequent problem
>> due to the multi-threaded nature of Java.
> Yes, deterministic, but results might vary if the initial conditions are note
> the same ;-)
> I think the macro might be taking a non-specified image to get the title and
> process it. As I said I did not run it, just my suggestion from looking at the
> code.
>
> Cheers
> Gabriel
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html