Posted by
Joachim Wesner on
Mar 12, 2009; 12:01pm
URL: http://imagej.273.s1.nabble.com/Batch-Mode-Active-Image-Ambiguity-tp3693320p3693322.html
Hi David,
I have seen this too that relying on the "active image" will not be totally
portable
when switching batch mode on and off and thought that it´s a "feature" of
ImageJ
one has to live with and worked around it with selectImage or doing things
differently
when batchmode is on or not.(I have some scripts where batch mode is a user
option).
Maybe it should/could be fixed?
Joachim
____________________________________________
Leica Microsystems CMS GmbH | GmbH mit Sitz in Wetzlar | Amtsgericht
Wetzlar HRB 2432
Geschäftsführer: Dr. Stefan Traeger | Dr. Wolf-Otto Reuter | Dr. David Roy
Martyr | Colin Davis
ImageJ Interest Group <
[hidden email]> schrieb am 11.03.2009 21:27:17:
> When running the included script with batch mode not set, I get
> "4: active image is test2" from the final print statement. This jibes
> with my intuition about what the active image should be at
> this point. But, if I use "setBatchMode(true)", I get
> "4: active image is test1". Why does using the batch mode cause
> a shift in the active image? Is this correct? This caused me some
> problems until I discovered what was going on and started using
> selectImage() rather than depending on the default active image.
>
> macro batchtest3 {
>
> newImage("test1", "32-bit", 101, 101, 1);
> //setBatchMode(true);
> print("1: active image is ",getTitle());
> img2="test2"; run("Duplicate...","title="+img2);
> print("2: active image is ",getTitle());
> img3="test3"; run("Duplicate...","title="+img3);
> print("3: active image is ",getTitle());
> selectImage(img3); close();
> print("4: active image is ",getTitle());
>
> } //End macro main
>
> David Webster
>
>
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit
http://www.messagelabs.com/email
______________________________________________________________________