We're Hiring!

Edit metadata

Having a problem deploying OMERO? Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

The OMERO.server installation documentation begins here and you can find OMERO.web deployment documentation here.

Re: Edit metadata

Postby GonzaloO » Mon Jan 27, 2014 8:18 pm

Hi Will.
Thank you for send us the link to the pictures, but we need to work with ome.tif files.
We have some tif files, generated in our University, but the XML data don't fit with OME model. Therefore, what we need is the correct xml data (string) to inject it in the tif files via the tiffcomment command.

Note: We are working with.
OMERO server 4.4.10
OS: Linux

Regards.

Gonzalo
GonzaloO
 
Posts: 16
Joined: Wed Nov 27, 2013 2:35 pm

Re: Edit metadata

Postby GonzaloO » Mon Jan 27, 2014 8:24 pm

Hi Will.
Thank you for send us the link to the pictures, but we need to work with ome.tif files.
We have some tif files, generated in our University, but the XML data don't fit with OME model. Therefore, what we need is the correct xml data (string) to inject it in the tif files via the tiffcomment command.

Note: We are working with.
OMERO server 4.4.10
OS: Linux

Regards.

Gonzalo
GonzaloO
 
Posts: 16
Joined: Wed Nov 27, 2013 2:35 pm

Re: Edit metadata

Postby wmoore » Mon Jan 27, 2014 10:59 pm

Hi, you can use the LOCI command line tools to get the OME-XML for a sample file

See https://www.openmicroscopy.org/site/sup ... index.html

Code: Select all
$ bftools/showinf /Users/will/Documents/biology-data/DV/PTRE/P-TRE_10_R3D_D3D.dv -omexml-only -nopix

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<OME xmlns="http://www.openmicroscopy.org/Schemas/OME/2012-06" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2012-06 http://www.openmicroscopy.org/Schemas/OME/2012-06/ome.xsd">
   <Instrument ID="Instrument:0">
      <Objective Correction="PlanApo" ID="Objective:10002" Immersion="Oil" LensNA="1.4" Manufacturer="Olympus" Model="1-UB935" NominalMagnification="100" WorkingDistance="100.0"/>
   </Instrument>
   <Image ID="Image:0" Name="P-TRE_10_R3D_D3D.dv">
      <AcquisitionDate>2004-08-23T19:26:38</AcquisitionDate>
...


Or you can import the Image to OMERO and export as OME-TIFF.

Probably there are other ways too, but those are the first ones that come to mind.
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: Edit metadata

Postby GonzaloO » Wed Jan 29, 2014 3:14 pm

Hi Will.
I want to ask you some questions about the screenshot that you sent us.
In the tab Adquisition, both Microscope and Image metadata are the same, is this wrong?
Can we add some other information to Image metadata? Where we have to modify the xml file to do that?

Regards,
Gonzalo.
GonzaloO
 
Posts: 16
Joined: Wed Nov 27, 2013 2:35 pm

Re: Edit metadata

Postby wmoore » Wed Jan 29, 2014 4:08 pm

The Microscope will have potentially many Objectives, Filters, Lightsources etc. All of the available components that are in the imported metadata. However, the Image will only be linked to one Objective and Channels may be linked to some of the Filters etc.

In the screenshot, there is only 1 Objective on the Microscope, so it appears the same as under Image.

The exact place you need to edit the XML depends on the metadata you want to add, but it will generally be under the Image element.

Basic outline of the hierarchy is:
Image
ObjectiveSettings (links to Objective under Instrument)
Pixels
Channel
LightPath (links to Filters under Instrument)

Here's an example:

