From 356f4a2f574f70c289b8e7a4fe4d67e7ecbc17dc Mon Sep 17 00:00:00 2001 From: "Marek (on hp-zbook)" Date: Fri, 24 Nov 2023 14:08:12 +0100 Subject: [PATCH] fixes remap labels from raising an error to just not using them --- ahcore/callbacks.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ahcore/callbacks.py b/ahcore/callbacks.py index 96bb9e6..2764565 100644 --- a/ahcore/callbacks.py +++ b/ahcore/callbacks.py @@ -195,14 +195,13 @@ def _get_annotation_data( if not self._data_description: raise ValueError("No data description is provided.") - if not self._data_description.remap_labels: - raise ValueError("Remap labels are not provided.") - if not self._data_description.index_map: raise ValueError("Index map is not provided.") _annotations = self._annotations.read_region(coordinates, self._scaling, self._region_size) - _annotations = rename_labels(_annotations, remap_labels=self._data_description.remap_labels) + + if self._data_description.remap_labels: + _annotations = rename_labels(_annotations, remap_labels=self._data_description.remap_labels) points, boxes, region, roi = convert_annotations( _annotations,