Refine series count calculation for .vsi data with no pyramids - #4434
Refine series count calculation for .vsi data with no pyramids#4434melissalinkert wants to merge 2 commits into
Conversation
sbesson
left a comment
There was a problem hiding this comment.
Using the sample file uploaded as part of the original issue, I can reproduce the behavior described there i.e. the file is detected as 2 series, one with 5 channels with the last plane appearing scrambled.
With this PR included, the dataset is detected as 3 series with the following diff in the output of showinf
9c9
< Series count = 2
---
> Series count = 3
32c32
< Image count = 5
---
> Image count = 1
40c40
< SizeC = 5
---
> SizeC = 1
43a44,64
> Dimension order = XYCZT (uncertain)
> Pixel type = uint16
> Valid bits per pixel = 16
> Metadata complete = true
> Thumbnail series = true
> -----
> Plane #0 <=> Z 0, C 0, T 0
>
> Series #2 :
> Image count = 4
> RGB = false (1)
> Interleaved = false
> Indexed = false (true color)
> Width = 153
> Height = 168
> SizeZ = 2
> SizeT = 1
> SizeC = 2
> Tile size = 153 x 64
> Thumbnail size = 116 x 128
> Endianness = intel (little)
51,52c72,73
< Plane #2 <=> Z 0, C 2, T 0
< Plane #4 <=> Z 0, C 4, T 0
---
> Plane #2 <=> Z 0, C 1, T 0
> Plane #3 <=> Z 1, C 1, T 0
and the OME-XML representation generated by showinf -omexml-only
16c16
< <Pixels BigEndian="false" DimensionOrder="XYZCT" ID="Pixels:1" Interleaved="false" SignificantBits="16" SizeC="5" SizeT="1" SizeX="62" SizeY="68" SizeZ="1" Type="uint16">
---
> <Pixels BigEndian="false" DimensionOrder="XYCZT" ID="Pixels:1" Interleaved="false" SignificantBits="16" SizeC="1" SizeT="1" SizeX="62" SizeY="68" SizeZ="1" Type="uint16">
20,26c20,27
< <Channel ID="Channel:1:1" SamplesPerPixel="1">
< <LightPath/>
< </Channel>
< <Channel ID="Channel:1:2" SamplesPerPixel="1">
< <LightPath/>
< </Channel>
< <Channel ID="Channel:1:3" SamplesPerPixel="1">
---
> <MetadataOnly/>
> <Plane TheC="0" TheT="0" TheZ="0"/>
> </Pixels>
> </Image>
> <Image ID="Image:2" Name="macro image">
> <InstrumentRef ID="Instrument:0"/>
> <Pixels BigEndian="false" DimensionOrder="XYZCT" ID="Pixels:2" Interleaved="false" SignificantBits="16" SizeC="2" SizeT="1" SizeX="153" SizeY="168" SizeZ="2" Type="uint16">
> <Channel ID="Channel:2:0" SamplesPerPixel="1">
29c30
< <Channel ID="Channel:1:4" SamplesPerPixel="1">
---
> <Channel ID="Channel:2:1" SamplesPerPixel="1">
33a35
> <Plane TheC="0" TheT="0" TheZ="1"/>
35,37c37
< <Plane TheC="2" TheT="0" TheZ="0"/>
< <Plane TheC="3" TheT="0" TheZ="0"/>
< <Plane TheC="4" TheT="0" TheZ="0"/>
---
> <Plane TheC="1" TheT="0" TheZ="1"/>Do we have any ground truth on this data should be read. In particular, IFD 5 is currently associated with the third series under the assumption of a 2 channel/2 Z-sections dimensionality.
Looking at the metadata from tiffdump, there is a 33560 LONG tag which matches
Make TIFF tag.
All images are also currently named as macro image which is likely incorrect
|
As discussed today, temporarily excluding this so we can focus on #4445. |
|
Re-including now that #4445 is merged. |
Fixes #4015.
Previous examples of a single .vsi file with no pyramid files included just one thumbnail-type image to start, followed by SizeZ * SizeC images representing the real data. The example from #4015 (
curated/cellsens/gh-4015/) has two images at the start, followed by SizeZ * SizeC images representing the real data. Note that for this file, the last image has an XY size of 1x1, though the rest of the metadata indicates this should be part of the real data; this is the reason for the warning in lines 606-607..vsi files are based on TIFF, so
tiffdumpor similar can be used to check dimensions.