Skip to content
Snippets Groups Projects
Commit 500360ba authored by Andrey Aristov's avatar Andrey Aristov
Browse files

rename plugin

parent 480c350e
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ except ImportError:
from ._reader import napari_get_reader
from ._sample_data import make_sample_data
from ._widget import ExampleQWidget, example_magic_widget
from ._widget import SegmentStack, example_magic_widget
from ._writer import write_multiple, write_single_image
__ALL__ = [
......@@ -14,6 +14,6 @@ __ALL__ = [
write_multiple,
write_single_image,
make_sample_data,
ExampleQWidget,
SegmentStack,
example_magic_widget,
]
......@@ -12,4 +12,4 @@ import numpy
def make_sample_data():
"""Generates an image"""
return numpy.random.rand(512, 512)
return [(numpy.random.rand(512, 512),)]
......@@ -57,7 +57,7 @@ ff.setFormatter(formatter)
logger.addHandler(ff)
class ExampleQWidget(q.QWidget):
class SegmentStack(q.QWidget):
# your QWidget.__init__ can optionally request the napari viewer instance
# in one of two ways:
# 1. use a parameter called `napari_viewer`, as done here
......@@ -327,13 +327,15 @@ class ExampleQWidget(q.QWidget):
opacity=0.3,
**{"name": name, "scale": self.scale},
)
self.viewer.layers[name].contour = 8 // self.binning
else:
logger.debug(f'Updating Detections layer with {self.labels}')
self.viewer.layers[name].data = self.labels
self.viewer.layers[name].scale = self.scale
self.viewer.layers[name].contour = 8 // self.binning
logger.debug(f'Thresholding succesful. \
Sending labels {self.labels} to filtering')
self.update_out()
......
......@@ -15,14 +15,14 @@ contributions:
python_name: napari_segment._sample_data:make_sample_data
title: Load sample data from Segment organoid
- id: napari-segment.make_qwidget
python_name: napari_segment._widget:ExampleQWidget
title: Make example QWidget
- id: napari-segment.make_magic_widget
python_name: napari_segment._widget:example_magic_widget
title: Make example magic widget
- id: napari-segment.segment_organoid
python_name: napari_segment._widget:segment_organoid
title: Segment organoid
python_name: napari_segment._widget:SegmentStack
title: Segment nd2 stack with multiple positions
# - id: napari-segment.make_magic_widget
# python_name: napari_segment._widget:example_magic_widget
# title: Make example magic widget
# - id: napari-segment.segment_organoid
# python_name: napari_segment._widget:segment_organoid
# title: Segment organoid
readers:
- command: napari-segment.get_reader
accepts_directories: True
......@@ -40,9 +40,9 @@ contributions:
key: unique_id.1
widgets:
- command: napari-segment.make_qwidget
display_name: Example QWidget
- command: napari-segment.make_magic_widget
display_name: Example Magic Widget
- command: napari-segment.segment_organoid
# autogenerate: true
display_name: Segment organoid
display_name: Segment multipos
# - command: napari-segment.make_magic_widget
# display_name: Example Magic Widget
# - command: napari-segment.segment_organoid
# # autogenerate: true
# display_name: Segment organoid
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment