Skip to content

Commit

Permalink
Add test case for converting empty plates
Browse files Browse the repository at this point in the history
  • Loading branch information
melissalinkert committed Nov 10, 2021
1 parent 4e728db commit 52d1de0
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,27 @@ public void testHCSMetadata() throws Exception {
assertEquals(1, ome.sizeOfPlateList());
}

/**
* Plate defined with no linked images.
*/
@Test
public void testEmptyPlate() throws Exception {
input = getTestFile("empty-plate.ome.xml");
assertTool();

ZarrGroup z = ZarrGroup.open(output);

// Check dimensions and block size for consistency
// with non-HCS layout
ZarrArray series0 = z.openArray("0/0");
assertArrayEquals(new int[] {1, 1, 1, 4, 6}, series0.getShape());
assertArrayEquals(new int[] {1, 1, 1, 4, 6}, series0.getChunks());

// Check OME metadata to make sure the empty plate was preserved
OME ome = getOMEMetadata();
assertEquals(1, ome.sizeOfPlateList());
}

/**
* 96 well plate with only well E6.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<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 Platedasd"
ColumnNamingConvention="letter"
RowNamingConvention="number"
Columns="12"
Rows="8"
>
</Plate>

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

</OME>

0 comments on commit 52d1de0

Please sign in to comment.