Skip to content

Commit bb65a48

Browse files
committed
ENH: Add --use-tensorstore flag to CLI
1 parent 9b4b2ce commit bb65a48

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

ngff_zarr/cli.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,17 @@ def _multiscales_to_ngff_zarr(
6666
)
6767
)
6868
return
69-
to_ngff_zarr(output_store, multiscales, progress=rich_dask_progress)
69+
if args.use_tensorstore:
70+
if hasattr(output_store, "root"):
71+
output_store = output_store.root
72+
else:
73+
output_store = output_store.path
74+
to_ngff_zarr(
75+
output_store,
76+
multiscales,
77+
progress=rich_dask_progress,
78+
use_tensorstore=args.use_tensorstore,
79+
)
7080

7181

7282
def _ngff_image_to_multiscales(
@@ -231,6 +241,11 @@ def main():
231241
processing_group.add_argument(
232242
"--cache-dir", help="Directory to use for caching with large datasets"
233243
)
244+
processing_group.add_argument(
245+
"--use-tensorstore",
246+
action="store_true",
247+
help="Use the TensorStore library for I/O",
248+
)
234249

235250
args = parser.parse_args()
236251

0 commit comments

Comments
 (0)