Commit a344a61e authored by Martin Schorb's avatar Martin Schorb
Browse files

propagate store to next module

parent 160b3afd
......@@ -31,18 +31,29 @@ from utils import helper_functions as hf
Output({'component': 'mc_owner_dd', 'module': MATCH},'value')
],
[Input({'component': 'store_init_render', 'module': MATCH},'data'),
Input({'component': 'mcown_input', 'module': MATCH}, 'value')],
Input({'component': 'mcown_input', 'module': MATCH}, 'value'),
Input('url','pathname')],
State({'component': 'mc_owner_dd', 'module': MATCH},'options')
,prevent_initial_call=True)
def update_mc_owner_dd(init_in, new_owner, dd_own_in):
def update_mc_owner_dd(init_in, new_owner, thispage, dd_own_in):
if not dash.callback_context.triggered:
trigger = 'init'
else:
trigger = hf.trigger()
dd_options = list()
if 'init' in trigger:
trigger = hf.trigger()
if thispage in (None, ''):
raise PreventUpdate
thispage = thispage.lstrip('/')
trigger = hf.trigger()
if not thispage in hf.trigger(key='module'):
raise PreventUpdate
print(trigger)
dd_options = list()
if 'init' in trigger or 'url' in trigger:
if len(dd_own_in)>0:
if dd_own_in[0]['value']== 'new_mc_owner':
dd_options.extend(dd_own_in)
......
......@@ -32,6 +32,8 @@ from sift import sift_pointmatch
module='pointmatch'
matchtypes = [{'label': 'SIFT', 'value': 'SIFT'}]
status_table_cols = ['stack',
'slices',
......@@ -66,7 +68,6 @@ page = [main]
# Pre-fill render stack selection from previous module
us_out,us_in,us_state = render_selector.init_update_store(module,'tilepairs')
@app.callback(us_out,us_in,us_state,
prevent_initial_call=True)
def pointmatch_update_store(*args):
......@@ -94,7 +95,7 @@ page2 = html.Div([html.Div([html.H4("Select Tilepair source directory:"),
]),
html.H4("Choose type of PointMatch determination:"),
dcc.Dropdown(id=module+'dropdown1',persistence=True,
options=[{'label': 'SIFT', 'value': 'SIFT'}],
options=matchtypes,
value='SIFT')
])
......@@ -321,6 +322,17 @@ def pointmatch_output(value):
# collect Render selections from sub pages and make them available to following pages
# c_in, c_out = render_selector.subpage_launch(module, matchtypes)
#
# @app.callback(c_out,c_in)
# def pointmatch_merge_launch_stores(*inputs):
# return hf.trigger_value()
#
# =============================================
# Processing status
......@@ -329,7 +341,6 @@ def pointmatch_output(value):
page.append(compute_settings)
# # =============================================
# # PROGRESS OUTPUT
......
......@@ -27,7 +27,7 @@ from utils import helper_functions as hf
# element prefix
label = "sift_pointmatch"
label = "pointmatch_sift"
parent = "pointmatch"
......@@ -202,7 +202,9 @@ def sift_pointmatch_execute_gobutton(click,matchID,matchcoll,comp_sel,mc_owner,t
mt_params = matchTrial.mt_parameters(matchID)
except json.JSONDecodeError:
return True,'Could not find this MatchTrial ID!',dash.no_update,dash.no_update,dash.no_update
except ValueError:
return True,'Could not find this MatchTrial ID!',dash.no_update,dash.no_update,dash.no_update
if mt_params == {}:
return True,'No MatchTrial selected!',dash.no_update,dash.no_update,dash.no_update
......
......@@ -33,7 +33,6 @@ from callbacks import runstate,render_selector,substack_sel,match_selector,tile_
module='solve'
storeinit = {}
store = pages.init_store(storeinit, module)
......@@ -41,7 +40,6 @@ for storeitem in params.match_store.keys():
store.append(dcc.Store(id={'component':'store_'+storeitem,'module':module}, storage_type='session',data=params.match_store[storeitem]))
main=html.Div(id={'component': 'main', 'module': module},children=html.H3("Solve tile Positions from PointMatchCollection"))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment