We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am following this guide to measure the distance between two spare cell types: https://github.com/clEsperanto/pyclesperanto_prototype/blob/master/demo/neighbors/distance_to_other_labels.ipynb
This works fine but I am trying to repeat the method with distance matrix to their centroids
distance matrix
# generate distance matrix distance_matrix = cle.generate_distance_matrix(cen_A, cen_B)
TCell count: 294 CancerCell count: 691
Give the distance matrix as follows:
Then I try to filter out the long distance cells with connection matrix:
connection_matrix = cle.smaller_or_equal_constant(distance_matrix, constant=10)
But seems the function touch_matrix_to_mesh is not designed for this type of mesh, but only works within in same label group
touch_matrix_to_mesh
mesh = cle.create_like(imageA) cle.touch_matrix_to_mesh(cen_A, connection_matrix, mesh) fig, ax = plt.subplots(1,1,figsize=(15,15)) ax.set_axis_off() ax.imshow(exposure.rescale_intensity(imageA, in_range=(pl, pu),out_range=(0,255)),cmap='Greens',alpha=0.7) ax.imshow(exposure.rescale_intensity(imageB, in_range=(pl, pu),out_range=(0,255)),cmap='Reds',alpha=0.7) cle.imshow(mesh, labels=True, plot=ax, alpha=0.5)
Is there some workaround for the task?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am following this guide to measure the distance between two spare cell types: https://github.com/clEsperanto/pyclesperanto_prototype/blob/master/demo/neighbors/distance_to_other_labels.ipynb
This works fine but I am trying to repeat the method with
distance matrix
to their centroidsTCell count: 294
CancerCell count: 691
Give the distance matrix as follows:
Then I try to filter out the long distance cells with connection matrix:
But seems the function
touch_matrix_to_mesh
is not designed for this type of mesh, but only works within in same label groupmesh = cle.create_like(imageA)
cle.touch_matrix_to_mesh(cen_A, connection_matrix, mesh)
fig, ax = plt.subplots(1,1,figsize=(15,15))
ax.set_axis_off()
ax.imshow(exposure.rescale_intensity(imageA, in_range=(pl, pu),out_range=(0,255)),cmap='Greens',alpha=0.7)
ax.imshow(exposure.rescale_intensity(imageB, in_range=(pl, pu),out_range=(0,255)),cmap='Reds',alpha=0.7)
cle.imshow(mesh, labels=True, plot=ax, alpha=0.5)
Is there some workaround for the task?
The text was updated successfully, but these errors were encountered: