Skip to content

Commit

Permalink
fix(io/heyex/xml_export): initalize empty LayerAnnotation if no annot…
Browse files Browse the repository at this point in the history
…ation is provided
  • Loading branch information
Oli4 committed Aug 16, 2021
1 parent 54e0a6c commit 6626467
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion eyepy/io/heyex/xml_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,11 @@ def layers_dict(bscan_obj):
float(x) for x in segline.find("./Array").text.split()
]
return LayerAnnotation(data, max_height=bscan_obj.oct_obj.SizeZ)
else:
warnings.warn(f"{bscan_obj} contains no segmentation", UserWarning)
data = np.zeros((max(config.SEG_MAPPING.values()) + 1, self.oct_obj.SizeX))
return LayerAnnotation(data, max_height=bscan_obj.oct_obj.SizeZ)

warnings.warn(f"{bscan_obj} contains no segmentation", UserWarning)

return {
"layers": layers_dict,
Expand Down

0 comments on commit 6626467

Please sign in to comment.