Skip to content

Commit 50432d5

Browse files
committed
Add Imported_from to Omero metadata
1 parent 720aab2 commit 50432d5

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

biomero_importer/utils/importer.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ def add_image_annotations(self, conn, object_id, uuid, file_path, is_screen=Fals
910910

911911
# Add the full order_info for complete traceability
912912
order_info = self.data_package
913-
913+
914914
# Core order metadata
915915
core_fields = ['Group', 'Username', 'DestinationID', 'DestinationType', 'Files', 'FileNames']
916916
for field in core_fields:
@@ -923,12 +923,16 @@ def add_image_annotations(self, conn, object_id, uuid, file_path, is_screen=Fals
923923
annotation_dict[field] = str(order_info[field])
924924
else:
925925
annotation_dict[field] = str(order_info[field])
926-
926+
927+
local_path = order_info.get(PREPROC_RESULTS_KEY, [{}])[0].get(PREPROC_RESULT_LOCAL_FULL)
928+
if local_path:
929+
annotation_dict['Imported_from'] = str(local_path)
930+
927931
# Add preprocessing metadata if available
928932
preprocessing_fields = [key for key in order_info.keys() if key.startswith('preprocessing_')]
929933
for field in preprocessing_fields:
930934
annotation_dict[field] = str(order_info[field])
931-
935+
932936
# Add preprocessing ID if available
933937
if '_preprocessing_id' in order_info:
934938
annotation_dict['preprocessing_id'] = str(order_info['_preprocessing_id'])

0 commit comments

Comments
 (0)