Skip to content

Extract Images Tool: No window with the title {} found #4

@IlioTheG

Description

@IlioTheG

Error description

While trying to set the input image to the Extract Images Tool of the Process Images toolset, I was getting the following Macro Error: "No window with the title ""C1-myImage.nd2"" found.
image

The input is in .nd2 format that contains a series of images (see image below). I blurred the previews and the details intentionally.
image

Debugging

After some debugging I figured out that when the split channel flag is set to True the script expects to find the windows' names generated by the "Split Channels" command. The expected name of the window for each channel is constructed like this:
SOURCE_WINDOW_NAME = "C" + TEMP_CHANNEL + "-" + FILE_NAME;

Although, when the input image contains a series, that does not work because the resulting name of the image contains the number of the series. For instance, myImage.nd2 (series01).

I figured that out by adding the following snippet in the Extract_Images.ijm to get and print the name of the image titles:

...
ml = getList("image.titles");
if (ml.length==0)
    print("No titles found");
else {
    print("Image titles:");
    print("Number of images: ", + ml.length);
    for (i=0; i<ml.length; i++)
    print("   "+ml[i]);
}
...

Output:

Number of channels: 4
C1-myImage.nd2 - myImage.nd2 (series 01)
C2-myImage.nd2 - myImage.nd2 (series 01)
C3-myImage.nd2 - myImage.nd2 (series 01)
C4-myImage.nd2 - myImage.nd2 (series 01)

But the source window names that the script is expecting are this form: SOURCE_WINDOW_NAME C1-myImage.nd2

Suggestion

I believe that it would be nice to add a check for this case and inform the user that the input should not be a series or even better alter the way the SOURCE_WINDOW_NAME is constructed in the case of series.

Note

I am not related to bio-sciences or use the process images for my job, I was just helping a friend who was facing this issue. Therefore, I am not aware of what is the industry's standard in terms of whether series of images are widely used or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions