Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qim3d
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
QIM
Tools
qim3d
Commits
7b69ae58
Commit
7b69ae58
authored
6 months ago
by
David Grundfest
Browse files
Options
Downloads
Patches
Plain Diff
Moved segmentation setting to right panel
parent
56a5c210
Branches
layered_surface_segmentation
No related tags found
2 merge requests
!117
New Layered Surface Segmentation
,
!42
Layered Surface Segmentation Feature
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
qim3d/gui/layers2d.py
+32
-26
32 additions, 26 deletions
qim3d/gui/layers2d.py
with
32 additions
and
26 deletions
qim3d/gui/layers2d.py
+
32
−
26
View file @
7b69ae58
...
...
@@ -95,32 +95,6 @@ class Interface(BaseInterface):
height
=
230
,
)
with
gr
.
Row
():
with
gr
.
Group
():
plot_type
=
gr
.
Radio
(
choices
=
(
DEFAULT_PLOT_TYPE
,
'
Segmentation lines
'
,),
value
=
DEFAULT_PLOT_TYPE
,
interactive
=
True
,
show_label
=
False
)
alpha
=
gr
.
Slider
(
minimum
=
0
,
maximum
=
1
,
step
=
0.01
,
label
=
'
Alpha value
'
,
show_label
=
True
,
value
=
0.5
,
visible
=
True
,
interactive
=
True
)
line_thickness
=
gr
.
Slider
(
minimum
=
0.1
,
maximum
=
5
,
value
=
2
,
label
=
'
Line thickness
'
,
show_label
=
True
,
visible
=
False
,
interactive
=
True
)
with
gr
.
Group
():
with
gr
.
Row
():
...
...
@@ -232,6 +206,37 @@ class Interface(BaseInterface):
x_check
=
gr
.
Checkbox
(
value
=
True
,
interactive
=
True
,
label
=
'
Show X slice
'
)
y_check
=
gr
.
Checkbox
(
value
=
True
,
interactive
=
True
,
label
=
'
Show Y slice
'
)
z_check
=
gr
.
Checkbox
(
value
=
True
,
interactive
=
True
,
label
=
'
Show Z slice
'
)
with
gr
.
Row
():
with
gr
.
Group
():
plot_type
=
gr
.
Radio
(
choices
=
(
DEFAULT_PLOT_TYPE
,
'
Segmentation lines
'
,),
value
=
DEFAULT_PLOT_TYPE
,
interactive
=
True
,
show_label
=
False
)
alpha
=
gr
.
Slider
(
minimum
=
0
,
maximum
=
1
,
step
=
0.01
,
label
=
'
Alpha value
'
,
show_label
=
True
,
value
=
0.5
,
visible
=
True
,
interactive
=
True
)
line_thickness
=
gr
.
Slider
(
minimum
=
0.1
,
maximum
=
5
,
value
=
2
,
label
=
'
Line thickness
'
,
show_label
=
True
,
visible
=
False
,
interactive
=
True
)
with
gr
.
Row
():
btn_run
=
gr
.
Button
(
"
Run Layers2D
"
,
variant
=
'
primary
'
)
...
...
@@ -449,6 +454,7 @@ class Interface(BaseInterface):
seg
=
np
.
rot90
(
seg
,
k
=
3
)
# slice = 255 * (slice/np.max(slice))
return
image_with_overlay
(
np
.
repeat
(
slice
[...,
None
],
3
,
-
1
),
seg
,
alpha
)
# return overlay_rgb_images(np.repeat(slice[..., None], 3, -1), seg, alpha)
else
:
lines
=
get_lines
(
seg
)
if
self
.
is_transposed
(
slicing_axis
,
segmenting_axis
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment