http://imagej.273.s1.nabble.com/Batch-Processing-channel-split-window-name-tp5016467p5016472.html
when you get this error, look at the names of the images that are open. I bet that they are named T+ (“ green”) or T+ (“ red”) and so on as opposed to being named "C1-“ T as your macro states. If this is the case, it will split the channels and then give the error you are describing because ImageJ is looking to select the C1-T but can’t find it because it is named T+(“color”). I ran into a similar issue when I wrote a macro to split channels and then save the channels to appropriately named folders. Unfortunately, I am new to macro programming as well and I do not know how to solve this problem. It seems like different computers or versions of imageJ/FIJI name the output from Split Channels differently and this causes the error. I ended up writing two versions to process the images in either format, but I am sure there is an easier way to solve it that I am not aware of. Check if this is the issue though, it will help narrow down the source of the error at least.
> On May 19, 2016, at 8:06 AM, MickMunson <
[hidden email]> wrote:
>
> Hi,
>
> I am very new to macro creating so apologies if it is something simple I am
> missing.
>
> I have created a macro to first of all split a three colour image and then
> to process these channels relative to each other. This macro seems to work
> perfectly fine if I manually open a single image then run the macro, however
> I am having trouble when I use this to batch process a series of images from
> a folder. Normally if I open then split the channels it creates three
> windows, C1-/C2-/C3- file name. When batch processing it hits an error
> saying file by this name doesn't exist. I'm not sure if there is an easy way
> to troubleshoot this? Also is there any easy way to store the data from each
> file processed that can be included in the macro?
>
> Macro:
>
> T = getTitle();
> selectWindow(T);
> run("Split Channels");
>
> selectWindow("C1-"+T);
> Blue = getTitle();
> selectWindow("C2-"+T);
> Green = getTitle();
> selectWindow("C3-"+T);
> Red = getTitle();
>
> selectWindow(Red);
> setAutoThreshold("Default dark");
> run("Threshold...");
> setThreshold(20, 255);
> setOption("BlackBackground", false);
> run("Convert to Mask");
>
> selectWindow(Green);
> setAutoThreshold("Default dark");
> run("Threshold...");
> setThreshold(20, 255);
> setOption("BlackBackground", false);
> run("Convert to Mask");
> run("Create Selection");
>
> selectWindow(Red);
> run("Restore Selection");
> run("Enlarge...", "enlarge=2 pixel");
> run("Clear", "slice");
> run("Invert");
> run("Select None");
> run("Analyze Particles...", "size=0.10-Infinity pixel show=Outlines display
> exclude include summarize");
>
> Many thanks for your time and help.
>
>
>
> --
> View this message in context:
http://imagej.1557.x6.nabble.com/Batch-Processing-channel-split-window-name-tp5016467.html> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html