Task #8853 (closed)
Opened 7 years ago
Closed 6 years ago
Bug: ZVI Reader tile row/height determination is buggy
| Reported by: | rleigh | Owned by: | rleigh |
|---|---|---|---|
| Priority: | minor | Milestone: | OMERO-4.4.7 |
| Component: | Bio-Formats | Version: | n.a. |
| Keywords: | n.a. | Cc: | |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | n.a. |
| Sprint: | Bugs Fixing |
Description
The calculation of the number of series is based on
nSeries = nRows * nCols
But the tiles aren't necessarily in a grid, and the calculation for allocating the core metadata is:
core = new CoreMetadata?[tileRows * tileColumns];
rather than
core = new CoreMetadata?[nTiles];
The number of rows and cols is also based on dividing the total width/height by the tile width/height, but this will fail to give an accurate count when the tiles overlap significantly.
In the new TIFF Reader, we calculate the number of tiles based on the ImageTile? Index. The core[] size should probably be calculated based on this for the ZVI reader as well.
I might be missing some of the subtlety of why things are calculated the way they are, such as fitting the ZVI tiling into the OME model, but it does look like it's a bit more fragile than it should be.
Roger
Change History (6)
comment:1 Changed 7 years ago by rleigh
- Owner changed from mlinkert-x to rleigh
comment:2 Changed 7 years ago by rleigh
comment:3 Changed 7 years ago by rleigh
Looks like this needs fixing still. I'll copy the logic for tile count determination from the Zeiss TIFF reader and test.
comment:4 Changed 6 years ago by jburel
- Milestone changed from Unscheduled to OMERO-4.5
- Sprint set to Bugs Fixing
comment:5 Changed 6 years ago by rleigh
It looks like this is now working correctly. My zeiss-zvi-tiling branch was merged a while back. I'm not sure if there was any further work required to complete this, but I think it's just a case of the bug having not been closed at the time of the merge.
For the image indicated above, it's now calculating the series count correctly.
comment:6 Changed 6 years ago by rleigh
- Resolution set to fixed
- Status changed from new to closed
ZVI reader computes tiling incorrectly for Branchiostomata_6x12_MozaiX_Tiles_color.zvi
Image: markus/Branchiostomata_6x12_MozaiX_Tiles_color.zvi
This image is computed to have 6 columns and 12 rows (72 images). However, it's clear from the metadata that there are 78 (6x13), and this is also reflected by reading in the file in AxioVision? and looking at the tiling directly. Also:
Number Raw Count = 78
Numer Columns = 6
Number Rows = 13
And Image Index U and Image Index V reflect the row and tile numbers correctly.
The higher dimensions represented in the ZVI format (A,S,U,V) aren't directly represented in the model, so simply dividing the offsets.length/total images gives the number of sites, whether these are tiled or manually-selected sites.
I've tested this calculation for all the ZVI images, and only this one fails the commit testing, and this is simply because of the cumulative error in the row calculation--fixing the test to account for the additional row will result in all tests passing when using this calculation.