@@ -129,7 +129,7 @@ def perform_analysis(rgb_image, threshold_probability):
129
129
130
130
# number_of_tiles = model._guess_n_tiles(rgb_image)
131
131
132
- labels , detailed_info = model .predict_instances (normalize (rgb_image ), n_tiles = (10 , 10 , 1 ),prob_thresh = threshold_probability , nms_thresh = 0.3 , show_tile_progress = False )
132
+ labels , detailed_info = model .predict_instances (normalize (rgb_image ), n_tiles = (10 , 10 , 1 ), prob_thresh = threshold_probability , nms_thresh = 0.3 , show_tile_progress = False )
133
133
134
134
except :
135
135
@@ -183,7 +183,7 @@ def colorize_labels(labels):
183
183
from skimage .measure import regionprops
184
184
from sklearn .neighbors import KernelDensity
185
185
186
- def weighted_kde_density_map (nucleus_mask , bandwidth = 'auto' , kernel = 'gaussian' , num_points = 500 ):
186
+ def weighted_kde_density_map (nucleus_mask , bandwidth = 'auto' , kernel = 'gaussian' , num_points = 1000 ):
187
187
"""
188
188
Compute the weighted kernel density estimate (KDE) of the centroids of regions in a binary image.
189
189
@@ -564,7 +564,7 @@ def make_second_plot(perform_analysis_image, ModelSensitivity, modified_labels_r
564
564
565
565
# Display the density map figure
566
566
567
- im_density = axs ['c' ].imshow (Local_Density_mean_filter , vmin = 0 , vmax = 1 , alpha = ALPHA , zorder = 2 , cmap = 'cividis ' )
567
+ im_density = axs ['c' ].imshow (Local_Density_mean_filter , vmin = 0 , vmax = 1 , alpha = ALPHA , zorder = 2 , cmap = 'magma ' )
568
568
# Add a colorbar
569
569
divider = make_axes_locatable (axs ['c' ])
570
570
cax = divider .append_axes ("right" , size = SIZE , pad = PAD )
@@ -584,7 +584,7 @@ def make_second_plot(perform_analysis_image, ModelSensitivity, modified_labels_r
584
584
585
585
# Display the density map figure
586
586
587
- im_density = axs ['d' ].imshow (Local_Density_KDE , vmin = 0 , vmax = 1 , alpha = ALPHA , zorder = 2 , cmap = 'cividis ' )
587
+ im_density = axs ['d' ].imshow (Local_Density_KDE , vmin = 0 , vmax = 1 , alpha = ALPHA , zorder = 2 , cmap = 'magma ' )
588
588
# Add a colorbar
589
589
divider = make_axes_locatable (axs ['d' ])
590
590
cax = divider .append_axes ("right" , size = SIZE , pad = PAD )
@@ -604,7 +604,7 @@ def make_second_plot(perform_analysis_image, ModelSensitivity, modified_labels_r
604
604
605
605
# # Display the area clustered blob labels figure
606
606
607
- im_area_cluster_labels = axs ['e' ].imshow (area_cluster_labels , alpha = ALPHA , cmap = 'brg ' )
607
+ im_area_cluster_labels = axs ['e' ].imshow (area_cluster_labels , alpha = ALPHA , cmap = 'rainbow ' )
608
608
# Add a colorbar
609
609
divider = make_axes_locatable (axs ['e' ])
610
610
cax = divider .append_axes ("right" , size = SIZE , pad = PAD )
@@ -626,7 +626,7 @@ def make_second_plot(perform_analysis_image, ModelSensitivity, modified_labels_r
626
626
627
627
# # Display the roundness clustered blob labels figure
628
628
629
- im_roundness_cluster_labels = axs ['f' ].imshow (roundness_cluster_labels , alpha = ALPHA , cmap = 'brg ' )
629
+ im_roundness_cluster_labels = axs ['f' ].imshow (roundness_cluster_labels , alpha = ALPHA , cmap = 'rainbow ' )
630
630
# Add a colorbar
631
631
divider = make_axes_locatable (axs ['f' ])
632
632
cax = divider .append_axes ("right" , size = SIZE , pad = PAD )
0 commit comments