Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Disable thumbnail generation in napari layer as it is fragile and not used #1171

Merged
merged 2 commits into from
Aug 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion package/PartSeg/common_gui/napari_image_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
USE_THREADS = True


class _NapariImage(NapariImage):
def _update_thumbnail(self, *_, **__):
"""Disable thumbnail update"""


def get_highlight_colormap():
cmap_dict = {0: (0, 0, 0, 0), 1: "white", None: (0, 0, 0, 0)}
if _napari_ge_5:
Expand Down Expand Up @@ -1073,7 +1078,7 @@ def _prepare_layers(image: Image, param: ImageParameters, replace: bool) -> Tupl
blending = "additive" if i != 0 else "translucent"
data = image.get_channel(i)

layer = NapariImage(
layer = _NapariImage(
data,
colormap=param.colormaps[i],
visible=param.visibility[i],
Expand Down
Loading