Problem when opening metamorph files in FIJI

Hi all,

I’ve found a weird behavior when I open metamorph nd files in FIJI. Specifically, if the name has an underscore followed by a number in it and there is more than one dataset with the same basename the window’s name in FIJI when I open the file is incorrect.

For example, for three metamorph datasets named run_, run_1 and run_2 consisting of a single plane with 2 channels, I have the following files:

run_.nd
run__w1BF-Phase-acq.TIF
run__w2Fast - TxRed.TIF
run_1.nd
run_1_w1BF-Phase-acq.TIF
run_1_w2Fast - TxRed.TIF
run_2.nd
run_2_w1BF-Phase-acq.TIF
run_2_w2Fast - TxRed.TIF

Note that the verbose part (example: w1BF-Phase-acq) is a descriptor of the setting used to acquire each channel, which in my case gets added automatically to the TIF file names.

When I open run_1 by dragging the nd file into FIJI, the window name is run_1_w1BF-Phase-acq.TIF

When I open run_2 or run_ by dragging the nd file into FIJI, the window name is also run_1_w1BF-Phase-acq.TIF, though the image shown is the correct one.

If, instead of an underscore, the files have a space, a dash or no space at all between the basename and the number, then window names have the proper number.

Metamorph version is 7.10.2.240, which I believe is the latest. FIJI (including BioFormats) is udpated as of today 2019.Aug.12, and is running ImageJ 1.52p.

I can provide a link to the minimal example described above, if that would be useful.

Thanks,
Pablo

@pablo_a

Have you tried importing your images using Bio-Formats (File > Import > Bio-Formats)? The drag/drop method to open files does not use Bio-Formats. See if “Use SCIFIO” is checked in the “Edit - Options - ImageJ2” (read more on SCIFIO [here]). If unchecked, ImageJ is using its own internal libraries… so might have issues.

So try via SCIFIO and/or Bio-Formats. You can also share your image files for us to test as well.

SCIFIO was unchecked; checking “Use SCIFIO” on made the drag-and-drop work properly; thanks for the suggestion!

Using File->Import->Bio-Formats gave the same result as dragging and dropping on my system (before checking SCIFIO on): run_2 image showed up with a run_1 name. In short, SCIFIO fixes the problem, though it is weird that Bio-Formats can’t handle it.

Sample dataset is here, in case anyone wants to play with it (bunch of files in a zipped archive):
http://www.med.unc.edu/uploads/wbddm.namingprob.zip

Best,
Pablo

1 Like

Hi Pablo,

I know it is an old thread, but I thought I give it a try. I had the same issue as you and was really really really happy when I found a solution here (thanks @etadobson!).
However, now I have a different issue: The images are opened with (random?) LUTs and the brightness and contrast are way off. Did that happen to you as well? And if so, did you find a fix for it?
Thanks in advance,
best Nele

Thanks @pablo_a for reporting this here! I somehow completely missed this topic until now (as it was posted when I was on parental leave…). I’ll tag your post with the #bio-formats tag, so that the @OMETeam gets aware of it.


I reported this problem on GitHub last year:

together with some other issues concerning the Metamorph format:

These GitHub issues were closed in favor of several Trello cards tracking this issue, and a pull request that was labeled as blocking, because apparently it the fix was breaking the reading of some legacy datasets in the bioformats archive. So there’s still no fix to this issue as of the time of this writing.

It’s unfortunate that #bio-formats apparently relies on the first underscore in the filename as a delimiter of the basename, even though the Metamorph format is clearly documented by Molecular Devices here:

http://mdc.custhelp.com/app/answers/detail/a_id/18979

Glad to hear that SCIFIO at least fixes the problem with the image titles (if not the more important issues when it’s actually reading wrong pixel data… SCIFIO is relying on Bio-Formats to read the data).

Hi @Nele09, do you have any further details on the LUT issue? If you have a sample file which the Bio-Formats team can test you can upload it to https://www.openmicroscopy.org/qa2/qa/upload/

Hi David,
thanks for getting in contact. I’ve uploaded a sample set - basically when I now open the .nd file they get assigned a random LUT (red for 405, green for 488, blue for 561 and cyan for 642) and everything is too bright. Easily fixed, but still strange behavior.
Additionally, I noticed that even with SCIFIO activated the filenames are still imported incorrectly when I open the files with a batch macro. And on files with different positions or with different z-stacks in different wavelengths only the first position/wavelength is opened. I’m happy to provide samples for this as well. (The Bio-Formats Series Options window to select these things does not come up anymore)

Thanks a lot for your help!!

Hi Nele,

Nice to know someone else ran into this problem and found this thread helpul.

Using drag and drop or bioformats opening, my two-channel images open with both channels in a grayscale LUT. Using SCIFIO they open with red and green LUTs respectively. The (auto)scaling on the first channel is the same across opening modalities. The (auto)scaling on the second channel is different (and correct) in bioformats opening, but is the same as the scaling for the FIRST channel when opening using SCIFIO. If you can replicate this behavior, I predict your first channel will look ok, but the rest might not (unless they happen to have a similar intensity distribution to the first channel).

Maybe this is a bug in SCIFIO’s interaction with Metamorph files?

Best,
Pablo

Hi Jan,
I appreciate you tagging my post to provide visibility to Bio-Formats, as well as putting it in the context of other reports of similar problems.
Best,
Pablo

Hi Pablo,

yes, you were right, the autoscaling was optimized for the first channel and simply did not match the others.
In the meantime I found a little workaround to the problem. If you remove all dashes and underscores from your filenames (turn ‘Unnecessary_Long_Filename_01’ to ‘UnnecessaryLongFilename01’) they open with the correct filenames without activating SCIFIO. For Windows I found the ‘Bulk Rename Utility’ (https://www.bulkrenameutility.co.uk) who does it easily.
It doesn’t fix it, but it lets me run my macros. :slight_smile:

Thanks to everyone who has been reporting these issues and providing sample files. I have opened a new GitHub Issue for the autoscaling: https://github.com/ome/bioformats/issues/3481

Once the next Bio-Formats 6.3.1 release is out I will try to take another look at the naming issues to see if it can be resolved.

1 Like

I guess you’ll need to keep the channel identifiers intact (i.e. _w1<whatever-comes-here>) because they are defined in the .nd file. Is that what you did, @Nele09?

Thanks for the tip about the bulk renamer; that will really come in handy in multiple scenarios.

Yes, you’re right. I only changed the name of the .nd file and the core of the corresponding .tiffs - hence the hint to the bulk renamer.