From 3e910f4ed3671402f7ee0d9b37ddc2f9000d2c55 Mon Sep 17 00:00:00 2001 From: Adam Tyson Date: Mon, 18 Dec 2023 16:32:19 +0000 Subject: [PATCH] Save points layer to xml even if there isn't any metadata (#56) --- brainglobe_napari_io/cellfinder/writer_xml.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/brainglobe_napari_io/cellfinder/writer_xml.py b/brainglobe_napari_io/cellfinder/writer_xml.py index e70f2af..624af48 100644 --- a/brainglobe_napari_io/cellfinder/writer_xml.py +++ b/brainglobe_napari_io/cellfinder/writer_xml.py @@ -19,8 +19,9 @@ def write_multiple_points_to_xml( name = attributes["name"] show_info( f'Did not find point type in metadata for "{name}" layer, ' - "not saving to file." + "Defaulting to 'Unknown'" ) + cells_to_save.extend(convert_layer_to_cells(data, cells=False)) elif attributes["metadata"]["point_type"] == Cell.CELL: cells_to_save.extend(convert_layer_to_cells(data)) elif attributes["metadata"]["point_type"] == Cell.UNKNOWN: