Re: File formats and pixel size

Posted by Cardone, Giovanni on
URL: http://imagej.273.s1.nabble.com/File-formats-and-pixel-size-tp5024686p5024695.html

Dear Aleksandr,

as Wayne suggested, you could use the ImageJ2 option to use the scifio library as default.
When used with mrc files, the pixel size is properly read and reported, but unfortunately the physical unit reported is wrong. By default mrc files store in their header, although indirectly, the pixel size in angstroms, and the bioformats library converts the value to microns. However, this does not happen with the mentioned option, and in your case ImageJ reports the pixel size as 10.4976 pixels, instead of Angstroms. You could try and highlight this issue to the Fiji developers.
By the way, the issue with the mrc files arises from the fact that there is a default reader (Open_MRC_Leginon.class) that is invoked when a mrc file is dragged and dropped. The reader is very basic, and ignores most of the content of the header in the files, including any extension from the most recent 2014 mrc format specifications, which instead the Velox software implements (but probably also the bioformats ignore it).  
I hope this helps.

Giovanni


-----Original Message-----
From: ImageJ Interest Group <[hidden email]> On Behalf Of Wayne Rasband
Sent: Friday, June 4, 2021 5:42 AM
To: [hidden email]
Subject: Re: File formats and pixel size

> On Jun 3, 2021, at 12:19 PM, Aleksandr Mironov <[hidden email]> wrote:
>
> Dear Herbie,
>
> ImageJ/Fiji are able to open both tiff and mrc file by using Bioformats plugin (Sorry, if I was unclear). But this method asks for several clicks through menu and involves search for the source folder (in file explorer). If you work with one file - it is fine. However, if you working on many files, then it mounts to a significant degree.
>
> I would prefer open the folder/folders with necessary files and drag/drop them directly into ImageJ/Fiji. But this mode results in wrong pixel size.

Bio-Formats will open images dragged and dropped on the ImageJ window when you enable “Use SCIFIO when opening files (BETA)” in Fiji's Edit>Options>Image2 dialog but there appears to be a bug that causes the image size of your test image to be set to 0.00x0.00 pixels. What does work is opening the Plugins>Bio-Formats>Bio-Formats Plugins Shortcuts Window and dragging and dropping files on it.

-wayne

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

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