[ome-users] Tile imaging position form lif or czi files

Roger Leigh rleigh at dundee.ac.uk
Mon Feb 23 15:15:06 GMT 2015


On 20/02/15 16:57, ImageJ wrote:
> Dear LOCI Team,
> I’m working on confocal tile imaging on either Leica or Zeiss confocal
> microscope,
> and I was wondering if it was possible to retrieve from .lif or .czi
> files the X,Y,Z position of the different
> individual pictures present in a mosaic sequence ? Actually I looked for
> it in the OME metadata, but I couldn’ find it.
> Am I wrong, or would it be possible ?

It's definitely possible.  In the OME-XML metadata, the positions are
given by the PositionX, PositionY and PositionZ properties for each
plane.  For example, in your image:

          <Plane DeltaT="0.0" DeltaTUnit="s"
PositionX="0.01538608587232" PositionXUnit="reference frame"
PositionY="0.01750899982445" PositionYUnit="reference frame"
PositionZ="0.0" PositionZUnit="reference frame" TheC="0" TheT="0" TheZ="0"/>
          <Plane DeltaT="47.297000885009766" DeltaTUnit="s"
PositionX="0.01538608587232" PositionXUnit="reference frame"
PositionY="0.01750899982445" PositionYUnit="reference frame"
PositionZ="0.0" PositionZUnit="reference frame" TheC="1" TheT="0" TheZ="0"/>
          <Plane DeltaT="78.74200057983398" DeltaTUnit="s"
PositionX="0.01538608587232" PositionXUnit="reference frame"
PositionY="0.01750899982445" PositionYUnit="reference frame"
PositionZ="0.0" PositionZUnit="reference frame" TheC="2" TheT="0" TheZ="0"/>
          <Plane DeltaT="109.81999969482422" DeltaTUnit="s"
PositionX="0.01538608587232" PositionXUnit="reference frame"
PositionY="0.01750899982445" PositionYUnit="reference frame"
PositionZ="0.0" PositionZUnit="reference frame" TheC="3" TheT="0" TheZ="0"/>

In this case you can see that it's the same for all four plane, since
the only thing varying is the channel.  But for a tiled/mosaic image,
you will fine that the positions will change to match the stage position.

Using the Bio-Formats API, you can get these positions using:

   getPlanePositionX(image, plane)
   getPlanePositionY(image, plane)
   getPlanePositionZ(image, plane)

Where image and plane are the image number and plane number, respectively.

http://downloads.openmicroscopy.org/bio-formats/5.1.0-m4/api/ome/xml/meta/MetadataRetrieve.html#getPlanePositionX(int,%20int)

Note that some formats also use the StageLabel element to describe stage
positions.  There are corresponding getStageLabelX(image),
getStageLabelY(image) and getStageLabelZ(image) methods.  This isn't as
common though; the only Leica format doing this is the LEI format.  It's
not used by LIF or CZI.


Kind regards,
Roger

--
Dr Roger Leigh -- Open Microscopy Environment
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK   Tel: (01382) 386364

The University of Dundee is a registered Scottish Charity, No: SC015096



More information about the ome-users mailing list