elektronn2.data.tracing_utils module

class elektronn2.data.tracing_utils.Tracer(model, z_shift=0, data_source=None, bounding_box_zyx=None, trace_kwargs={'aniso_scale': 2}, modus='m', shotgun_registry=None, registry_interval=None, reference_radius=18.0)[source]

Bases: object

get_scale_factor(radius, old_factor, scale_strenght)[source]
static perturb_direciton(direc, azimuth, polar)[source]
static plot_vectors(cv, vectors, fig=None)[source]
trace(position_l, direction_il, count, gamma=0, trace_xyz=None, linked_skel=None, check_for_lost_track=True, check_for_uturn=False, check_bb=True, profile=False, info_str=None, reject_obb_traces=False, initial_scale=None)[source]

Although psoition_l is in zyx order, the returned trace_obj is in xyz order

static zeropad(a, length)[source]
class elektronn2.data.tracing_utils.CubeShape(shape, offset=None, center=None, input_excess=None, bbox_reduction=None)[source]

Bases: object

bbox_off_sh_cent(bbox_reduction=None)[source]
bbox_wrt_input()[source]
bbox_wrt_self()[source]
input_off_sh_cent(input_excess=None)[source]
shrink_off_sh_cent(amount)[source]
class elektronn2.data.tracing_utils.ShotgunRegistry(seeds_zyx, registry_extent, directions=None, debug=False, radius_discout=0.5, check_w=3, occupied_thresh=0.6, candidate_max_rel=0.75, candidate_max_min_margin=1.5)[source]

Bases: object

check(trace)[source]

Check if trace goes into masked volume. If so, find out to which trace tree this belongs and merge. Return False to stop tracing Mask seeds and volume mask by current trace’s log

W: window length to do check on

find_nearest_trace(coords_xyz)[source]

Find all other tracks that are at least as close as 1.5 minimal (relative!) distance. (compare to closest point of each track)

get_next_seed()[source]
new_trace(trace)[source]
plot_mask_vol(figure=None, adjust_tfs=False)[source]
update_mask(coords_xyz, radii, index=None)[source]