group = 'NT' else: 'Print No Group' table['image'] = name table['group'] = group #Reading Image green = io.imread(path + file_name[0:-4] + '.tif') #Creating ztsack of intesity image and color zstack green_color = np.zeros( (green.shape[0], green.shape[1], green.shape[2], 3), dtype=np.uint8) green_color[:, :, :, 1] = green.copy() ct = cellseg.cell_tracking(green, green, green_color) ct.positions_table = table.copy() ct.track_with_blob(75) ct.set_segment_param(enhance=False, blur=True, kernel=31, n_intensities=2) #Setting Segmentation Parameters #fig, ax1 = plt.subplots(nrows=1,ncols=1, figsize=(2.5,2.5)) g = sns.lmplot(x="z", y="mean_intensity", hue="label", data=ct.positions_table, fit_reg=False, size=5, legend=False)
io.imsave(path_results + 'Z-level_Blobs_' + str(z) + '.tif', zlevel_image_color_marked) #Get Measurements positions_blobs = cellseg.blob_log_measure(cl1, zlevel_image_erk, max_sigma=30, min_sigma=20, num_sigma=10, threshold=.01, overlap=0.6) #%% # 2) Cell Tracking With Blob Detection, Note: This can take a long time to run ct = cellseg.cell_tracking(erk, dapi, erk_color) # Setting Segmentation Parameters ct.set_segment_param(enhance=False, blur=False, n_intensities=2) # Setting Blob Parameters ct.set_blob_param(max_sigma=30, min_sigma=20, num_sigma=10, threshold=.01, overlap=0.6) # Track with Blob ct.track_with_blob(min_slices=1, color_blobs=(255, 0, 0)) ct.draw_trajectories(color_trajectory=(255, 255, 0))