Code: Select all
<OME xmlns="http://www.openmicroscopy.org/Schemas/OME/2012-06" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2012-06 http://www.openmicroscopy.org/Schemas/OME/2012-06/ome.xsd">
   <Instrument ID="Instrument:0">
      <LightSource ID="LightSource:0:0">
         <Laser LaserMedium="Other" Type="Other" Wavelength="488"/>
      </LightSource>
      <LightSource ID="LightSource:0:1">
         <Laser LaserMedium="Other" Type="Other" Wavelength="561"/>
      </LightSource>
      <LightSource ID="LightSource:0:2">
         <Laser LaserMedium="Other" Type="Other"/>
      </LightSource>
      <Detector Gain="1000.0" ID="Detector:0:0" Type="PMT" Voltage="670.0"/>
      <Detector Gain="1000.0" ID="Detector:0:1" Type="PMT" Voltage="705.0"/>
      <Detector Gain="1000.0" ID="Detector:0:2" Type="PMT" Voltage="190.0"/>
      <Objective Correction="Other" ID="Objective:0:0" Immersion="Other" LensNA="1.35" Model="UPLSAPO  60X O  NA:1.35" NominalMagnification="60" WorkingDistance="9999.0"/>
      <Filter ID="Filter:0:0" Model="BA505-545">
         <TransmittanceRange CutIn="505" CutOut="545"/>
      </Filter>
      <Filter ID="Filter:0:1" Model="BA585IF"/>
      <Filter ID="Filter:0:2" Model=""/>
      <Dichroic ID="Dichroic:0:0" Model="SDM560"/>
      <Dichroic ID="Dichroic:0:1" Model="DM405/488/559-561"/>
      <Dichroic ID="Dichroic:0:2" Model="Mirror"/>
      <Dichroic ID="Dichroic:0:3" Model="DM405/488/559-561"/>
      <Dichroic ID="Dichroic:0:4" Model=""/>
      <Dichroic ID="Dichroic:0:5" Model="DM405/488/559-561"/>
   </Instrument>
   <Image ID="Image:0" Name="Series 1">
      <AcquisitionDate>2008-02-06T13:43:19</AcquisitionDate>
      <InstrumentRef ID="Instrument:0"/>
      <ObjectiveSettings ID="Objective:0:0"/>
      <Pixels DimensionOrder="XYCTZ" ID="Pixels:0" PhysicalSizeX="0.207" PhysicalSizeY="0.207" PhysicalSizeZ="1.0" SizeC="3" SizeT="16" SizeX="1024" SizeY="1024" SizeZ="1" TimeIncrement="120.1302" Type="uint16">
         <Channel EmissionWavelength="523" ExcitationWavelength="488" ID="Channel:0:0" IlluminationType="Epifluorescence" Name="CH1" SamplesPerPixel="1">
            <LightSourceSettings ID="LightSource:0:0" Wavelength="488"/>
            <DetectorSettings ID="Detector:0:0"/>
            <LightPath>
               <DichroicRef ID="Dichroic:0:1"/>
               <EmissionFilterRef ID="Filter:0:0"/>
            </LightPath>
         </Channel>
         <Channel EmissionWavelength="578" ExcitationWavelength="561" ID="Channel:0:1" IlluminationType="Epifluorescence" Name="CH3" SamplesPerPixel="1">
            <LightSourceSettings ID="LightSource:0:1" Wavelength="561"/>
            <DetectorSettings ID="Detector:0:1"/>
            <LightPath>
               <DichroicRef ID="Dichroic:0:3"/>
               <EmissionFilterRef ID="Filter:0:1"/>
            </LightPath>
         </Channel>
         <Channel ExcitationWavelength="488" ID="Channel:0:2" IlluminationType="Transmitted" Name="TD1" SamplesPerPixel="1">
            <LightSourceSettings ID="LightSource:0:2" Wavelength="488"/>
            <DetectorSettings ID="Detector:0:2"/>
            <LightPath>
               <DichroicRef ID="Dichroic:0:5"/>
               <EmissionFilterRef ID="Filter:0:2"/>
            </LightPath>
         </Channel>
         <MetadataOnly/>
      </Pixels>
   </Image>
</OME>
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: Edit metadata

Postby GonzaloO » Sat Feb 01, 2014 8:14 pm

Hi Will. I still in trouble. I copied the part of the XML file that you has send and inject into a ome.tiff file. Then, I validate the XML file injected with a result successful, but when I want load it, appears a error at importation that says: "File Not Valid".
What's happening? I need spend more information furthermore of the XML file?

