Skip to content

Commit 2b7ae50

Browse files
committed
Feature different resolutions for block extraction
1 parent 8a6d819 commit 2b7ae50

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

reproducibility/block_extraction/repro_block_extraction.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def repro_block_extraction(
1616
s3_flag = True
1717
tif_flag = True
1818
input_key = "s0"
19+
default_resolution = 0.38
1920

2021
with open(json_file, 'r') as myfile:
2122
data = myfile.read()
@@ -28,9 +29,11 @@ def repro_block_extraction(
2829
input_path = os.path.join(dic["cochlea"], "images", "ome-zarr", image_channel + ".ome.zarr")
2930
roi_halo = dic["halo_size"]
3031
crop_centers = dic["crop_centers"]
32+
resolution = tuple(dic["resolution"]) if "resolution" in dic else default_resolution
3133
for coord in crop_centers:
3234
extract_block(input_path, coord, output_dir, input_key=input_key,
3335
roi_halo=roi_halo.copy(), tif=tif_flag,
36+
resolution=resolution,
3437
s3=s3_flag, s3_credentials=s3_credentials, s3_bucket_name=s3_bucket_name,
3538
s3_service_endpoint=s3_service_endpoint)
3639

0 commit comments

Comments
 (0)