Bayer-Group / paquo

PAthological QUpath Obsession - QuPath and Python conversations
GNU General Public License v3.0
105 stars 16 forks source link

Add PathCellObjects class and add_cell method #112

Closed rtubelleza closed 5 months ago

rtubelleza commented 8 months ago

Hello, my first PR here.

Was using paquo to directly import results of image processing and cellpose segmentation in python. Realised I needed PathCellObjects like #110

Currently, I have added the parameter defining a secondary roi for the nuclear region as a keyword argument, named nucleus_roi, to not ruin from_shapely for the other pathobject constructors. The first roi, should therefore be the outer bounds of the cell (or cytoplasmic polygon).

Not sure if we need some sort of checker like roi.contains(nucleus_roi) or nucleus_roi.within(roi) to ensure the nuclear polygon given is within the cell.

Happy to further improve code.

ap-- commented 5 months ago

Thank you so much for the PR @rtubelleza ❤️

And sorry that it took a long time to get this merged. I made a few changes and will release a new version asap.