Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Schorb
VolumeAlign
Commits
d7a99f95
Commit
d7a99f95
authored
Nov 23, 2021
by
Martin Schorb
Browse files
hide slice selector when n=1
parent
4440ba69
Pipeline
#27320
passed with stage
in 24 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
dash/callbacks/tile_view.py
View file @
d7a99f95
...
...
@@ -31,7 +31,7 @@ for idx in range(params.max_tileviews):
@
app
.
callback
([
Output
({
'component'
:
imtype
+
'_section_in'
+
idx_str
,
'module'
:
MATCH
},
'value'
),
Output
({
'component'
:
imtype
+
'_section_in'
+
idx_str
,
'module'
:
MATCH
},
'min'
),
Output
({
'component'
:
imtype
+
'_section_in'
+
idx_str
,
'module'
:
MATCH
},
'max'
),
Output
({
'component'
:
imtype
+
'section_
in
'
+
idx_str
,
'module'
:
MATCH
},
'style'
),
Output
({
'component'
:
imtype
+
'
_
section_
div
'
+
idx_str
,
'module'
:
MATCH
},
'style'
),
Output
({
'component'
:
imtype
+
'_contrastslider'
+
idx_str
,
'module'
:
MATCH
},
'max'
),
Output
({
'component'
:
imtype
+
'_contrastslider'
+
idx_str
,
'module'
:
MATCH
},
'value'
)],
Input
({
'component'
:
'stack_dd'
,
'module'
:
MATCH
},
'value'
),
...
...
dash/utils/pages.py
View file @
d7a99f95
...
...
@@ -240,10 +240,11 @@ def tile_view(module,numpanel=1,showlink=False,contrast=True):
idx_title
=
''
out
.
append
(
html
.
Div
([
html
.
Details
([
html
.
Summary
(
'Explore tile'
+
idx_title
),
html
.
Table
([
html
.
Tr
([
html
.
Td
(
'Slice:'
),
html
.
Td
(
html
.
Div
(
dcc
.
Input
(
id
=
{
'component'
:
'tileim_section_in'
+
idx_str
,
'module'
:
module
},
type
=
'number'
,
min
=
0
,
value
=
0
),
html
.
Table
([
html
.
Tr
([
html
.
Div
(
[
html
.
Td
(
'Slice:'
),
html
.
Td
(
dcc
.
Input
(
id
=
{
'component'
:
'tileim_section_in'
+
idx_str
,
'module'
:
module
},
type
=
'number'
,
min
=
0
,
value
=
0
))],
id
=
{
'component'
:
'tileim_section_div'
+
idx_str
,
'module'
:
module
},
style
=
{})
)
,
style
=
{}),
html
.
Td
(
'Tile'
),
html
.
Td
(
dcc
.
Dropdown
(
id
=
{
'component'
:
'tile_dd'
+
idx_str
,
'module'
:
module
},
className
=
'dropdown_inline'
))])
]),
...
...
@@ -292,12 +293,13 @@ def section_view(module,numpanel=1,contrast=True):
idx_title
=
''
out
.
append
(
html
.
Div
([
html
.
Details
([
html
.
Summary
(
'Explore slice'
+
idx_title
),
html
.
Table
([
html
.
Tr
([
html
.
Td
(
'Slice:'
),
html
.
Div
(
html
.
Td
(
dcc
.
Input
(
id
=
{
'component'
:
'sliceim_section_in'
+
idx_str
,
'module'
:
module
},
type
=
'number'
,
min
=
0
,
value
=
0
),
id
=
{
'component'
:
'sliceim_section_div'
+
idx_str
,
'module'
:
module
},
style
=
{})),
html
.
Div
(
html
.
Table
([
html
.
Tr
([
html
.
Td
(
'Slice:'
),
html
.
Td
(
dcc
.
Input
(
id
=
{
'component'
:
'sliceim_section_in'
+
idx_str
,
'module'
:
module
},
type
=
'number'
,
min
=
0
,
value
=
0
)),
])
]),
id
=
{
'component'
:
'sliceim_section_div'
+
idx_str
,
'module'
:
module
},
style
=
{}),
html
.
Div
(
style
=
contraststyle
,
id
=
{
'component'
:
'sliceim_contrastdiv'
+
idx_str
,
'module'
:
module
},
children
=
[
'Contrast limits: '
,
dcc
.
RangeSlider
(
...
...
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