Login  Register

Re: File formats and pixel size

Posted by Herbie on Jun 04, 2021; 1:41pm
URL: http://imagej.273.s1.nabble.com/File-formats-and-pixel-size-tp5024686p5024700.html

Sent on behalf of Philippe CARL @ Université de Strasbourg
__________________________

Dear Aleksandr,
Similarly to you I don't like to use the Bioformats importer not only
due to its displayed selection window but also and especially the needed
(incredibly huge) time just for opening a simple pictures stack.
As such "heavy duty" workflow may be acceptable in the case you just
need to open a couple of such files, it becomes way to heavy when you
need to work with a lot of such files.
Thus what I did was to follow exactly the recommandation of Herbie of
writing a macro that allows to perform an ad hoc formatting of files
"wrongly read by ImageJ" through a Drag&Drop opening.
And I added this reformatting code within the StartupMacros.txt and call
it through a Shortcut.
So if you wish I could make this code available for you to have a
starting point in order to create your own solution.
My best regards,
Philippe

Philippe CARL
Laboratoire de Bioimagerie et Pathologies
UMR 7021 CNRS - Université de Strasbourg
Faculté de Pharmacie
74 route du Rhin
67401 ILLKIRCH
Tel : +33(0)3 68 85 42 89
__________________________

Am 03.06.21 um 17:06 schrieb Aleksandr Mironov:

> Dear Listers,
>
> I need some help from your collective knowledge and experience about file formats and ImageJ. Currently, I am using Velox software (Thermo Fisher Scientific) to operate Ceta CMOS camera on my Talos electron microscope. It is a great program with great and convenient user interface substituting the older clunky TIA software.
>
> However, there is a small caveat - image formats. Original image format called "emd" is supposed to be a kind of hdf5, but I was not able to find any free image manipulation program that can easily read that.
>
> So, the only choice I have is to convert emd file to tiff or mrc files (by included batch converter with Velox). And that is where my problem lies.
>
> If I just drag and drop tiff/mrc files to ImageJ/Fiji then pixel size is not recognized. If you would open them using Bioformats then pixel size could be read properly. Also, if I save an image opened with Bioformats as tiff then pixel size is readable again.
>
> Of course, I have written small script that can do this in batch mode for all my files. But it looks not very elegant and still does not answer the question why pixel size cannot be read by standard ImageJ/Fiji.
>
> You can try it yourself with example files that are here: https://drive.google.com/drive/folders/13rKcUHrgHwFxZZoLsiXjlW2IxwjFeZ8p?usp=sharing
>
> In that folder you will find:
> Test.emd - original Velox file
> Test.mrc and Test.tif - file converted by Velox
> Test.tif_to_IJ.tif - file was opened with Bioformats and saved with ImageJ tiff option
>
> I had some discussions with Velox team and their explanation is the following:
>
> "We dive into details, apparently it looks like ImageJ is still reading pixel size information from dpi field.  It is not something we can use: if you use these fields, then copy/paste into other programs becoming crazy.  For example, if you paste such image in the word, it often tries to put image in the document by using physical dimensions pixels/dpi.  As a result, people were getting 50x50nm image in the document, which was not possible to see after print".
>
> So, my question is - is it possible to change the way how ImageJ is reading pixel size?
>
>
> I have a bit more in depth explanations from Velox team about their formats:
>
> quote begins========================================================
>
> I think there are two places to pay attention to:
>
> 1.New standard we are using is xml in the custom field of tiff file and it contains all possible metadata, not just pixel size.  So, this is the most extensive information, and I would recommend to use it if there is interest to access not just pixel size
>
> Tiff metadata format
>
> When exporting tiff raw data (16 bit tiff eport), the metadata is added to the tiff fields:
> - All metadata is placed in a custom private tiff tag in xml format:
> - Private Tiff tag 34683 is used to store the XML data
> - FeiMetadata1.0-updated.xsd describes the format (ftp://ftp.vsg3d.com/private/MASTERS/Velox/Velox/FeiMetadata1.0-updated.xsd).
>
> 2.       However, in the past we also used txt tags, which are still used in SDB and many of our SW packages still did not switch to the new format.  It was enabled in Velox 3.0. It might be more useful for multiple package compatibility. Pixel size is placed in a custom private tiff tag in xt format if pixel size is in meter:
>
> a) Private Tiff tag 34682 is used to store the text:
>
> Beam: Beam, Scan
> Scan:  PixelWidth, PixelHeight
> EScan: PixelWidth, PixelHeight
>
> Example
>
> [Beam]
> Beam=EBeam
> Scan=EScan
>
> [Scan]
> PixelWidth=2.69792e-009
> PixelHeight=2.69792e-009
>
> [EScan]
> PixelWidth=2.69792e-009
> PixelHeight=2.69792e-009
>
> quote ends===========================================
>
> Best regards,
> Alex
>
> --
> Dr. Aleksandr Mironov MD, PhD
> Senior Experimental Officer
> D.1527, M.Smith Building
> EM Core Facility (FBMH)
> RRID: SCR_021147
> University of Manchester
> Oxford Road
> Manchester
> M13 9PT
> UK
>
> Tel. +44-(0)161-275-5645
> E-mail: [hidden email]
> Visit our Intranet EMCF web-page<https://app.bmh.manchester.ac.uk/facilities/research/electronmicroscopy/default.aspx>
> Visit our EMCF Microsoft Team<https://teams.microsoft.com/l/team/19%3acbd90045098142469739abf26c6a94b4%40thread.tacv2/conversations?groupId=158933c5-fb09-4039-8f12-69b0b0426882&tenantId=c152cb07-614e-4abb-818a-f035cfa91a77>
> Visit our external EMCF web-page<https://www.bmh.manchester.ac.uk/research/facilities/electron-microscopy/>
> <https://teams.microsoft.com/l/team/19%3acbd90045098142469739abf26c6a94b4%40thread.tacv2/conversations?groupId=158933c5-fb09-4039-8f12-69b0b0426882&tenantId=c152cb07-614e-4abb-818a-f035cfa91a77><https://teams.microsoft.com/l/team/19%3acbd90045098142469739abf26c6a94b4%40thread.tacv2/conversations?groupId=158933c5-fb09-4039-8f12-69b0b0426882&tenantId=c152cb07-614e-4abb-818a-f035cfa91a77><https://teams.microsoft.com/l/team/19%3acbd90045098142469739abf26c6a94b4%40thread.tacv2/conversations?groupId=158933c5-fb09-4039-8f12-69b0b0426882&tenantId=c152cb07-614e-4abb-818a-f035cfa91a77><https://teams.microsoft.com/l/team/19%3acbd90045098142469739abf26c6a94b4%40thread.tacv2/conversations?groupId=158933c5-fb09-4039-8f12-69b0b0426882&tenantId=c152cb07-614e-4abb-818a-f035cfa91a77><https://teams.microsoft.com/l/team/19%3acbd90045098142469739abf26c6a94b4%40thread.tacv2/conversations?groupId=158933c5-fb09-4039-8f12-69b0b0426882&tenantId=c152cb07-614e-4abb-818a-f035cfa91a77><https://teams.microsoft.com/l/team/19%3acbd90045098142469739abf26c6a94b4%40thread.tacv2/conversations?groupId=158933c5-fb09-4039-8f12-69b0b0426882&tenantId=c152cb07-614e-4abb-818a-f035cfa91a77><https://teams.microsoft.com/l/team/19%3acbd90045098142469739abf26c6a94b4%40thread.tacv2/conversations?groupId=158933c5-fb09-4039-8f12-69b0b0426882&tenantId=c152cb07-614e-4abb-818a-f035cfa91a77><https://teams.microsoft.com/l/team/19%3acbd90045098142469739abf26c6a94b4%40thread.tacv2/conversations?groupId=158933c5-fb09-4039-8f12-69b0b0426882&tenantId=c152cb07-614e-4abb-818a-f035cfa91a77><https://teams.microsoft.com/l/team/19%3acbd90045098142469739abf26c6a94b4%40thread.tacv2/conversations?groupId=158933c5-fb09-4039-8f12-69b0b0426882&tenantId=c152cb07-614e-4abb-818a-f035cfa91a77><https://teams.microsoft.com/l/team/19%3acbd90045098142469739abf26c6a94b4%40thread.tacv2/conversations?groupId=158933c5-fb09-4039-8f12-69b0b0426882&tenantId=c152cb07-614e-4abb-818a-f035cfa91a77>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html