Error in code when applied to batch processing

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

Error in code when applied to batch processing

Adrián Villalba
Dear all,

I have a single code that works fine with single images, but when applied
to batch processing (Import>Image sequence) it does not work properly. The
following code:

run("Split Channels");
selectWindow(title+" (blue)");
close();
selectWindow(title+" (red)");
close();
selectWindow(title+" (green)");

Does not close the red and blue channels when applied to image sequences
and it appeared a new screen showing my a bug. Do you know what can cause
it and if it can be repaired?

Thank you in advance!

--

   - Adrián Villalba Felipe.
   https://es.linkedin.com/in/adrianvillalba

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Error in code when applied to batch processing

Menelaos Symeonides
Hi Adrián,

You need to define "title" first. Add this to the beginning of the macro:

title = getTitle();

Does that work?

Mel


On 6/8/2018 10:03 AM, Adrián Villalba wrote:

> Dear all,
>
> I have a single code that works fine with single images, but when applied
> to batch processing (Import>Image sequence) it does not work properly. The
> following code:
>
> run("Split Channels");
> selectWindow(title+" (blue)");
> close();
> selectWindow(title+" (red)");
> close();
> selectWindow(title+" (green)");
>
> Does not close the red and blue channels when applied to image sequences
> and it appeared a new screen showing my a bug. Do you know what can cause
> it and if it can be repaired?
>
> Thank you in advance!
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html