Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Schorb
VolumeAlign
Commits
187c840e
Commit
187c840e
authored
Jan 05, 2022
by
Martin Schorb
Browse files
tile neighbours checks
parent
e80d493e
Changes
1
Hide whitespace changes
Inline
Side-by-side
dash/callbacks/tile_view.py
View file @
187c840e
...
...
@@ -36,14 +36,14 @@ for idx in range(params.max_tileviews):
if
imtype
==
'tileim'
:
inputs
.
append
(
Input
({
'component'
:
'lead_tile'
,
'module'
:
MATCH
},
'modified_timestamp'
))
inputs
.
append
(
Input
({
'component'
:
'tp_dd'
,
'module'
:
MATCH
},
'value'
))
states
.
extend
([
State
({
'component'
:
'tp_dd'
,
'module'
:
MATCH
},
'value'
),
State
({
'component'
:
'neighbours'
,
'module'
:
MATCH
},
'children'
),
State
({
'component'
:
'lead_tile'
,
'module'
:
MATCH
},
'data'
)
])
State
({
'component'
:
'neighbours'
,
'module'
:
MATCH
},
'children'
),
State
({
'component'
:
'lead_tile'
,
'module'
:
MATCH
},
'data'
)
])
else
:
inputs
.
append
(
Input
({
'component'
:
'dummystore'
,
'module'
:
MATCH
},
'modified_timestamp'
))
states
.
extend
([
State
({
'component'
:
'dummystore'
,
'module'
:
MATCH
},
'modified_timestamp'
)]
*
3
)
inputs
.
append
(
[
Input
({
'component'
:
'dummystore'
,
'module'
:
MATCH
},
'modified_timestamp'
)
]
*
2
)
states
.
extend
([
State
({
'component'
:
'dummystore'
,
'module'
:
MATCH
},
'modified_timestamp'
)]
*
2
)
@
app
.
callback
([
Output
({
'component'
:
imtype
+
'_section_in'
+
idx_str
,
'module'
:
MATCH
},
'value'
),
Output
({
'component'
:
imtype
+
'_section_in'
+
idx_str
,
'module'
:
MATCH
},
'min'
),
...
...
@@ -53,7 +53,7 @@ for idx in range(params.max_tileviews):
Output
({
'component'
:
imtype
+
'_contrastslider'
+
idx_str
,
'module'
:
MATCH
},
'value'
)],
inputs
,
states
)
def
stacktoslice
(
stack_sel
,
lead_trigger
,
allstacks
,
owner
,
project
,
orig_sec
,
tilepairdir
,
neighbours
,
lead_tile
):
def
stacktoslice
(
stack_sel
,
lead_trigger
,
tilepairdir
,
allstacks
,
owner
,
project
,
orig_sec
,
neighbours
,
lead_tile
):
stacklist
=
[]
slicestyle
=
{}
...
...
@@ -63,7 +63,6 @@ for idx in range(params.max_tileviews):
tileim_idx
=
ol
[
0
][
'id'
][
'component'
].
split
(
'_'
)[
-
1
]
if
(
not
stack_sel
==
'-'
)
and
(
not
allstacks
is
None
):
stacklist
=
[
stack
for
stack
in
allstacks
if
stack
[
'stackId'
][
'stack'
]
==
stack_sel
]
# stack = stack_sel
...
...
@@ -74,13 +73,12 @@ for idx in range(params.max_tileviews):
if
'None'
in
(
stackparams
[
'stackId'
][
'owner'
],
stackparams
[
'stackId'
][
'project'
]):
return
dash
.
no_update
o_min
=
stackparams
[
'stats'
][
'stackBounds'
][
'minZ'
]
o_max
=
stackparams
[
'stats'
][
'stackBounds'
][
'maxZ'
]
if
neighbours
==
'True'
and
tileim_idx
!=
'0'
and
tilepairdir
not
in
(
''
,
None
):
if
neighbours
==
'True'
and
tileim_idx
!=
'0'
and
tilepairdir
not
in
(
''
,
None
)
and
lead_tile
!=
{}
:
tp_jsonfiles
=
hf
.
jsonfiles
(
tilepairdir
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment