Spatial calibration in .TIFF not recognized when picture captured using OLYMPUS Stream software

I have taken pictures under a microscope using Olympus STREAM software and saved it as .TIFF format. I am having issues getting ImageJ/Bio-Formats from properly reading the spatial calibration data from the .TIFF file.

Issue:
ImageJ (FIJI) and Bio-Formats is unable to correctly read spatial calibration data from pictures taken under a microscope using Olympus Stream software. The pictures are saved in .TIFF format.

Troubleshooting steps:

  • I tried opening the .TIFF image file using SCIFIO enabled by going to Edit >> Options > ImageJ2.
  • I tried using Bio-Formats Importers from Plugins >> Bio-Formats, which also did NOT solve the issue.

In both methods, it seems the spatial calibration data (pixel size and unit type) imported is incorrect. You can also confirm this by looking a the sample pictures I have uploaded.

Sample pictures
sample-picture-from-olympus-stream.zip (10.8 MB)

I have attached sample images which include:

  1. a .TIFF file, 2)
  2. a .JPG file which contains a scale bar which was embedded by Olumpus STREAM
  3. a .txt file which contains image properties (metadata) which is outputted by Olympus STREAM.

The .JPG file which has a scale bar scan be used as reference to confirm that when ImageJ/FIJI reads the .TIFF, the imported spatial calibration data is incorrect.

Example

For example, a picture was taken at 10x magnification. Olympus STREAM reports the pixel size of 516.2nm/pixel. However, when the image is opened in ImageJ using Bio-Formats import, the resulting spatial calibration data shows pixel size of 352.7778 pixel/pixel. Therefore, ImageJ/Bio-Formats incorrectly reads the pixel size and the units.

This link contains additional sample TIFF pictures taken using Olympus STREAM: https://app.box.com/s/5pulk5qh75f9zu7eao966w0yxnrvh6rh

It would be great if the dev team can bring support for reading correct spatial calibration metadata from .TIFF pictures taken using OLYMPUS Stream.

Have you tried using the Bioformats Importer function?

Otherwise, you might want to send a TIFF to OME/Bioformats via
https://www.openmicroscopy.org/qa2/qa/upload/

Yes, I also tried using Bio-Formats Importer which also didn’t solve the issue.

@01baftb: thanks for reporting this issue and providing representative samples including ground truth properties allowing to reproduce it. Can these samples be used publicly and even shared under a CC-BY license with the rest of this community?

A preliminary investigation of the issue has been described here. Summarizing briefly, these files are using a proprietary version of the TIFF format, namely the Olympus Soft Imaging Solutions TIFF format. Bio-Formats correctly detects this format but the parsing of the pixel sizes for you files is incorrect. This means the reader needs to be updated and support a different variant of the proprietary metadata.

Regarding support, have you also notified the sofware manufacturer that the metadata of their files is now incorrectly read by Bio-Formats? Since the last few years, the effort of supporting new variants of proprietary file formats is moving away from becoming the sole responsibility of academically funded projects with a growing involvement of manufacturers - see this post for successful examples. It would be good to know whether Olympus is aware of the problem and willing to contribute in its resolution.

Sebastien

3 Likes

@s.besson

I spoke with Olympus tech support and linked them to your response. Olympus dev team said they won’t be updating the Olympus Stream software to modify the .TIFF variation/version. They mentioned they choose that specific variant of .TIFF for legacy compatibility reasons. I have PMed you a more detailed response I have received from Olympus team.

@s.besson

I wanted to share some additional updates regarding this issue which may help troubleshoot the bug.

After discussion with Olympus dev team, I think it is important that I share sample TIFF files which were captured on two different versions of STREAM software. I have capture images taken on STREAM v1.9.4 and STREAM v2.3.3. I have PMed you an updated .zip file which contains sample pictures taken on both versions of STREAM software. The .zip file contains original .vsi file, .tiff file, and a .txt file with ground truth metadata outputted by STREAM, and a .jpg file saved by STREAM which contains a scale bar.

Below are some discrepancies I have noticed with the .TIFF when opened in ImageJ (FIJI).

