Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
IlioTheG opened this issue Nov 25, 2024 · 1 comment
Open

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

IlioTheG opened this issue Nov 25, 2024 · 1 comment

Comments

@IlioTheG
Copy link

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.

@cleterrier
Copy link
Owner

Hi, thank you for the report. The Github version was not updated for a while as I use the Fiji Update site mechanism that allow people to update directly in the software now. I have updated the macros here and there should be a fix for that in the newer version of the "Extract Images" macro called by the Extract Images Tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants