Skip to content

Commit 7a40281

Browse files
authored
Merge pull request #12 from NL-BioImaging/dev-register2
Add Imported_from to Omero metadata
2 parents 8e03819 + 50432d5 commit 7a40281

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
@@ -899,7 +899,7 @@ def add_image_annotations(self, conn, object_id, uuid, file_path, is_screen=Fals
899899

900900
# Add the full order_info for complete traceability
901901
order_info = self.data_package
902-
902+
903903
# Core order metadata
904904
core_fields = ['Group', 'Username', 'DestinationID', 'DestinationType', 'Files', 'FileNames']
905905
for field in core_fields:
@@ -912,12 +912,16 @@ def add_image_annotations(self, conn, object_id, uuid, file_path, is_screen=Fals
912912
annotation_dict[field] = str(order_info[field])
913913
else:
914914
annotation_dict[field] = str(order_info[field])
915-
915+
916+
local_path = order_info.get(PREPROC_RESULTS_KEY, [{}])[0].get(PREPROC_RESULT_LOCAL_FULL)
917+
if local_path:
918+
annotation_dict['Imported_from'] = str(local_path)
919+
916920
# Add preprocessing metadata if available
917921
preprocessing_fields = [key for key in order_info.keys() if key.startswith('preprocessing_')]
918922
for field in preprocessing_fields:
919923
annotation_dict[field] = str(order_info[field])
920-
924+
921925
# Add preprocessing ID if available
922926
if '_preprocessing_id' in order_info:
923927
annotation_dict['preprocessing_id'] = str(order_info['_preprocessing_id'])

0 commit comments

Comments
 (0)