Skip to content

Commit

Permalink
add test data
Browse files Browse the repository at this point in the history
  • Loading branch information
kapoorlab committed Oct 8, 2023
1 parent 2d27038 commit cd26d10
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 78 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = vollseg-napari-mtrack
version = attr: vollseg-napari-mtrack._version.__version__
version = attr: vollseg_napari_mtrack._version.__version__
description = Segment kymographs of microtubules, actin filaments and perform Ransac based fits to compute dynamic instability parameters for individual kymographs and also in batch
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down
7 changes: 2 additions & 5 deletions src/vollseg_napari_mtrack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
__version__ = "unknown"

from ._reader import napari_get_reader
from ._sample_data import make_sample_data
from ._sample_data import get_microtubule_test_data
from ._temporal_plots import TemporalStatistics
from ._widget import plugin_wrapper_mtrack
from ._writer import write_multiple, write_single_image

__all__ = (
"napari_get_reader",
"write_single_image",
"write_multiple",
"make_sample_data",
"get_microtubule_test_data",
"plugin_wrapper_mtrack",
"MTrackTable",
"TemporalStatistics",
Expand Down
24 changes: 6 additions & 18 deletions src/vollseg_napari_mtrack/_sample_data.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
"""
This module is an example of a barebones sample data provider for napari.
from ._reader import reader_function
from vollseg import test_microtubule_kymographs

It implements the "sample data" specification.
see: https://napari.org/stable/plugins/guides.html?#sample-data

Replace code below according to your needs.
"""
from __future__ import annotations
def get_microtubule_test_data():

import numpy


def make_sample_data():
"""Generates an image"""
# Return list of tuples
# [(data1, add_image_kwargs1), (data2, add_image_kwargs2)]
# Check the documentation for more information about the
# add_image_kwargs
# https://napari.org/stable/api/napari.Viewer.html#napari.Viewer.add_image
return [(numpy.random.rand(512, 512), {})]
extracted_folder = test_microtubule_kymographs()
image = reader_function(extracted_folder)[0][0]
return [(image, {"name": "microtubule_kymographs"})]
5 changes: 2 additions & 3 deletions src/vollseg_napari_mtrack/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

__version__ = version = '1.4.3'
__version_tuple__ = version_tuple = (1, 4, 3)
__version__ = version = "1.4.4"
__version_tuple__ = version_tuple = (1, 4, 4)
33 changes: 0 additions & 33 deletions src/vollseg_napari_mtrack/_writer.py

This file was deleted.

24 changes: 6 additions & 18 deletions src/vollseg_napari_mtrack/napari.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@ contributions:
- id: vollseg-napari-mtrack.get_reader
python_name: vollseg_napari_mtrack._reader:napari_get_reader
title: Open data with VollSeg Napari MTrack Plugin
- id: vollseg-napari-mtrack.write_multiple
python_name: vollseg_napari_mtrack._writer:write_multiple
title: Save multi-layer data with VollSeg Napari MTrack Plugin
- id: vollseg-napari-mtrack.write_single_image
python_name: vollseg_napari_mtrack._writer:write_single_image
title: Save image data with VollSeg Napari MTrack Plugin
- id: vollseg-napari-mtrack.make_sample_data
python_name: vollseg_napari_mtrack._sample_data:make_sample_data
- id: vollseg-napari-mtrack.get_microtubule_test_data
python_name: vollseg_napari_mtrack._sample_data:get_microtubule_test_data
title: Load sample data from VollSeg Napari MTrack Plugin
- id: vollseg-napari-mtrack.widget
python_name: vollseg_napari_mtrack._widget:plugin_wrapper_mtrack
Expand All @@ -22,17 +16,11 @@ contributions:
- command: vollseg-napari-mtrack.get_reader
accepts_directories: true
filename_patterns: []
writers:
- command: vollseg-napari-mtrack.write_multiple
layer_types: ['image*','labels*']
filename_extensions: []
- command: vollseg-napari-mtrack.write_single_image
layer_types: ['image']
filename_extensions: ['.tif']

sample_data:
- command: vollseg-napari-mtrack.make_sample_data
display_name: VollSeg Napari MTrack Plugin
key: unique_id.1
- key: get_microtubule_test_data
display_name: Test Microtubule Kymographs
command: vollseg-napari-mtrack.get_microtubule_test_data
widgets:
- command: vollseg-napari-mtrack.widget
display_name: MTrack

0 comments on commit cd26d10

Please sign in to comment.