@@ -76,11 +76,11 @@ def color_to_class(ontology, color_hex):
7676
7777
7878def make_default_figure (
79- images = None ,
80- stroke_color = "" ,
81- stroke_width = 3 ,
82- shapes = [],
83- source_img = None ,
79+ images = None ,
80+ stroke_color = "" ,
81+ stroke_width = 3 ,
82+ shapes = [],
83+ source_img = None ,
8484):
8585 fig = plot_common .dummy_fig ()
8686 plot_common .add_layout_images_to_fig (fig , images )
@@ -113,12 +113,12 @@ def save_img_classifier(clf, label_to_colors_args, segmenter_args):
113113
114114
115115def show_segmentation (
116- image_path ,
117- mask_shapes ,
118- features ,
119- segmenter_args ,
120- class_label_colormap ,
121- onto_tree_imgannot ,
116+ image_path ,
117+ mask_shapes ,
118+ features ,
119+ segmenter_args ,
120+ class_label_colormap ,
121+ onto_tree_imgannot ,
122122):
123123 """adds an image showing segmentations to a figure's layout"""
124124 # add 1 because classifier takes 0 to mean no mask
@@ -176,14 +176,14 @@ def register_callbacks(dashapp):
176176 ],
177177 )
178178 def annotation_react (
179- href ,
180- graph_relayoutData ,
181- any_label_class_button_value ,
182- stroke_width_value ,
183- show_segmentation_value ,
184- download_button_n_clicks ,
185- sigma_range_slider_value ,
186- masks_data ,
179+ href ,
180+ graph_relayoutData ,
181+ any_label_class_button_value ,
182+ stroke_width_value ,
183+ show_segmentation_value ,
184+ download_button_n_clicks ,
185+ sigma_range_slider_value ,
186+ masks_data ,
187187 ):
188188 classified_image_store_data = dash .no_update
189189 classifier_store_data = dash .no_update
@@ -216,8 +216,8 @@ def annotation_react(
216216 ]
217217
218218 if cbcontext in ["sigma-range-slider.value" ] or (
219- ("Show segmentation" in show_segmentation_value )
220- and (len (masks_data ["shapes" ]) > 0 )
219+ ("Show segmentation" in show_segmentation_value )
220+ and (len (masks_data ["shapes" ]) > 0 )
221221 ):
222222 segmentation_features_dict = {
223223 "intensity" : True ,
@@ -257,7 +257,7 @@ def annotation_react(
257257
258258 # We want the segmentation to be computed
259259 if ("Show segmentation" in show_segmentation_value ) and (
260- len (masks_data ["shapes" ]) > 0
260+ len (masks_data ["shapes" ]) > 0
261261 ):
262262 segimgpng = None
263263 try :
0 commit comments