Skip to content

Commit

Permalink
be permissive around tiff axes - just log
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrofelder committed May 15, 2024
1 parent 2daa547 commit fcf878b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions brainglobe_utils/IO/image/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,10 +777,12 @@ def read_z_stack(path):
)

axes = tiff.series[0].axes.lower()
if set(axes) != {"x", "y", "z"} or axes[0] != "z":
raise ValueError(
f"Attempted to load {path} but didn't find a zyx or "
f"zxy stack. Found {axes} axes"
if set(axes) != {"x", "y", "z"}:
# log that metadata does not specify expected axes
logging.debug(
f"Axis metadata is {axes}, "
"which is not the expected set of x,y,z in any order. "
"Assume z,y,x"
)

return tifffile.imread(path)
Expand Down

0 comments on commit fcf878b

Please sign in to comment.