.TIFF file that was captured using STREAM v1.9.4

  • If file opened using regular method (without SCIFIO enabled), Image >> Show Info does NOT contain any OME metadata nor does it contain any spatial calibration data. Measuring a feature in the image shows pixel count instead of real world spatial units. Screenshot: https://i.imgur.com/0FyuhiW.jpg

  • If file opened using SCIFIO enable, Image >> Show Info shows all the Bio-Formats metadata but it seems the spatial calibration data is incorrect. Screenshot: https://imgur.com/wgnjO6s.jpg

.TIFF file that was captured using STREAM v2.3.3

  • If file opened using regular method (without SCIFIO enabled), Image >> Show Info does contain any OME metadata but it seems the “units” for the spatial calibration data is incorrect and is not properly imported. Measuring a feature in the image shows pixel count instead of real world spatial units. Screenshot: https://imgur.com/NX3HMnM.jpg

  • If file opened using SCIFIO enable, Image >> Show Info shows all the Bio-Formats metadata but it seems the spatial calibration data is incorrect. Screenshot: https://imgur.com/ClK9M7I.jpg

Thanks for sharing some datasets acquired with various versions of STREAM including some ground truth data. A couple of answers from immediate investigation:

  • for both software versions, generated files are suffixed as .tif. However there is a difference between the files generated by STREAM v1.9.4 and STREAM v2.3.3. The latter files do contain imaging metadata expressed as OME-XML. So your TIFF files produced by STREAM v2.3.3 are compliant with the OME-TIFF specification and are read as such by Bio-Formats

  • in terms of metadata, this means STREAM v2.3.2 generated TIFF files will be read from the OME-TIFF reader while STREAM v1.9.4 files are read by the Olympus SIS TIFF reader. So bugs affecting one reader might not necessarily apply to the other.

Focusing on the physical size/calibration:

  • STREAM 2.3.3 stores the physical size metadata as part of the OME metadata and this value is identical to the value given in the ground-truth .txt file (Calibration (X)=1.564 µm/pixel)

    sbesson@ls30630:2019-4-5 Olympus Stream sample pictures $ tiffinfo Stream\ v2.3.3/Image_28.tif | grep Physical
    TIFFReadDirectory: Warning, Unknown field with tag 33560 (0x8318) encountered.
     	<OME:Pixels ID="Pixels:0" DimensionOrder="XYCZT" Type="uint8" SignificantBits="8" Interleaved="true" SizeX="2588" SizeY="1960" SizeC="3" SizeZ="1" SizeT="1" PhysicalSizeX="1.5644063202783145" PhysicalSizeXUnit="µm" PhysicalSizeY="1.5644063202783145" PhysicalSizeYUnit="µm">
    
  • opening the (OME-)TIFF image in Fiji and setting the Tools > Scale bar... using 500 µm gives a representation which matches the .jpeg capture from STREAM


@s.besson

Thank you for your response. I have some follow up questions and concerns.

  1. If I open the OME TIFF file (Stream v2.3.3) with SCIFIO enabled, I get incorrect spatial calibration data being imported. I don’t get the same result as your screenshot. After troubleshooting, I noticed that I must explicit import the image using Bio-Formats importer in order to get the correct spatial calibration data to be imported. Screenshot: https://i.imgur.com/GpdlPop.png

  2. What is the difference between importing an image using SCIFIO enable vs. Bio-Formats importer?

  3. Assuming OME TIFF file (Stream v2.3.3) is behaving corrected as expected, does this mean I must always explicit import those image using Bio-Formats importer? Is there no way to correct import the spatial calibration data by just dragging and dropping OME TIFF files (Stream v2.3.3) into ImageJ (FIJI) or by going to File >> Open

Our lab is using Stream v1.9.4 thus, SIS TIFF format is more of a concern for me. Assuming the Olympus SIS TIFF reader didn’t have any bugs or when all bugs are fixed, I have same questions as #1,2,3. What would be the correct method to import the file into ImageJ with correct spatial calibration data?

SCIFIO is still in beta:

It is distinct from Bioformats though related and can use some components of Bioformats (the readers) as as a plugin:

Eventually, I would hope using the drag and drop functionality versus using the Bioformats Importer directly should show little difference, but that day is not today. For the incorrect spatial calibration via SCIFIO, I recommend opening an issue ticket with them directly:

In the near term, if your main goal is having the convenience of drag and drop my recommendation is to write a short macro to import all your SIS TIFF files via the Bioformats Importer and then export as OME-TIFF files via the Exporter. These OME-TIFF files should be fully compliant and readable by SCIFIO.

For batch conversion options, check this thread:

The easiest option is probably bfconvert:
https://docs.openmicroscopy.org/bio-formats/5.8.2/users/comlinetools/conversion.html

Problem with Bioformat import of Legacy Olympus/SIS Images

I think there is a problem with the import of legacy images from Olympus/SIS software. I had several of these systems in my lab when I retired and will illustrate the problem. I also have a copy here at home of the Olympus Soft Imaging Viewer and the measureIT Application. They run on my Win 7 system and report the “correct” image metadata. These programs let me make simple measurements. I think of these as measurements as the expected values for the metadata.

I am uploading two images in TIFF format, one from an Olympus BX-61 microscope and the second from a FEI Sirion SEM using a SIS ADDA digital scan generator. Both microscopes used Analysis 5.0 to record and process the images.

  1. An Olympus BX-61 that was controlled by the AnalySIS software. The image is from an IAM-1 stage micrometer and was recorded with a 10X objective and stored as a 16 bit image but only has 12 bits/pixel. The large (numbered) spacings are 100 um

    1178um width/ 1600px = 0.73625 um/px
    883.7 um height / 1200px = 0.73642 um/px

    The TIFF image
    BX61-10x-IAM1.tif (3.7 MB)

    And the png of the metadata from AnalySIS 5.0
    BX61-10X-IAM1

    The spacing is 100 um per large division. I have an ImageJ script that will reproducibly load the image in BioFormats:

    @String(label="Base Image Title", style="") str_img_nam
    @String(label="Base Directory", style="") str_dir
    run("Close All");
    // str_dir = "C:/Users/jrminter/Dropbox/KMAG/";
    str_img_ext = ".tif";
    run_str2 = "open=" + str_dir + "/" + str_img_nam + str_img_ext + " autoscale 
     color_mode=Default display_metadata rois_import=[ROI manager] view=Hyperstack 
    stack_order=XYCZT";
    run("Bio-Formats", run_str2);
    str_win_name = "Original Metadata - " + str_img_nam + str_img_ext;
    selectWindow(str_win_name);
    sav_str2 = str_dir + "/" + str_img_nam + "_orig_metadata.csv";
    saveAs("Text", sav_str2);
    run("Close All");
    
  2. KMAG1500Sei.tif
    The Kodak “KMAG” standard was produced by Cornell University for Kodak and certified by the NPL in Great Britain. NIST wasn’t available to do this. The outer rectangular lattice of holes have 1 10.0 um spacing. The second visible lattice of holes have a 1.0 um spacing. This image was recorded with secondary electrons. AnalySIS reported:

    55.25um/656pix = 0.08422 um/px
    55.09/670 = 0.08222 um/px

    Again Bioformats has issues with the import:

    KMag1500Sei.tif (429.9 KB)
    and the metadata from SIS

    KMag1500Sei-SIS-info

I hope these examples help you find the issue. I am willing to help as I can. Now retired, I only have access to a limited number of images…

Thanks for the uploaded samples @John_Minter. For the first image and using the latest Bio-Formats it looks as though the metadata is correct (as below).

Acquisition date: 2002-04-30T16:33:00
BitsPerSample: 16
Camera name: BX61 S
Channel name: BX61 SPOT-RT Mono
Compression: Uncompressed
Image name: LBMN3248_Shade001
ImageLength: 1200
ImageWidth: 1600
Instrument Make: SIS, D-48153 Muenster
Magnification: 10.0
MetaDataPhotometricInterpretation: Monochrome
Nanometers per pixel (X): 0.736454998158789
Nanometers per pixel (Y): 0.736454998158789
NewSubfileType: 0
NumberOfChannels: 1
PhotometricInterpretation: BlackIsZero
ResolutionUnit: None
SamplesPerPixel: 1
Software: analySIS 3.2

With the second image I was able to reproduce the incorrect spatial calibrations in the SISReader.

Thanks. Not sure what happened on that first one. I have another exemplar that fails for you:

IMAGE001.tif (1.5 MB)

And the metadata from the SIS reader

eia2855img001-info

And properties in Fiji after import with BioFormats
IMAGE001-info

Thanks @John_Minter, I was able to reproduce the issue again with that latest sample file. I will keep the Trello card https://trello.com/c/DaFp7bYw/312-olympus-sis-tiff-incorrect-pixelsize-metadata updated with the latest investigation into this