Skip to content
Snippets Groups Projects
Commit 7b69ae58 authored by David Grundfest's avatar David Grundfest
Browse files

Moved segmentation setting to right panel

parent 56a5c210
No related branches found
No related tags found
2 merge requests!117New Layered Surface Segmentation,!42Layered Surface Segmentation Feature
This commit is part of merge request !42. Comments created here will be created in the context of that merge request.
...@@ -95,32 +95,6 @@ class Interface(BaseInterface): ...@@ -95,32 +95,6 @@ class Interface(BaseInterface):
height = 230, 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.Group():
with gr.Row(): with gr.Row():
...@@ -232,6 +206,37 @@ class Interface(BaseInterface): ...@@ -232,6 +206,37 @@ class Interface(BaseInterface):
x_check = gr.Checkbox(value = True, interactive=True, label = 'Show X slice') x_check = gr.Checkbox(value = True, interactive=True, label = 'Show X slice')
y_check = gr.Checkbox(value = True, interactive=True, label = 'Show Y 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') 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(): with gr.Row():
btn_run = gr.Button("Run Layers2D", variant = 'primary') btn_run = gr.Button("Run Layers2D", variant = 'primary')
...@@ -449,6 +454,7 @@ class Interface(BaseInterface): ...@@ -449,6 +454,7 @@ class Interface(BaseInterface):
seg = np.rot90(seg, k = 3) seg = np.rot90(seg, k = 3)
# slice = 255 * (slice/np.max(slice)) # slice = 255 * (slice/np.max(slice))
return image_with_overlay(np.repeat(slice[..., None], 3, -1), seg, alpha) 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: else:
lines = get_lines(seg) lines = get_lines(seg)
if self.is_transposed(slicing_axis, segmenting_axis): if self.is_transposed(slicing_axis, segmenting_axis):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment