@@ -64,26 +64,23 @@ def __init__(
6464
6565 Parameters
6666 ----------
67- gt_pointer : dict/str/list[str]
67+ gt_pointer : Any
6868 Pointer to ground truth swcs, see "swc_util.Reader" for further
69- documentation. Note these swc files are assumed to be stored in
69+ documentation. Note these SWC files are assumed to be stored in
7070 image coordinates.
71- pred_labels : numpy.ndarray or tensorstore.TensorStore
71+ pred_labels : ArrayLike
7272 Predicted segmentation mask.
73- anisotropy : list [float], optional
74- Image to real-world coordinates scaling factors applied to swc
75- stored at "fragments_pointer". The default is [ 1.0, 1.0, 1.0] .
73+ anisotropy : Tuple [float], optional
74+ Image to physical coordinate scaling factors applied to SWC files
75+ stored at "fragments_pointer". The default is ( 1.0, 1.0, 1.0) .
7676 connections_path : str, optional
7777 Path to a txt file containing pairs of segment ids of segments
7878 that were merged into a single segment. The default is None.
79- fragments_pointer : dict/str/list[str], optional
80- Pointer to fragments (i.e. swcs) corresponding to "pred_labels",
81- see "swc_util.Reader" for further documentation. Note these swc
82- files may be stored in either world or image coordinates. If the
83- swcs are stored in world coordinates, then provide the world to
84- image coordinates anisotropy factor. Note the filename of each swc
85- is assumed to "segment_id.swc" where segment_id cooresponds to the
86- segment id from "pred_labels". The default is None.
79+ fragments_pointer : Any, optional
80+ Pointer to SWC files corresponding to "pred_labels", see
81+ "swc_util.Reader" for further documentation. Note that these SWC
82+ file may be stored in physical coordiantes, but the anisotropy
83+ scaling factors must be provided. The default is None.
8784 output_dir : str, optional
8885 Path to directory that mistake sites are written to. The default
8986 is None.
@@ -168,7 +165,7 @@ def init_graphs(self, paths):
168165 None
169166
170167 """
171- # Read graphs
168+ # Build graphs
172169 self .graphs = swc_util .Reader ().load (paths )
173170 self .fragment_graphs = None
174171
@@ -204,11 +201,9 @@ def set_node_labels(self, key):
204201 threads .append (executor .submit (self .get_label , i , voxel ))
205202
206203 # Store label
207- pbar = tqdm (total = len (threads ), desc = "threads finished" )
208204 for thread in as_completed (threads ):
209205 i , label = thread .result ()
210206 self .graphs [key ].nodes [i ].update ({"label" : label })
211- pbar .update (1 )
212207
213208 def get_label (self , i , voxel ):
214209 """
0 commit comments