This is the XML that were injected:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!-- Warning: this comment is an OME-XML metadata block, which contains crucial dimensional parameters and other important metadata. Please edit cautiously (if at all), and back up the original data before doing so. For more information, see the OME-TIFF web site: http://ome-xml.org/wiki/OmeTiff. -->
<OME xmlns="http://www.openmicroscopy.org/Schemas/OME/2012-06" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" UUID="urn:uuid:389862a4-277b-440a-99a4-cb84883d800f" xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2012-06 http://www.openmicroscopy.org/Schemas/OME/2012-06/ome.xsd">
   <Instrument ID="Instrument:0">
          <LightSource ID="LightSource:0:0">
             <Laser LaserMedium="Other" Type="Other" Wavelength="488"/>
          </LightSource>
          <LightSource ID="LightSource:0:1">
             <Laser LaserMedium="Other" Type="Other" Wavelength="561"/>
          </LightSource>
          <LightSource ID="LightSource:0:2">
             <Laser LaserMedium="Other" Type="Other"/>
          </LightSource>
          <Detector Gain="1000.0" ID="Detector:0:0" Type="PMT" Voltage="670.0"/>
          <Detector Gain="1000.0" ID="Detector:0:1" Type="PMT" Voltage="705.0"/>
          <Detector Gain="1000.0" ID="Detector:0:2" Type="PMT" Voltage="190.0"/>
          <Objective Correction="Other" ID="Objective:0:0" Immersion="Other" LensNA="1.35" Model="UPLSAPO  60X O  NA:1.35" NominalMagnification="60" WorkingDistance="9999.0"/>
          <Filter ID="Filter:0:0" Model="BA505-545">
             <TransmittanceRange CutIn="505" CutOut="545"/>
          </Filter>
          <Filter ID="Filter:0:1" Model="BA585IF"/>
          <Filter ID="Filter:0:2" Model=""/>
          <Dichroic ID="Dichroic:0:0" Model="SDM560"/>
          <Dichroic ID="Dichroic:0:1" Model="DM405/488/559-561"/>
          <Dichroic ID="Dichroic:0:2" Model="Mirror"/>
          <Dichroic ID="Dichroic:0:3" Model="DM405/488/559-561"/>
          <Dichroic ID="Dichroic:0:4" Model=""/>
          <Dichroic ID="Dichroic:0:5" Model="DM405/488/559-561"/>
       </Instrument>
   <Image ID="urn:lsid:export.openmicroscopy.org:Image:e83f4c9a-b0c0-4dc4-816b-436af07de701_151:388" Name="Instaladores.jpeg">
      <AcquisitionDate>
         2014-01-27T16:09:07
      </AcquisitionDate>
      <ImagingEnvironment/>
      <Pixels DimensionOrder="XYZCT" ID="urn:lsid:export.openmicroscopy.org:Pixels:e83f4c9a-b0c0-4dc4-816b-436af07de701_151:389" SizeC="3" SizeT="1" SizeX="1200" SizeY="1200" SizeZ="1" Type="uint8">
         <Channel Color="-16776961" ID="urn:lsid:export.openmicroscopy.org:Channel:e83f4c9a-b0c0-4dc4-816b-436af07de701_151:391" Name="Red" SamplesPerPixel="1">
            <LightPath/>
         </Channel>
         <Channel Color="16711935" ID="urn:lsid:export.openmicroscopy.org:Channel:e83f4c9a-b0c0-4dc4-816b-436af07de701_152:391" Name="Green" SamplesPerPixel="1">
            <LightPath/>
         </Channel>
         <Channel Color="65535" ID="urn:lsid:export.openmicroscopy.org:Channel:e83f4c9a-b0c0-4dc4-816b-436af07de701_153:391" Name="Blue" SamplesPerPixel="1">
            <LightPath/>
         </Channel>
         <TiffData FirstC="0" FirstT="0" FirstZ="0" IFD="0" PlaneCount="1">
            <UUID FileName="__omero_export__2518558486899248510.ome.tiff">
               urn:uuid:389862a4-277b-440a-99a4-cb84883d800f
            </UUID>
         </TiffData>
         <TiffData FirstC="1" FirstT="0" FirstZ="0" IFD="1" PlaneCount="1">
            <UUID FileName="__omero_export__2518558486899248510.ome.tiff">
               urn:uuid:389862a4-277b-440a-99a4-cb84883d800f
            </UUID>
         </TiffData>
         <TiffData FirstC="2" FirstT="0" FirstZ="0" IFD="2" PlaneCount="1">
            <UUID FileName="__omero_export__2518558486899248510.ome.tiff">
               urn:uuid:389862a4-277b-440a-99a4-cb84883d800f
            </UUID>
         </TiffData>
      </Pixels>
   </Image>
   <StructuredAnnotations xmlns="http://www.openmicroscopy.org/Schemas/SA/2012-06">
      <XMLAnnotation ID="Annotation:1">
         <Value>
            <OriginalMetadata xmlns="openmicroscopy.org/OriginalMetadata">
               <Key>
                  PixelType
               </Key>
               <Value>
                  16 bit signed integer
               </Value>
            </OriginalMetadata>
         </Value>
      </XMLAnnotation>
   </StructuredAnnotations>
