Commit bb0a469
authored
Merge pull request #127 from mducducd/fix/supertile-size
Fix/ compute supertile size
The supertile size formula (micron) derives the size from slide pixels * MPP. It can be affected by rounding (np.ceil) and slight metadata inaccuracies in slide_mpp. In some cases, this leads to off-by-one errors or out-of-bounds issues when reading regions. It can be fixed by:
- If the slide’s MPP metadata is available, use the pixel-based formula.
- If mpp metadata is missing and an approximated mpp is used instead (may cause inaccurate or inconsistent), use the tile-based formula (tile micron * num_tiles in supertile) to avoid rounding errors and out-of-bounds issues.1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
317 | 322 | | |
318 | 323 | | |
319 | 324 | | |
| |||
334 | 339 | | |
335 | 340 | | |
336 | 341 | | |
337 | | - | |
| 342 | + | |
338 | 343 | | |
339 | 344 | | |
340 | 345 | | |
| |||
0 commit comments