Skip to content

Commit

Permalink
Fixed a small bug in the viewer and added the viewer notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
JLrumberger committed Jan 9, 2025
1 parent 31b821d commit f7170b4
Show file tree
Hide file tree
Showing 2 changed files with 244 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/nimbus_inference/viewer_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ def overlay(self, composite_image, add_boundaries=False, add_overlay=False):
val = (np.max(composite_image, axis=(0,1))*0.5).astype(composite_image.dtype)
val = np.min(val[val>0])
composite_image[seg_boundaries] = [val]*3
else:
seg_boundaries = None
return composite_image, seg_boundaries

def create_composite_from_dataset(self, path_dict):
Expand Down Expand Up @@ -390,6 +388,12 @@ def __init__(
disabled=False
)
self.dataset_select.observe(self.select_dataset, names='value')
self.overlay_checkbox = widgets.Checkbox(
value=False,
description='Overlay segmentations',
disabled=False
)


def layout(self):
"""Creates layout for viewer."""
Expand All @@ -403,7 +407,6 @@ def layout(self):
self.dataset_select,
self.fov_select,
channel_selectors,
self.overlay_checkbox,
self.update_button
# ]),
])
Expand Down
Loading

0 comments on commit f7170b4

Please sign in to comment.