Trace Visualization

brainlit.viz.skeletonize(img: np.ndarray, points: pd.DataFrame)[source]

Draw lines between points that are connected to produce binary mask

  • {3d array} -- image (img) --

  • {pandas dataframe} -- dataframe with swc points as output by combine_swc_img.points2voxel (points) --


[3d array] -- binary mask showing skeletonization between points

brainlit.viz.Bresenham3D(x1: int, y1: int, z1: int, x2: int, y2: int, z2: int)[source]

Takes two coordinates and gives the set of coordinates that connects them with a straight line

Adapted from

  • {int} -- first x coodinate (x1) --

  • {int} -- first y coodinate (y1) --

  • {int} -- first z coodinate (z1) --

  • {int} -- second x coodinate (x2) --

  • {int} -- second y coodinate (y2) --

  • {int} -- second z coodinate (z2) --


[list] -- list of x coordinate connecting the points [list] -- list of y coordinate connecting the points [list] -- list of z coordinate connecting the points