Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Biggest tissue box coordinates are inverted (PIL -> NumPy) #184

@alessiamarcolini

Description

@alessiamarcolini

Describe the bug
Tiler's area of extraction is wrong, i.e. the biggest tissue box coordinates (W,H) are inverted (H,W)

To Reproduce
Steps to reproduce the behavior:

from histolab.data import prostate_tissue
from histolab.slide import Slide
from histolab.tiler import GridTiler

f, path = prostate_tissue()
prostate_slide = Slide(path, 'proc')

grid_tiles_extractor = GridTiler(
   tile_size=(400, 200),
   level=0,
   check_tissue=False,
   pixel_overlap=0, # default
   prefix="grid/", 
   suffix=".png"

grid_tiles_extractor.locate_tiles(prostate_slide)

Expected behavior
right

Instead....
wrong

Software (please complete the following information):

  • OS: macOS
  • Python Version: 3.8

Additional context
It has to do with: https://stackoverflow.com/questions/49084846/why-different-size-when-converting-pil-image-to-numpy-array

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions