Skip to content

Commit

Permalink
Improve masking logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jni committed Mar 30, 2016
1 parent 05a228e commit 765dcc6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gala/agglo.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,11 @@ def __init__(self, watershed=array([], label_dtype),
self.merge_priority_function = merge_priority_function
self.max_merge_score = -inf
if mask is None:
self.mask = np.ones(self.watershed_r.shape, dtype=bool)
self.mask = np.broadcast_to([True], self.watershed_r.shape)
self.is_masked = False
else:
self.mask = morpho.pad(mask, True).ravel()
self.is_masked = True
self.build_graph_from_watershed()
self.set_feature_manager(feature_manager)
self.set_ground_truth(gt_vol)
Expand Down

0 comments on commit 765dcc6

Please sign in to comment.