Skip to content

Commit ec8b6f5

Browse files
Minor update
1 parent 3dd2c3d commit ec8b6f5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

flamingo_tools/extract_block_util.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ def extract_block(
4343
coord_string = "-".join([str(c).zfill(4) for c in coords])
4444

4545
# Dimensions are inversed to view in MoBIE (x y z) -> (z y x)
46+
# Make sure the coords / roi_halo are not modified in-place.
47+
coords = coords.copy()
48+
roi_halo = roi_halo.copy()
4649
coords.reverse()
4750
roi_halo.reverse()
4851

flamingo_tools/file_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@ def read_image_data(input_path: Union[str, Store], input_key: Optional[str]) ->
8585
elif isinstance(input_path, str):
8686
input_ = open_file(input_path, "r")[input_key]
8787
else:
88-
with zarr.open(input_path, mode="r") as f:
89-
input_ = f[input_key]
88+
f = zarr.open(input_path, mode="r")
89+
input_ = f[input_key]
9090
return input_

0 commit comments

Comments
 (0)