crs4 / DigitalPathologyPlatform

CRS4 Digital Pathology Platform
MIT License
3 stars 5 forks source link

manage no tissue found #119

Closed mdrio closed 2 years ago

mdrio commented 2 years ago

In case tissue prediction returns an empty set, command tissue_to__rois should manage it properly. At this moment the following exception is raised:

Traceback (most recent call last): File "/home/promort/app/ProMort/promort/manage.py", line 30, in execute_from_command_line(sys.argv) File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 401, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 330, in run_from_argv self.execute(*args, *cmd_options) File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 371, in execute output = self.handle(args, **options) File "/home/promort/app/ProMort/promort/predictions_manager/management/commands/tissue2roi.py", line 75, in handle shapes_coords = self._get_slice_coordinates(shapes) File "/home/promort/app/ProMort/promort/predictions_manager/management/commands/tissue2roi.py", line 110, in _get_slice_coordinates x_min = min([p.bounds[0] for p in polygons]) ValueError: min() arg is an empty sequence

mdrio commented 2 years ago

closed by PR #122