Omero image import linking metadata to display

Hi,

I have a question about linking acquisition metadata to the display of images in Omero (5.4.10). I am importing .tif’s with multiple channels. The original acquisition metadata is imported into Omero, but the display tools (iViewer, preview etc.) don’t reflect that information. This is a screenshot of the situation. I can’t seem to change the “unset fields” in the GUI though ultimately I’d like to do this in an automated fashion on import. I have access to the CLI:

A bit of backstory. If I import these images from the raw instrument output then this information is carried over into Omero. You can see the channel is now “Opal 690” instead of “0”.

It was after opening with Bioformats in Fiji and changing the bit depth and then re-saving and importing into Omero when then assign the channel name fields were not assigned properly.

thanks in advance!

Hi @johnmc,

It certainly looks like something was lost during the conversion. Are you exporting the imaging data as plain TIFF? If so, could you tried exporting it as OME-TIFF as the format retains the OME metadaata (Instrument, Channel…) read from the proprietary file format in addition to the original metadata during the export.

If that does not work, would you have sample files of the original and exported files you could share with us?

Best,
Sebastien

Hi Sebastien, Thanks for the reply! I did try saving as a .tif and an ome-tif. Neither one works to link the metadata to the omero display.

Ome-tiff:
18%20PM

“regular” tif:
00%20PM

It actually looks like the regular tiff has more metadata left, but it isn’t linked to the channel color/number in the display.

I would attach an original image, but it’s too big (33 Mb). I can’t open the original (crop it) and save in the same format. Is there a drop box somewhere I can use? I can send the original and the converted versions.

-John

Hi John,

can you try uploading a sample file to http://qa.openmicroscopy.org.uk/qa/upload/?

Best,
Sebastien

Ok, I uploaded three files. the original and the original changed to 8bit, cropped and saved as an ome-tiff and finally another one cropped and converted and then saved as a “regular” tiff.

Not sure if I did the upload right. In the email field I put my email. If this was correct maybe this field could be labelled “From Email:”. Also, given the Flash requirement I could only get this to work on chrome on windows. (chrome on mac: no, safari on mac: no, windows explorer: no, chrome on windows: yes).

1 Like

Hi @johnmc,

thanks for uploading the files, I retested them in an OMERO server and can confirm your behavior i.e.:

  • the original file (Vectra QPTIFF format) contains 2 series and has both OME metadata (image, channels) as well as Original Metadata for the PFF
  • the two TIFF images derived from the first series contain no OME metadata and the one called ometiff_component_data.tif contains minimal original metadata

Looking into the TIFF files, it turns out both files are actually a plain TIFF and contain no OME metadata. The absence of such metadata explains why the channel names are lost during the conversion.

I retested the generation of derived OME-TIFF files using two workflows:

  • in Fiji, setting the pixel type, cropping and saving as fiji_crop.ome.tiff as described in your example
  • using the following command with the command-line tools bfconvert -series 0 -crop 0,0,500,500 original_component_data.tif cl_crop.ome.tiff

After generation, these files were imported into a server

44 58

In both cases, the OME metadata is preserved during conversion. There is an issue we need to look into as the original metadata does not seem to be preserved by the ImageJ plugin exporter.

In your export worflow, how did you save the processed image as an OME-TIFF? You might need to ensure the extension of the file is .ome.tif[f] to force the code to use the correct format writer.

Hi Sebastien,

I can confirm that the command line approach works for me. I ran the bfconvert command stated above and loaded into Omero:

I also tried to convert the file via a python script:

from ij import IJ
from loci.plugins import BF
inPath = “/Users/john/Desktop/omero/original_component_data.tif”
outPath = “/Users/john/Desktop/omero/bf_crop.ome.tif”
imps = BF.openImagePlus(inPath)
imp = imps[0]
imp.show()
IJ.run(imp, “8-bit”, “”)
imp.setRoi(0,0,500,500)
IJ.run(imp, “Crop”, “”)
IJ.run(imp, “Bio-Formats Exporter”, “save=[” + outPath + “] compression=Uncompressed”)

Which worked to carry over the channel data, but not as much other stuff as the bfconvert method:

I see how to set “options” when opening images using BF, but I don’t understand how to write an image with options. I see the recent posts about using ImageReader and ImageWriter, but I don’t see how to get from a bioformats “plane” <type ‘array.array’> to an ImageJ “imp” I can manipulate.

I also tried to do a manual save in ImageJ with the add the “.tif[f]” onto the end:

But it failed:

I tried adding that force extension “[f]” in various methods and none worked. When can one use that?

It looks like I can use the bfcovert to do this right or the loci.plugin BF function to get pretty close. Thanks for your help!

-John

Hi John

sorry, .ome.tif[f] was confusing. I meant that either .ome.tif or .ome.tiff will be valid filename extensions to get the data written using the OME-TIFF file format.