Names of images are predictable because you should know the original image
from which the channels originate.
So if your image is called "2018 03 15 002.jpg" get its name with e.g.
thisTitle=getTitle();
The green channel image is, as mentioned, predictable:
thisTitle + " (green)"
Now if you want to know all the image titles before opening, you need to get
the file list from the folder using this:
https://imagej.nih.gov/ij/developer/macro/functions.html#getFileListAlso have a look into "batch processing", as there might be more than one way
of doing what you are after.
Cheers
Gabriel
On Friday, 9 August 2019 13:48:28 BST
[hidden email] wrote:
> Dear List,
>
> I am performing a macro to apply in different images.
>
> I split each image in channels, and then I work in this channels. I would
> like to know if there is the possibility to create a macro for all the
> images that will be capable of select channels and treat them individually.
> I mean, e.g.:
>
>
> run("Split Channels");
>
> selectWindow("2018 03 15 002.jpg (green)")
>
>
> here I select a window with a concrete name that will be different for other
> images. The only that they will have in common it will be "channel green").
>
> So, how I can program "2018 03 15 002.jgp (green)" to be a stardard "green"
> file ?
>
> thank you
> Carmen
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html