We're Hiring!

Metadata differ from systems

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

Metadata differ from systems

Postby phm » Tue Sep 13, 2016 3:30 pm

Hi,

When I read the metadata of an ND file with image plugin, I didn't find the same value according to the OS on which run the program.

Code: Select all
ServiceFactory factory = new ServiceFactory();
            OMEXMLService service = factory.getInstance(OMEXMLService.class);
            IMetadata meta = service.createOMEXMLMetadata();
            ImageProcessorReader reader = new ImageProcessorReader();
            reader.setMetadataStore(meta);
            reader.setId(imageName);
                    // read only last series
                        reader.getSeriesCount();
                        int series =  reader.getSeriesCount() - 1;
                        reader.setSeries(series);
                        int zStep = reader.getSizeZ();
                        String seriesName = meta.getImageName(series);         // name of current series
                        Length sx = meta.getPixelsPhysicalSizeX(series);
                        Length sy = meta.getPixelsPhysicalSizeY(series);
                        Length sz = meta.getPixelsPhysicalSizeZ(series);
                        System.out.println("sx ="+sx.value().doubleValue());
                        System.out.println("sx ="+sy);
                        System.out.println("sx ="+sz);
                        cal.pixelHeight = sy.value().doubleValue();
                        cal.pixelDepth = sz.value().doubleValue();


On Ubuntu a got
sx = 0.15
sy = 0.15
sz = 0.6

On Windows or Mac Os x :
sx = 0.15
sy = 0.15
sz = null

What's wrong ????
Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Metadata differ from systems

Postby kennethgillen » Tue Sep 13, 2016 3:34 pm

Hi Philippe,

Can you please check, and tell the community which Bio-Formats version you are running on each of the systems?

Thanks,

Kenny
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: Metadata differ from systems

Postby phm » Tue Sep 13, 2016 3:39 pm

kennethgillen wrote:Hi Philippe,

Can you please check, and tell the community which Bio-Formats version you are running on each of the systems?

Thanks,

Kenny


5.2.2 for all

Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Metadata differ from systems

Postby sbesson » Tue Sep 13, 2016 6:29 pm

Hi Philippe,

thanks for the information. At this point, to debug more we likely need to have a look at the original files. How large are you nd filesets? Would it be possible to share one of them either publicly or by uploading it at http://qa.openmicroscopy.org.uk/qa/upload/ ?

Best,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: Metadata differ from systems

Postby phm » Wed Sep 14, 2016 9:23 am

sbesson wrote:Hi Philippe,

thanks for the information. At this point, to debug more we likely need to have a look at the original files. How large are you nd filesets? Would it be possible to share one of them either publicly or by uploading it at http://qa.openmicroscopy.org.uk/qa/upload/ ?

Best,
Sebastien

Hi Sebastien,

I uploaded the files to our server. The status feedback is (if you needed?):
https://www.openmicroscopy.org/qa2/qa/f ... a406bcc9b0

Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Metadata differ from systems

Postby sbesson » Fri Sep 16, 2016 11:26 am

Hi Philippe,

thanks for the upload. Opening the master ND file under Linu with Bio-Formats 5.2.2, the read metadata does not match the values you gave in your original post. The fileset contains 2 series and the physical sizes in X and Y are 0.103 microns while the physical size in Z is not set for each series.

Can you confirm this information and does Ubuntu also shows a non-null physical size in Z for this particular fileset?

Best,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: Metadata differ from systems

Postby phm » Fri Sep 16, 2016 1:51 pm

sbesson wrote:Hi Philippe,

thanks for the upload. Opening the master ND file under Linu with Bio-Formats 5.2.2, the read metadata does not match the values you gave in your original post. The fileset contains 2 series and the physical sizes in X and Y are 0.103 microns while the physical size in Z is not set for each series.

Can you confirm this information and does Ubuntu also shows a non-null physical size in Z for this particular fileset?

Best,
Sebastien


Hi Sebastien,
The fileset contains 2 series, but in my script I read only the last which have 4 channels and 21 Z. The X and Y pixel size is 0.103 and Z = 1(not set) when you open the ND file inside Fiji with Bio-format plugin importer.
However, the line "Length sz = meta.getPixelsPhysicalSizeZ(series);" in my script return null pointer in Windows and Mac Os x but not in Linux ???
Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Metadata differ from systems

Postby sbesson » Mon Sep 19, 2016 11:16 am

Hi Philippe,

Interestingly, I was not able to reproduce your issue using the Bio-Formats command line tools on Linux (Gentoo & CentOS6) where showinf -omexml does not populate the physical size in Z for any image in both cases

Code: Select all
$ ~/bftools-5.2.2/showinf -nopix -omexml /ome/apache_repo/17336/p1485\ RAW\ activée\ +\ PMA\ marquage\ LAMP1\ -\ 1h.nd | grep Pixels
      <Pixels BigEndian="false" DimensionOrder="XYZCT" ID="Pixels:0" Interleaved="false" PhysicalSizeX="0.103" PhysicalSizeXUnit="µm" PhysicalSizeY="0.103" PhysicalSizeYUnit="µm" SignificantBits="16" SizeC="1" SizeT="1" SizeX="2048" SizeY="2048" SizeZ="1" Type="uint16">
      </Pixels>
      <Pixels BigEndian="false" DimensionOrder="XYZCT" ID="Pixels:1" Interleaved="false" PhysicalSizeX="0.103" PhysicalSizeXUnit="µm" PhysicalSizeY="0.103" PhysicalSizeYUnit="µm" SignificantBits="16" SizeC="4" SizeT="1" SizeX="2048" SizeY="2048" SizeZ="21" Type="uint16">
      </Pixels>


Can you confirm you can reproduce the issue outside of the context of your script, e.g. using the Bio-Formats command line tools on the Ubuntu environment as described above? If so, the Pixels block should contain a populated PhysicalSizeZ element. Also which locale is set up in your environment?

Best,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: Metadata differ from systems

Postby phm » Mon Sep 19, 2016 1:15 pm

sbesson wrote:Hi Philippe,

Interestingly, I was not able to reproduce your issue using the Bio-Formats command line tools on Linux (Gentoo & CentOS6) where showinf -omexml does not populate the physical size in Z for any image in both cases

Code: Select all
$ ~/bftools-5.2.2/showinf -nopix -omexml /ome/apache_repo/17336/p1485\ RAW\ activée\ +\ PMA\ marquage\ LAMP1\ -\ 1h.nd | grep Pixels
      <Pixels BigEndian="false" DimensionOrder="XYZCT" ID="Pixels:0" Interleaved="false" PhysicalSizeX="0.103" PhysicalSizeXUnit="µm" PhysicalSizeY="0.103" PhysicalSizeYUnit="µm" SignificantBits="16" SizeC="1" SizeT="1" SizeX="2048" SizeY="2048" SizeZ="1" Type="uint16">
      </Pixels>
      <Pixels BigEndian="false" DimensionOrder="XYZCT" ID="Pixels:1" Interleaved="false" PhysicalSizeX="0.103" PhysicalSizeXUnit="µm" PhysicalSizeY="0.103" PhysicalSizeYUnit="µm" SignificantBits="16" SizeC="4" SizeT="1" SizeX="2048" SizeY="2048" SizeZ="21" Type="uint16">
      </Pixels>


Can you confirm you can reproduce the issue outside of the context of your script, e.g. using the Bio-Formats command line tools on the Ubuntu environment as described above? If so, the Pixels block should contain a populated PhysicalSizeZ element. Also which locale is set up in your environment?

Best,
Sebastien


Hi Sebastien,

Code: Select all
~/Téléchargements/bftools$ ./showinf -nopix -omexml ~/Images/Espeli/Victoria/p1485\ RAW\ activée\ +\ PMA\ marquage\ LAMP1\ -\ 24h2_w1\[None\].TIF/p1485\ RAW\ activée\ +\ PMA\ marquage\ LAMP1\ -\ 24h2.nd | grep Pixels
      <Pixels BigEndian="false" DimensionOrder="XYZCT" ID="Pixels:0" Interleaved="false" PhysicalSizeX="0.103" PhysicalSizeXUnit="µm" PhysicalSizeY="0.103" PhysicalSizeYUnit="µm" SignificantBits="16" SizeC="1" SizeT="1" SizeX="2048" SizeY="2048" SizeZ="1" Type="uint16">
      </Pixels>
      <Pixels BigEndian="false" DimensionOrder="XYZCT" ID="Pixels:1" Interleaved="false" PhysicalSizeX="0.103" PhysicalSizeXUnit="µm" PhysicalSizeY="0.103" PhysicalSizeYUnit="µm" PhysicalSizeZ="0.6" PhysicalSizeZUnit="µm" SignificantBits="16" SizeC="4" SizeT="1" SizeX="2048" SizeY="2048" SizeZ="41" Type="uint16">
      </Pixels>

It seems that I got the same value except for Z.
My locate is .
Code: Select all
phm@phm-HP-Z820-Workstation:~/Téléchargements/bftools$ locale
LANG=fr_FR.UTF-8
LANGUAGE=fr
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC=fr_FR.UTF-8
LC_TIME=fr_FR.UTF-8
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY=fr_FR.UTF-8
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER=fr_FR.UTF-8
LC_NAME=fr_FR.UTF-8
LC_ADDRESS=fr_FR.UTF-8
LC_TELEPHONE=fr_FR.UTF-8
LC_MEASUREMENT=fr_FR.UTF-8
LC_IDENTIFICATION=fr_FR.UTF-8
LC_ALL=


Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Metadata differ from systems

Postby sbesson » Tue Sep 20, 2016 11:22 am

Hi Philippe,

some update on this thread. Although I have not been able to pin the exact cause, my suspicion is that this is not an encoding problem. Interestingly, I am to parse the physical size in X of the fileset you uploaded under a Linux environment (English locale) after symlinking all the individual files locally. In the example below the content of ~/17336 are all symlinks to the original data which is on a mounted volume:

Code: Select all
$ BF_MAX_MEM=2g ~/bftools-5.2.2/showinf -nopix -omexml /ome/apache_repo/17336/p1485\ RAW\ activée\ +\ PMA\ marquage\ LAMP1\ -\ 1h.nd | grep Pixels
      <Pixels BigEndian="false" DimensionOrder="XYZCT" ID="Pixels:0" Interleaved="false" PhysicalSizeX="0.103" PhysicalSizeXUnit="µm" PhysicalSizeY="0.103" PhysicalSizeYUnit="µm" SignificantBits="16" SizeC="1" SizeT="1" SizeX="2048" SizeY="2048" SizeZ="1" Type="uint16">
      </Pixels>
      <Pixels BigEndian="false" DimensionOrder="XYZCT" ID="Pixels:1" Interleaved="false" PhysicalSizeX="0.103" PhysicalSizeXUnit="µm" PhysicalSizeY="0.103" PhysicalSizeYUnit="µm" SignificantBits="16" SizeC="4" SizeT="1" SizeX="2048" SizeY="2048" SizeZ="21" Type="uint16">
      </Pixels>
$ BF_MAX_MEM=2g ~/bftools-5.2.2/showinf -nopix -omexml ~/17336/p1485\ RAW\ activée\ +\ PMA\ marquage\ LAMP1\ -\ 1h.nd | grep Pixels
      <Pixels BigEndian="false" DimensionOrder="XYZCT" ID="Pixels:0" Interleaved="false" PhysicalSizeX="0.103" PhysicalSizeXUnit="µm" PhysicalSizeY="0.103" PhysicalSizeYUnit="µm" SignificantBits="16" SizeC="1" SizeT="1" SizeX="2048" SizeY="2048" SizeZ="1" Type="uint16">
      </Pixels>
      <Pixels BigEndian="false" DimensionOrder="XYZCT" ID="Pixels:1" Interleaved="false" PhysicalSizeX="0.103" PhysicalSizeXUnit="µm" PhysicalSizeY="0.103" PhysicalSizeYUnit="µm" PhysicalSizeZ="0.8" PhysicalSizeZUnit="µm" SignificantBits="16" SizeC="4" SizeT="1" SizeX="2048" SizeY="2048" SizeZ="21" Type="uint16">
      </Pixels>


This difference and the platform discrepancy might suggest the issue related to the file access when parsing the IFDs for metadata.

We will investigate more and keep you posted,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest