Error in "merge Images " in BatchMode

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

Error in "merge Images " in BatchMode

Eik Schumann
Dear list,

using the latest Version of IJ I observe an error when using the "merge
channels" command in BatchMode.
Each time I merge three open images (3 threads) I get an RGB image plus
the source images (4 threads) instead of just one resulting RGB (one
thread).
Without BatchMode everything works fine. The option for keep source
images is not acrivated, of course.
Batch processing several thousands of images I get more and more open
threads, as can be seen with the "Monitor Memory" command.
I`m sure that the addiitional threads are created at this step. I went
through the macro step by step watching the number of open threads
Finally I run out of memory.


Channel names are stored in an array "chan". This array is used to name
the correct images.

         setBatchMode(true);
         //.......

             run("Merge Channels...", "red="+chan[3]+" green="+chan[2]+"
blue="+chan[1]+" gray=*None*");

             selectWindow(chan[3]); close();
             selectWindow(chan[2]); close();
             selectWindow(chan[1]); close();



Unfortunately I can`t reproduce the behaviour by using just this piece
of code.
I found a workaround by explicitely deleting the source images after the
merge. Now memory is no longer a problem.

I hope this is of help to find the problem.

Regards

Eik
Reply | Threaded
Open this post in threaded view
|

Re: Error in "merge Images " in BatchMode

Rasband, Wayne (NIH/NIMH) [E]
On Feb 13, 2012, at 11:39 AM, Eik Schumann wrote:

> Dear list,
>
> using the latest Version of IJ I observe an error when using the "merge
> channels" command in BatchMode.
> Each time I merge three open images (3 threads) I get an RGB image plus
> the source images (4 threads) instead of just one resulting RGB (one
> thread).
> Without BatchMode everything works fine. The option for keep source
> images is not acrivated, of course.

This bug is fixed in the ImageJ 1.46g daily build.

-wayne


> Batch processing several thousands of images I get more and more open
> threads, as can be seen with the "Monitor Memory" command.
> I`m sure that the addiitional threads are created at this step. I went
> through the macro step by step watching the number of open threads
> Finally I run out of memory.
>
>
> Channel names are stored in an array "chan". This array is used to name
> the correct images.
>
>         setBatchMode(true);
>         //.......
>
>             run("Merge Channels...", "red="+chan[3]+" green="+chan[2]+"
> blue="+chan[1]+" gray=*None*");
>
>             selectWindow(chan[3]); close();
>             selectWindow(chan[2]); close();
>             selectWindow(chan[1]); close();
>
>
>
> Unfortunately I can`t reproduce the behaviour by using just this piece
> of code.
> I found a workaround by explicitely deleting the source images after the
> merge. Now memory is no longer a problem.
>
> I hope this is of help to find the problem.
>
> Regards
>
> Eik