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 gsl1 » Fri Feb 21, 2014 9:58 pm

Online source appears to be viewable at:

view it online

Source appears to be downloadable at:

GIT source

LOCI Bio-Formats Descriptive info

-=> Gregg <=-
gsl1
 
Posts: 3
Joined: Fri Feb 21, 2014 7:32 pm

Re: Edit metadata

Postby jmoore » Mon Feb 24, 2014 11:11 am

Hi Gregg,

gsl1 wrote:Online source appears to be viewable at:


The stable (4.4) version of the IMetadata class you're looking for is best found on github: https://github.com/openmicroscopy/bioformats/blob/dev_4_4/components/scifio/src/loci/formats/meta/IMetadata.java, and the overall documentation under https://www.openmicroscopy.org/site/support/bio-formats4/

The upcoming major release (5.0) has moved this class and it is now available on github at https://github.com/openmicroscopy/bioformats/blob/dev_5_0/components/ome-xml/src/ome/xml/meta/IMetadata.java. For full documentation, see https://www.openmicroscopy.org/site/support/bio-formats5/

Cheers,
~Josh
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Edit metadata

Postby mlinkert » Tue Feb 25, 2014 1:16 am

Hi Gonzalo and Gregg,

In addition to what Josh has linked, please note that the IMetadata interface is closely tied to the OME-XML schema, so you may find it useful to reference the schema when reading the interface Javadoc. The schema version used by Bio-Formats 4.4.x is here:

http://www.openmicroscopy.org/Schemas/O ... 06/ome.xsd

and the version used by Bio-Formats 5.0.x is here:

http://www.openmicroscopy.org/Schemas/O ... 06/ome.xsd

If you have questions about what specific IMetadata methods or schema values are used for, or are unsure of which methods to call to set a specific piece of metadata, then please let us know.

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

Re: Edit metadata

Postby GonzaloO » Fri Mar 07, 2014 7:15 pm

Hi Melissa.

We continue seeing information about how to use the IMetadata interface. We want to ask you some questions about the following example:
https://github.com/openmicroscopy/biofo ... eTiff.java

We don't understand lines 55 to 57.
ServiceFactory factory = new ServiceFactory();
OMEXMLService service = factory.getInstance(OMEXMLService.class);
IMetadata omexmlMeta = service.createOMEXMLMetadata();

What is the concept behind "service"? Why do you use it?
Where do you link the Java objects with the XML model? In some of this methods?


On the other hand, do you have an example where you add an SA:AnnotationRef to an Image element (not in the OME element) in a xml file?


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

Re: Edit metadata

Postby mtbc » Sun Mar 09, 2014 11:09 pm

I am sure that Melissa will soon get to helping you with the OME-XML aspects but in the meantime I can mention that it is through services offered by the OMERO server that the clients can communicate with it and make requests of it, generally within the context of an authenticated session. Various services are offered by the server, including the meta-data service, each with their own methods appropriate for their purpose. One may read more about the services at http://www.openmicroscopy.org/site/supp ... s/Api.html and about the object model mapping at http://www.openmicroscopy.org/site/supp ... Model.html. I hope that there may be something among that documentation that provides further illumination for your endeavors.

Cheers,
Mark
User avatar
mtbc
Team Member
 
Posts: 282
Joined: Tue Oct 23, 2012 10:59 am
Location: Dundee, Scotland

Re: Edit metadata

Postby jmoore » Tue Mar 11, 2014 10:09 am

Similar to the remote services for OMERO that Mark mentions, in Bio-Formats services allow us to abstract away certain implementation details. For example, if certain libraries are not installed, your code can still be compiled because use of the library is behind an interface.

Cheers,
~Josh
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Edit metadata

Postby wmoore » Wed Mar 12, 2014 2:06 pm

Here's an example OME-XML file with Structured Annotations. https://gist.github.com/will-moore/9507510

Hope it has the info you need.

Will.
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: Edit metadata

Postby GonzaloO » Thu Mar 13, 2014 9:03 pm

Thanks Mark and Josh.
Despite of we have read the links, we continue confused about where the XML model is mapped with the Java objects. Where do you say to the program that you are going to use this schema: http://www.openmicroscopy.org/Schemas/O ... 06/ome.xsd?

Thanks Will.
We already had that example. We are looking another one where the Image element has an SA:AnnotationRef. This is the xsd:element that appears before the xsd:attributes ID and Name. (we are trying to use the schema http://www.openmicroscopy.org/Schemas/O ... 06/ome.xsd). If you have one example using this element, we would appreciate you send it to us.

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

Re: Edit metadata

Postby ajpatterson » Mon Mar 24, 2014 4:03 pm

Hello Gonzalo,

If you are building using maven the current schema is set in 'pom.xml' using '<xsdfu.schemaver>'.
If you are building using ant the current schema is set in 'ant/xsd-fu.xml' using 'property name="xsdfu.schemaver"'.

A minimal xml block for an Image with an Annotation using the 2013-06 schema is:

Code: Select all
<OME xmlns="http://www.openmicroscopy.org/Schemas/OME/2013-06"
   xmlns:OME="http://www.openmicroscopy.org/Schemas/OME/2013-06"
   xmlns:SA="http://www.openmicroscopy.org/Schemas/SA/2013-06"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2013-06
   http://www.openmicroscopy.org/Schemas/OME/2013-06/ome.xsd">
   
   <Image ID="Image:1" Name="ImageWithAnnotation">
      <AcquisitionDate>2010-03-02T10:01:15</AcquisitionDate>
      <Pixels ID="Pixels:1" Type="uint8"
         SizeX="18" SizeY="24" SizeZ="5"
         SizeC="1" SizeT="1"
         DimensionOrder="XYZCT">
         <MetadataOnly/>
      </Pixels>
      <!-- Link the annotation to the image -->
      <SA:AnnotationRef ID="Annotation:1"/>
   </Image>

   <!-- All the annotations are stores in this block-->
   <SA:StructuredAnnotations>
      <!-- Define the type and value for the annotation to the image -->
      <SA:CommentAnnotation ID="Annotation:1"
         Namespace="my.domain.name/myapplicationname/myannotationtype">
         <SA:Value></SA:Value>
      </SA:CommentAnnotation>
   </SA:StructuredAnnotations>
</OME>
--
Andrew Patterson
Software Developer, Open Microscopy Environment
Wellcome Trust Centre for Gene Regulation and Expression
University of Dundee
ajpatterson
 
Posts: 50
Joined: Fri May 01, 2009 11:18 am

Re: Edit metadata

Postby GonzaloO » Mon Apr 21, 2014 6:18 pm

Thanks Andrew,

We keep doing tests in the OMERO server.
We had a problem with the metadata block: we couldn't view the description nor the experimenter of the image. Are these metadatas displayed in the OMERO.insight?

I attached the xml file that we extracted with the tiffcomment command. It was validated with the xmlvalid command.
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/2013-06"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    UUID="urn:uuid:15609cc5-57b0-4d68-ba6a-2d12367fa635"
    xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2013-06 http://www.openmicroscopy.org/Schemas/OME/2013-06/ome.xsd">
   <Experimenter ID="Experimenter:0" Email="turco@hotmail" FirstName="Turc" Institution="FI-UNER" LastName="T M"/>
    <Instrument ID="Instrument:0">
        <Objective Correction="PlanApo" ID="Objective:12003" Immersion="Oil" LensNA="1.4"
            Manufacturer="Nikon" Model="93110" NominalMagnification="100.0" WorkingDistance="130.0"
        />
    </Instrument>
    <Image
        ID="urn:lsid:export.openmicroscopy.org:Image:97b0d9a5-f1dc-436b-b8da-74d9742f53d6_116:3554"
        Name="/home/omero/Documentos/Datos_OMERO/Pruebas a OMERO/IMG001.jpg">
        <AcquisitionDate>2014-02-07T18:52:34</AcquisitionDate>
        <ExperimenterRef ID="Experimenter:0"/>
        <Description>Dónde se almacena esta descripción.</Description>
        <InstrumentRef ID="Instrument:0"/>
        <ImagingEnvironment/>
        <Pixels DimensionOrder="XYZCT"
            ID="urn:lsid:export.openmicroscopy.org:Pixels:97b0d9a5-f1dc-436b-b8da-74d9742f53d6_116:3557"
            SizeC="3" SizeT="1" SizeX="2048" SizeY="1536" SizeZ="1" Type="uint8">
            <Channel Color="-16776961"
                ID="urn:lsid:export.openmicroscopy.org:Channel:97b0d9a5-f1dc-436b-b8da-74d9742f53d6_128:3558"
                Name="Red" SamplesPerPixel="1">
                <LightPath/>
            </Channel>
            <Channel Color="16711935"
                ID="urn:lsid:export.openmicroscopy.org:Channel:97b0d9a5-f1dc-436b-b8da-74d9742f53d6_129:3558"
                Name="Green" SamplesPerPixel="1">
                <LightPath/>
            </Channel>
            <Channel Color="65535"
                ID="urn:lsid:export.openmicroscopy.org:Channel:97b0d9a5-f1dc-436b-b8da-74d9742f53d6_130:3558"
                Name="Blue" SamplesPerPixel="1">
                <LightPath/>
            </Channel>
            <TiffData FirstC="0" FirstT="0" FirstZ="0" IFD="0" PlaneCount="1">
                <UUID FileName="__omero_export__2222389819106164029.ome.tiff"
                    >urn:uuid:15609cc5-57b0-4d68-ba6a-2d12367fa635</UUID>
            </TiffData>
            <TiffData FirstC="1" FirstT="0" FirstZ="0" IFD="1" PlaneCount="1">
                <UUID FileName="__omero_export__2222389819106164029.ome.tiff"
                    >urn:uuid:15609cc5-57b0-4d68-ba6a-2d12367fa635</UUID>
            </TiffData>
            <TiffData FirstC="2" FirstT="0" FirstZ="0" IFD="2" PlaneCount="1">
                <UUID FileName="__omero_export__2222389819106164029.ome.tiff"
                    >urn:uuid:15609cc5-57b0-4d68-ba6a-2d12367fa635</UUID>
            </TiffData>
        </Pixels>
        <AnnotationRef xmlns="http://www.openmicroscopy.org/Schemas/SA/2013-06" ID="Annotation:0"/>
        <AnnotationRef xmlns="http://www.openmicroscopy.org/Schemas/SA/2013-06" ID="Annotation:1"/>
        <AnnotationRef xmlns="http://www.openmicroscopy.org/Schemas/SA/2013-06" ID="Annotation:2"/>
        <AnnotationRef xmlns="http://www.openmicroscopy.org/Schemas/SA/2013-06" ID="Annotation:3"/>
        <AnnotationRef xmlns="http://www.openmicroscopy.org/Schemas/SA/2013-06" ID="Annotation:4"/>
    </Image>

   <StructuredAnnotations xmlns="http://www.openmicroscopy.org/Schemas/SA/2013-06">
        <TagAnnotation ID="Annotation:0">
            <Value>TAG#1</Value>
        </TagAnnotation>
        <XMLAnnotation ID="Annotation:1">
            <Value>
                <OriginalMetadata xmlns="openmicroscopy.org/OriginalMetadata">
                    <Key>PixelTypeTurco</Key>
                    <Value>16 bit signed integer</Value>
                </OriginalMetadata>
            </Value>
        </XMLAnnotation>
        <ListAnnotation ID="Annotation:2">
            <Description>Esto es una ListAnnotation</Description>
        </ListAnnotation>
        <CommentAnnotation ID="Annotation:3">
            <Value>Esto es una CommentAnnotation</Value>
        </CommentAnnotation>
       <TermAnnotation ID="Annotation:4">
            <Value>Esto es una TermAnnotation</Value>
        </TermAnnotation>
    </StructuredAnnotations>

</OME>


Greetings.
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