Skip to content

Commit

Permalink
move io plugins from PartSeg to PartSegCore
Browse files Browse the repository at this point in the history
  • Loading branch information
Czaki committed Dec 9, 2024
1 parent b68237f commit 8b332c7
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion launcher.spec
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ hiddenimports = (
"psygnal._weak_callback",
"imagecodecs._imagecodecs",
"PartSeg.plugins.napari_widgets",
"PartSegCore.napari_plugins",
"PartSegCore.napari_io",
]
+ [x.module_name for x in imageio_known_plugins.values()]
+ [x for x in collect_submodules("skimage") if "tests" not in x]
Expand Down
2 changes: 1 addition & 1 deletion package/PartSeg/launcher_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def _test_imports(): # pragma: no cover
raise ImportError("napari_widgets not loaded")

if "load_image" not in dir(napari_plugins):
raise ImportError("napari_plugins not loaded")
raise ImportError("napari_io not loaded")

with suppress(ImportError):
from napari.qt import get_app
Expand Down
14 changes: 7 additions & 7 deletions package/PartSeg/napari.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ contributions:
commands:
- id: PartSeg.load_roi_project
title: Get PartSeg ROI project Reader
python_name: PartSegCore.napari_plugins.load_roi_project:napari_get_reader
python_name: PartSeg.plugins.napari_io.load_roi_project:napari_get_reader
- id: PartSeg.load_image
title: Get Image Reader
python_name: PartSegCore.napari_plugins.load_image:napari_get_reader
python_name: PartSeg.plugins.napari_io.load_image:napari_get_reader
- id: PartSeg.write_tiff_image
title: Write tiff Image
python_name: PartSegCore.napari_plugins.save_tiff_layer:napari_write_images
python_name: PartSeg.plugins.napari_io.save_tiff_layer:napari_write_images
- id: PartSeg.write_tiff_labels
title: Write tiff Labels
python_name: PartSegCore.napari_plugins.save_tiff_layer:napari_write_labels
python_name: PartSeg.plugins.napari_io.save_tiff_layer:napari_write_labels
- id: PartSeg.load_mask_project
title: Get PartSeg mask project Reader
python_name: PartSegCore.napari_plugins.load_mask_project:napari_get_reader
python_name: PartSeg.plugins.napari_io.load_mask_project:napari_get_reader
- id: PartSeg.save_mask_roi
title: Write Labels as mask project
python_name: PartSegCore.napari_plugins.save_mask_roi:napari_write_labels
python_name: PartSeg.plugins.napari_io.save_mask_roi:napari_write_labels
- id: PartSeg.load_masked_image
title: Get Reader for image with mask
python_name: PartSegCore.napari_plugins.load_masked_image:napari_get_reader
python_name: PartSeg.plugins.napari_io.load_masked_image:napari_get_reader
- id: PartSeg.SimpleMeasurement
title: Create Simple Measurement
python_name: PartSeg.plugins.napari_widgets.simple_measurement_widget:SimpleMeasurement
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from PartSegCore.napari_plugins import (
from PartSeg.plugins.napari_io import (
load_image,
load_mask_project,
load_masked_image,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import functools

from PartSeg.plugins.napari_io.loader import partseg_loader
from PartSegCore.analysis.load_functions import LoadStackImage
from PartSegCore.napari_plugins.loader import partseg_loader


def napari_get_reader(path: str):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import functools

from PartSeg.plugins.napari_io.loader import partseg_loader
from PartSegCore.mask.io_functions import LoadROI
from PartSegCore.napari_plugins.loader import partseg_loader


def napari_get_reader(path: str):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import functools
import os.path

from PartSeg.plugins.napari_io.loader import partseg_loader
from PartSegCore.mask.io_functions import LoadStackImageWithMask
from PartSegCore.napari_plugins.loader import partseg_loader


def napari_get_reader(path: str):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import functools
import os.path

from PartSeg.plugins.napari_io.loader import partseg_loader
from PartSegCore.analysis.load_functions import LoadProject
from PartSegCore.napari_plugins.loader import partseg_loader


def napari_get_reader(path: str):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
from napari.layers import Image, Labels, Layer
from packaging.version import parse as parse_version

from PartSegCore.analysis import ProjectTuple
from PartSegCore.mask.io_functions import LoadROIFromTIFF
from PartSegCore.napari_plugins.load_image import napari_get_reader as napari_get_reader_image
from PartSegCore.napari_plugins.load_mask_project import napari_get_reader as napari_get_reader_mask
from PartSegCore.napari_plugins.load_masked_image import napari_get_reader as napari_get_reader_mask_image
from PartSegCore.napari_plugins.load_roi_project import napari_get_reader as napari_get_reader_roi
from PartSegCore.napari_plugins.loader import project_to_layers
from PartSegCore.napari_plugins.save_mask_roi import napari_write_labels
from PartSegCore.napari_plugins.save_tiff_layer import (
from PartSeg.plugins.napari_io.load_image import napari_get_reader as napari_get_reader_image
from PartSeg.plugins.napari_io.load_mask_project import napari_get_reader as napari_get_reader_mask
from PartSeg.plugins.napari_io.load_masked_image import napari_get_reader as napari_get_reader_mask_image
from PartSeg.plugins.napari_io.load_roi_project import napari_get_reader as napari_get_reader_roi
from PartSeg.plugins.napari_io.loader import project_to_layers
from PartSeg.plugins.napari_io.save_mask_roi import napari_write_labels
from PartSeg.plugins.napari_io.save_tiff_layer import (
napari_write_images,
)
from PartSegCore.napari_plugins.save_tiff_layer import (
from PartSeg.plugins.napari_io.save_tiff_layer import (
napari_write_labels as napari_write_labels_tiff,
)
from PartSegCore.analysis import ProjectTuple
from PartSegCore.mask.io_functions import LoadROIFromTIFF
from PartSegImage import GenericImageReader
from PartSegImage import Image as PImage

Expand Down

0 comments on commit 8b332c7

Please sign in to comment.