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