From aac280f9643c12dd6d717f5f5840cca18fcc8ae3 Mon Sep 17 00:00:00 2001 From: Michal Januszewski Date: Mon, 6 Jan 2025 11:00:08 -0800 Subject: [PATCH] Unify canvas interface between internal and OSS implementation. PiperOrigin-RevId: 712589357 --- ffn/inference/inference.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ffn/inference/inference.py b/ffn/inference/inference.py index 05aa105..54c47b0 100644 --- a/ffn/inference/inference.py +++ b/ffn/inference/inference.py @@ -140,6 +140,7 @@ def __init__( exec_client: executor.ExecutorClient, image, options, + voxel_size_zyx: tuple[int, int, int] = (1, 1, 1), counters=None, restrictor=None, movement_policy_fn=None, @@ -157,6 +158,7 @@ def __init__( exec_client: client for the executor interface image: 3d ndarray-like of shape (z, y, x) options: InferenceOptions proto + voxel_size_zyx: 3-tuple defining the voxel size as (z, y, x) counters: (optional) counter container, where __getitem__ returns a counter compatible with the MR Counter API restrictor: (optional) a MovementRestrictor object which can exclude some @@ -179,6 +181,7 @@ def __init__( self.image = image self._exec_client = exec_client self._exec_client_id = None + self.voxel_size_zyx = voxel_size_zyx self.options = inference_pb2.InferenceOptions() self.options.CopyFrom(options)