Skip to content

Commit

Permalink
Add a test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Sep 15, 2020
1 parent f161c33 commit 3a375c3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/data/sample.subifd.ome.tif.sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
35ec252c94b1ad0b9d5bd42c89c1d15c83065d6734100d6f596237ff36e8d4495bcfed2c9ea24ab0b4a35aef59871da429dbd48faf0232219dc4391215ba59ce
18 changes: 18 additions & 0 deletions test/test_source_ometiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,24 @@ def testTilesFromOMETiff():
utilities.checkTilesZXY(source, tileMetadata)


def testTilesFromOMETiffWithSubIFD():
imagePath = utilities.externaldata('data/sample.subifd.ome.tif.sha512')
source = large_image_source_ometiff.OMETiffFileTileSource(imagePath)
tileMetadata = source.getMetadata()

assert tileMetadata['tileWidth'] == 256
assert tileMetadata['tileHeight'] == 256
assert tileMetadata['sizeX'] == 2106
assert tileMetadata['sizeY'] == 2016
assert tileMetadata['levels'] == 5
assert len(tileMetadata['frames']) == 3
assert tileMetadata['frames'][1]['Frame'] == 1
assert tileMetadata['frames'][1]['Index'] == 0
assert tileMetadata['frames'][1]['IndexC'] == 1
assert tileMetadata['IndexRange'] == {'IndexC': 3}
utilities.checkTilesZXY(source, tileMetadata)


def testTilesFromStripOMETiff():
imagePath = utilities.externaldata('data/DDX58_AXL_EGFR_well2_XY01.ome.tif.sha512')
source = large_image_source_ometiff.OMETiffFileTileSource(imagePath)
Expand Down

0 comments on commit 3a375c3

Please sign in to comment.