Skip to content

Commit 840418d

Browse files
committed
Restrict options for pre reg pair pruning
1 parent 6f25850 commit 840418d

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/napari_stitcher/_stitcher_widget.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,20 @@ def __init__(self, napari_viewer):
8888
self.pair_pruning_method = widgets.ComboBox(
8989
choices=[
9090
'None',
91-
'alternating_pattern',
92-
'shortest_paths_overlap_weighted',
93-
'otsu_threshold_on_overlap',
94-
'keep_axis_aligned',
91+
'Only keep axis-aligned',
92+
'Alternating pattern'
9593
],
9694
value='None',
9795
label='Pre-registration pruning method:',
98-
tooltip='Choose the method to prune pairs of tiles before registration. By default, all pairs of overlapping views are registered (None). Recommended for best performance on regular grids: "keep_axis_aligned".')
96+
tooltip='Choose the method to prune pairs of tiles before registration. '+\
97+
'By default, all pairs of overlapping views are registered (None). '+\
98+
'Recommended for best performance on regular grids: "Only keep axis-aligned".')
99+
100+
self.pair_pruning_method_mapping = {
101+
'None': None,
102+
'Only keep axis-aligned': 'keep_axis_aligned',
103+
'Alternating pattern': 'alternating_pattern',
104+
}
99105

100106
self.button_stitch = widgets.Button(text='Register',
101107
tooltip='Use the overlaps between tiles to determine their relative positions.')
@@ -325,7 +331,7 @@ def run_registration(self):
325331
params = registration.register(
326332
msims,
327333
registration_binning=registration_binning,
328-
pre_registration_pruning_method=self.pair_pruning_method.value,
334+
pre_registration_pruning_method=self.pair_pruning_method_mapping[self.pair_pruning_method.value],
329335
post_registration_do_quality_filter=self.do_quality_filter.value,
330336
post_registration_quality_threshold=self.quality_threshold.value,
331337
transform_key='affine_metadata',

0 commit comments

Comments
 (0)