Skip to content

Export OME-NGFF metadata #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ repos:
hooks:
- id: ruff
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.4.1
hooks:
- id: mypy
37 changes: 37 additions & 0 deletions tests/data/ome-metadata/hcs.ome.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<OME xmlns="http://www.openmicroscopy.org/Schemas/OME/2016-06" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2016-06 http://www.openmicroscopy.org/Schemas/OME/2016-06/ome.xsd">
<Plate ID="Plate:1" Name="Control Plate" ColumnNamingConvention="letter" RowNamingConvention="number" Columns="12"
Rows="8">
<Description/>
<!-- repeat Well for # of wells in the plate that contain images -->
<Well ID="Well:1" Column="0" Row="0">
<!-- repeat WellSample for # of images taken in the well -->
<WellSample ID="WellSample:1" Index="0">
<!--
if there is an image associated with this SPW:WellSample
it is linked using an ImageRef
-->
<ImageRef ID="Image:0"/>
</WellSample>
</Well>
</Plate>
<!-- plus one more Plate for each Plate in this set -->
<!-- Screen is not required -->
<!-- The Image element follows the structure for the OME Compliant File Specification -->
<Image ID="Image:0" Name="Series 1">
<AcquisitionDate>2008-02-06T13:43:19</AcquisitionDate>
<Description>An example OME compliant file, based on Olympus.oib</Description>
<Pixels DimensionOrder="XYCZT" ID="Pixels:0" PhysicalSizeX="0.207" PhysicalSizeY="0.207" 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" PinholeSize="103.5"
AcquisitionMode="LaserScanningConfocalMicroscopy"/>
<Channel EmissionWavelength="578" ExcitationWavelength="561" ID="Channel:0:1"
IlluminationType="Epifluorescence" Name="CH3" SamplesPerPixel="1" PinholeSize="127.24"
AcquisitionMode="LaserScanningConfocalMicroscopy"/>
<Channel ExcitationWavelength="488" ID="Channel:0:2" IlluminationType="Transmitted" ContrastMethod="DIC"
Name="TD1" SamplesPerPixel="1" AcquisitionMode="LaserScanningConfocalMicroscopy"/>
<BinData BigEndian="false" Length="0"/>
</Pixels>
</Image>
</OME>
161 changes: 161 additions & 0 deletions tests/data/ome-metadata/one-screen-one-plate-four-wells.ome.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
<OME xmlns="http://www.openmicroscopy.org/Schemas/OME/2016-06" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2016-06 http://www.openmicroscopy.org/Schemas/OME/2016-06/ome.xsd">
<Plate ID="Plate:1">
<Description>Plate 1 description.</Description>
<Well ID="Well:1.1.1" Column="1" Row="1">
<WellSample ID="WellSample:1.1.1.1" Index="1">
<ImageRef ID="Image:0"/>
</WellSample>
<WellSample ID="WellSample:1.1.1.2" Index="5">
<ImageRef ID="Image:1"/>
</WellSample>
<ReagentRef ID="Reagent:1"/>
</Well>
<Well ID="Well:1.2.1" Column="2" Row="1">
<WellSample ID="WellSample:1.2.1.1" Index="2">
<ImageRef ID="Image:2"/>
</WellSample>
<WellSample ID="WellSample:1.2.1.2" Index="6">
<ImageRef ID="Image:3"/>
</WellSample>
<ReagentRef ID="Reagent:1"/>
</Well>
<Well ID="Well:1.1.2" Column="1" Row="2">
<WellSample ID="WellSample:1.1.2.1" Index="3">
<ImageRef ID="Image:4"/>
</WellSample>
<WellSample ID="WellSample:1.1.2.2" Index="7">
<ImageRef ID="Image:5"/>
</WellSample>
<WellSample ID="WellSample:1.1.2.3" Index="11">
<ImageRef ID="Image:6"/>
</WellSample>
<WellSample ID="WellSample:1.1.2.4" Index="15">
<ImageRef ID="Image:7"/>
</WellSample>
<WellSample ID="WellSample:1.1.2.5" Index="19">
<ImageRef ID="Image:8"/>
</WellSample>
<ReagentRef ID="Reagent:1"/>
</Well>
<Well ID="Well:1.2.2" Column="2" Row="2">
<WellSample ID="WellSample:1.2.2.1" Index="4">
<ImageRef ID="Image:9"/>
</WellSample>
<WellSample ID="WellSample:1.2.2.2" Index="8">
<ImageRef ID="Image:10"/>
</WellSample>
<ReagentRef ID="Reagent:1"/>
</Well>
<PlateAcquisition ID="PlateAcquisition:Plate:1:ScreenAcquisition:1" StartTime="2010-02-23T12:49:30"
EndTime="2010-02-23T12:50:30">
<WellSampleRef ID="WellSample:1.1.1.1"/>
<WellSampleRef ID="WellSample:1.2.1.1"/>
<WellSampleRef ID="WellSample:1.1.2.1"/>
<WellSampleRef ID="WellSample:1.2.2.1"/>
</PlateAcquisition>
<PlateAcquisition ID="PlateAcquisition:Plate:1:ScreenAcquisition:2" StartTime="2010-02-23T12:50:30"
EndTime="2010-02-23T12:51:29">
<WellSampleRef ID="WellSample:1.1.1.2"/>
<WellSampleRef ID="WellSample:1.2.1.2"/>
<WellSampleRef ID="WellSample:1.1.2.2"/>
<WellSampleRef ID="WellSample:1.2.2.2"/>
</PlateAcquisition>
</Plate>
<Screen ID="Screen:1" ProtocolDescription="" ProtocolIdentifier="" ReagentSetDescription="" ReagentSetIdentifier=""
Name="" Type="">
<Description/>
<Reagent ID="Reagent:1" Name="" ReagentIdentifier="">
<Description/>
</Reagent>
<PlateRef ID="Plate:1"/>
</Screen>
<Image ID="Image:0" Name="6x6x1x8-swatch.tif">
<AcquisitionDate>2010-02-23T12:51:30</AcquisitionDate>
<Pixels DimensionOrder="XYCZT" ID="Pixels:0:0" PhysicalSizeX="10000.0" PhysicalSizeY="10000.0" Type="uint8"
SizeC="1" SizeT="1" SizeX="6" SizeY="4" SizeZ="1">
<Channel Color="-2147483648" ID="Channel:0"/>
<BinData BigEndian="false" Length="32">/wCrzur//wB5oMPi/wBIbJO3AP8ePGCF</BinData>
</Pixels>
</Image>
<Image ID="Image:1" Name="6x6x1x8-swatch.tif-1">
<AcquisitionDate>2010-02-23T12:51:30</AcquisitionDate>
<Pixels DimensionOrder="XYCZT" ID="Pixels:1:0" PhysicalSizeX="10000.0" PhysicalSizeY="10000.0" Type="uint8"
SizeC="1" SizeT="1" SizeX="6" SizeY="4" SizeZ="1">
<Channel Color="-2147483648" ID="Channel:1"/>
<BinData BigEndian="false" Length="32">/wCrzur//wB5oMPi/wBIbJO3AP8ePGCF</BinData>
</Pixels>
</Image>
<Image ID="Image:2" Name="6x6x1x8-swatch.tif-2">
<AcquisitionDate>2010-02-23T12:51:30</AcquisitionDate>
<Pixels DimensionOrder="XYCZT" ID="Pixels:2:0" PhysicalSizeX="10000.0" PhysicalSizeY="10000.0" Type="uint8"
SizeC="1" SizeT="1" SizeX="6" SizeY="4" SizeZ="1">
<Channel Color="-2147483648" ID="Channel:2"/>
<BinData BigEndian="false" Length="32">/wCrzur//wB5oMPi/wBIbJO3AP8ePGCF</BinData>
</Pixels>
</Image>
<Image ID="Image:3" Name="6x6x1x8-swatch.tif-3">
<AcquisitionDate>2010-02-23T12:51:30</AcquisitionDate>
<Pixels DimensionOrder="XYCZT" ID="Pixels:3:0" PhysicalSizeX="10000.0" PhysicalSizeY="10000.0" Type="uint8"
SizeC="1" SizeT="1" SizeX="6" SizeY="4" SizeZ="1">
<Channel Color="-2147483648" ID="Channel:3"/>
<BinData BigEndian="false" Length="32">/wCrzur//wB5oMPi/wBIbJO3AP8ePGCF</BinData>
</Pixels>
</Image>
<Image ID="Image:4" Name="6x6x1x8-swatch.tif-4">
<AcquisitionDate>2010-02-23T12:51:30</AcquisitionDate>
<Pixels DimensionOrder="XYCZT" ID="Pixels:4:0" PhysicalSizeX="10000.0" PhysicalSizeY="10000.0" Type="uint8"
SizeC="1" SizeT="1" SizeX="6" SizeY="4" SizeZ="1">
<Channel Color="-2147483648" ID="Channel:4"/>
<BinData BigEndian="false" Length="32">/wCrzur//wB5oMPi/wBIbJO3AP8ePGCF</BinData>
</Pixels>
</Image>
<Image ID="Image:5" Name="6x6x1x8-swatch.tif-5">
<AcquisitionDate>2010-02-23T12:51:30</AcquisitionDate>
<Pixels DimensionOrder="XYCZT" ID="Pixels:5:0" PhysicalSizeX="10000.0" PhysicalSizeY="10000.0" Type="uint8"
SizeC="1" SizeT="1" SizeX="6" SizeY="4" SizeZ="1">
<Channel Color="-2147483648" ID="Channel:5"/>
<BinData BigEndian="false" Length="32">/wCrzur//wB5oMPi/wBIbJO3AP8ePGCF</BinData>
</Pixels>
</Image>
<Image ID="Image:6" Name="6x6x1x8-swatch.tif-6">
<AcquisitionDate>2010-02-23T12:51:30</AcquisitionDate>
<Pixels DimensionOrder="XYCZT" ID="Pixels:6:0" PhysicalSizeX="10000.0" PhysicalSizeY="10000.0" Type="uint8"
SizeC="1" SizeT="1" SizeX="6" SizeY="4" SizeZ="1">
<Channel Color="-2147483648" ID="Channel:6"/>
<BinData BigEndian="false" Length="32">/wCrzur//wB5oMPi/wBIbJO3AP8ePGCF</BinData>
</Pixels>
</Image>
<Image ID="Image:7" Name="6x6x1x8-swatch.tif-7">
<AcquisitionDate>2010-02-23T12:51:30</AcquisitionDate>
<Pixels DimensionOrder="XYCZT" ID="Pixels:7:0" PhysicalSizeX="10000.0" PhysicalSizeY="10000.0" Type="uint8"
SizeC="1" SizeT="1" SizeX="6" SizeY="4" SizeZ="1">
<Channel Color="-2147483648" ID="Channel:7"/>
<BinData BigEndian="false" Length="32">/wCrzur//wB5oMPi/wBIbJO3AP8ePGCF</BinData>
</Pixels>
</Image>
<Image ID="Image:8" Name="6x6x1x8-swatch.tif-8">
<AcquisitionDate>2010-02-23T12:51:30</AcquisitionDate>
<Pixels DimensionOrder="XYCZT" ID="Pixels:8:0" PhysicalSizeX="10000.0" PhysicalSizeY="10000.0" Type="uint8"
SizeC="1" SizeT="1" SizeX="6" SizeY="4" SizeZ="1">
<Channel Color="-2147483648" ID="Channel:8"/>
<BinData BigEndian="false" Length="32">/wCrzur//wB5oMPi/wBIbJO3AP8ePGCF</BinData>
</Pixels>
</Image>
<Image ID="Image:9" Name="6x6x1x8-swatch.tif-9">
<AcquisitionDate>2010-02-23T12:51:30</AcquisitionDate>
<Pixels DimensionOrder="XYCZT" ID="Pixels:9:0" PhysicalSizeX="10000.0" PhysicalSizeY="10000.0" Type="uint8"
SizeC="1" SizeT="1" SizeX="6" SizeY="4" SizeZ="1">
<Channel Color="-2147483648" ID="Channel:9"/>
<BinData BigEndian="false" Length="32">/wCrzur//wB5oMPi/wBIbJO3AP8ePGCF</BinData>
</Pixels>
</Image>
<Image ID="Image:10" Name="6x6x1x8-swatch.tif-10">
<AcquisitionDate>2010-02-23T12:51:30</AcquisitionDate>
<Pixels DimensionOrder="XYCZT" ID="Pixels:10:0" PhysicalSizeX="10000.0" PhysicalSizeY="10000.0" Type="uint8"
SizeC="1" SizeT="1" SizeX="6" SizeY="4" SizeZ="1">
<Channel Color="-2147483648" ID="Channel:10"/>
<BinData BigEndian="false" Length="32">/wCrzur//wB5oMPi/wBIbJO3AP8ePGCF</BinData>
</Pixels>
</Image>
</OME>
Loading