bug in "Merge Channels" with batch mode ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bug in "Merge Channels" with batch mode ?

lechristophe
I don't understand why the following macro closes the source image and just
displays the "RGB" merged image (use any RGB image as the source) :

macro "test" {
setBatchMode(true);
run("Duplicate...", "title=temp");
run("Split Channels");
run("Merge Channels...", "red=[temp (red)] green=[temp (green)] blue=[temp
(blue)]");
setBatchMode("exit and display");
}

tested with IJ 1.42k and the latest daily build.
Is it a bug or is there something I don"t get in the way the batch mode
works ?
Reply | Threaded
Open this post in threaded view
|

Re: bug in "Merge Channels" with batch mode ?

Wayne Rasband
On Mar 19, 2009, at 7:41 AM, Christophe Leterrier wrote:

> I don't understand why the following macro closes the source image and
> just
> displays the "RGB" merged image (use any RGB image as the source) :
>
> macro "test" {
> setBatchMode(true);
> run("Duplicate...", "title=temp");
> run("Split Channels");
> run("Merge Channels...", "red=[temp (red)] green=[temp (green)]
> blue=[temp
> (blue)]");
> setBatchMode("exit and display");
> }
>
> tested with IJ 1.42k and the latest daily build.
> Is it a bug or is there something I don"t get in the way the batch mode
> works ?

This macro works as expected in batch mode if it is modified to use the
command recorder generated run("Merge Channels...", "...") call that
includes "gray=*None*" in the options string.

   setBatchMode(true);
   run("Duplicate...", "title=temp");
   run("Split Channels");
   run("Merge Channels...",
     "red=[temp (red)] green=[temp (green)] blue=[temp (blue)]
gray=*None*");
   setBatchMode("exit and display");

-wayne