jni / ray

Automatic segmentation of electron microscopy volumes
Other
31 stars 10 forks source link

fix agglo.Rag.refine_post_merge_boundaries() for volumes with no boundary pixels #35

Closed jni closed 13 years ago

jni commented 13 years ago

From Ryan: Two nodes both have 9 pixels:

In [179]: a.node[1]['feature-cache'][0]
Out[179]: 9.0

In [180]: a.node[2]['feature-cache'][0]
Out[180]: 9.0

When I merge them, I would think we should have 18 pixels in node 1, and when I look at the len() of the 'extent', this is true:

In [184]: a.merge_nodes(1,2)

In [185]: len(a.node[1]['extent'])
Out[185]: 18

But the feature cache says N is 21:

In [186]: a.node[1]['feature-cache'][0]
Out[186]: 21.0

I traced the point where this changes from 18 to 21 to refine_post_merge_boundaries.

jni commented 13 years ago

Fixed in f6d343d7c83e44df114f4ff09bf69cff9958cac7.