def to_swc(self, filename):
component, bounds = self.get_largest_component(closing_shape=CONFIG.postprocessing.closing_shape)
print('Skeleton is within {}, {}'.format(np.array_str(bounds[0]), np.array_str(bounds[1])))
skel = skeletonize_component(component)
swc = skeleton_to_swc(skel, bounds[0], CONFIG.volume.resolution)
with open(filename, 'w') as swcfile:
writer = csv.writer(swcfile, delimiter=' ', quoting=csv.QUOTE_NONE)
writer.writerows(swc)
评论列表
文章目录