f-hamidlab / nuclearpy

MIT License
0 stars 0 forks source link

Error when getting Core nuclear mask #8

Closed fursham-h closed 2 years ago

fursham-h commented 2 years ago

Raising new issue to address error in add_nuclear_features. Error message is

ValueError: operands could not be broadcast together with shapes (101,) (102,)

Error arise due to segmented nuclei being too small and ended with no area after erosion

Solution 1: to update area of nuclei that are left Solution 2: to remove small nuclei from the beginning

fursham-h commented 2 years ago

@Marcel-Salier I have implemented a temporary fix for this. Basically the problem arose because nuclei that are very small (16 pixel square) went through erosion and ended up with no nuclei at all. I changed the code to skip the calculation of core intensity for these small nuclei.

The better solution is to remove these nuclei first. Will work on this next time.