</OME>



Sorry for my primitive english and thanks for your help.
Regards.

Gonzalo
GonzaloO
 
Posts: 16
Joined: Wed Nov 27, 2013 2:35 pm

Re: Edit metadata

Postby jburel » Tue Feb 04, 2014 7:16 pm

Hi Gonzalo

I tested the file you have uploaded to our QA server
you are correct the file cannot be imported using the 4.4.10 release.
The problem has been fixed and the file can now be imported using the 5.0.0rc1 version
We hope to have the 5.0.0 version released in the next few weeks

Regards

Jmarie
User avatar
jburel
Team Member
 
Posts: 348
Joined: Thu May 21, 2009 6:38 pm
Location: dundee

Re: Edit metadata

Postby GonzaloO » Mon Feb 10, 2014 8:38 pm

Hi J Marie,

The OMERO.server 5.0.0 Beta works! :D we could edit some metadatas and view them on the OMERO.insight. Thanks you for your help.

We want to continue working with metadata and creating OME-XML metadata. But, We want to use a software for modifying it automatically. Have you worked in a development kit software for OME-XML metadata?

We know that you have developed an user-friendly application for displaying and editing OME-XML metadata, available in: http://loci.wisc.edu/software/ome-metadata-editor. Why were discontinued? Before you had to quit the development, was it working?

Regards.

Gonzalo
GonzaloO
 
Posts: 16
Joined: Wed Nov 27, 2013 2:35 pm

Re: Edit metadata

Postby mlinkert » Tue Feb 11, 2014 3:30 pm

Hi Gonzalo,

We want to continue working with metadata and creating OME-XML metadata. But, We want to use a software for modifying it automatically. Have you worked in a development kit software for OME-XML metadata?


It is possible to create and update OME-XML programatically, using the IMetadata interface in Bio-Formats:

http://ci.openmicroscopy.org/job/BIOFOR ... adata.html

There are a few examples of reading and writing OME-XML using this interface:

https://github.com/openmicroscopy/biofo ... MEXML.java
https://github.com/openmicroscopy/biofo ... adata.java

We know that you have developed an user-friendly application for displaying and editing OME-XML metadata, available in: http://loci.wisc.edu/software/ome-metadata-editor. Why were discontinued? Before you had to quit the development, was it working?


That application was discontinued because it was not very easy to use (so very few people used it), and it had many bugs. It also did not support current versions of the OME-XML schema - only 2003-FC was supported, and adding support for new versions would have involved more work than we could justify given the number of users.

-Melissa
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin

Re: Edit metadata

Postby GonzaloO » Mon Feb 17, 2014 8:35 pm

Hi Melissa.

Thanks for the information given.

We tried to work with the IMetadata interface in Bio-Formats but it was very difficult to use it without additional information.
We were seeing this site: http://ci.openmicroscopy.org/job/BIOFOR ... t/javadoc/
Can you give us more information to see how to use its methods? Where can we found the source code of it?

Regards,
Gonzalo
GonzaloO
 
Posts: 16
Joined: Wed Nov 27, 2013 2:35 pm

PreviousNext

Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest