Skip to content

Commit

Permalink
Merge PR #323 | Proofreading undo/redo & load/save state
Browse files Browse the repository at this point in the history
  • Loading branch information
qin-yu authored Sep 19, 2024
2 parents 9588363 + 8ac7db1 commit 2083be1
Show file tree
Hide file tree
Showing 4 changed files with 281 additions and 81 deletions.
8 changes: 4 additions & 4 deletions plantseg/core/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ class SemanticType(Enum):
Attributes:
RAW (str): Reserved for raw images (e.g. microscopy images)
SEGMENTATION (str): Reserved for segmentation masks
PREDICTION (str): Reserved for model prediction
LABEL (str): Reserved for ground truth labels
PREDICTION (str): Reserved for model prediction
SEGMENTATION (str): Reserved for segmentation masks
"""

RAW = "raw"
SEGMENTATION = "segmentation"
PREDICTION = "prediction"
LABEL = "label"
PREDICTION = "prediction"
SEGMENTATION = "segmentation"


class ImageType(Enum):
Expand Down
8 changes: 8 additions & 0 deletions plantseg/viewer_napari/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@
widget_infos,
widget_lifted_multicut,
widget_open_file,
widget_proofreading_initialisation,
widget_redo,
widget_remove_false_positives_by_foreground,
widget_rescaling,
widget_save_state,
widget_show_info,
widget_split_and_merge_from_scribbles,
widget_undo,
widget_unet_prediction,
)

Expand Down Expand Up @@ -104,9 +108,13 @@ def get_extras_tab():
def get_proofreading_tab():
container = MainWindow(
widgets=[
widget_proofreading_initialisation,
widget_split_and_merge_from_scribbles,
widget_clean_scribble,
widget_filter_segmentation,
widget_undo,
widget_redo,
widget_save_state,
widget_remove_false_positives_by_foreground,
widget_fix_over_under_segmentation_from_nuclei,
],
Expand Down
8 changes: 8 additions & 0 deletions plantseg/viewer_napari/widgets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
widget_add_label_to_corrected,
widget_clean_scribble,
widget_filter_segmentation,
widget_proofreading_initialisation,
widget_redo,
widget_save_state,
widget_split_and_merge_from_scribbles,
widget_undo,
)
from plantseg.viewer_napari.widgets.segmentation import widget_agglomeration, widget_dt_ws, widget_lifted_multicut

Expand All @@ -32,9 +36,13 @@
"widget_lifted_multicut",
"widget_add_custom_model",
# Proofreading
"widget_proofreading_initialisation",
"widget_split_and_merge_from_scribbles",
"widget_clean_scribble",
"widget_filter_segmentation",
"widget_undo",
"widget_redo",
"widget_save_state",
"widget_add_label_to_corrected", # XXX: Not used in container
"widget_remove_false_positives_by_foreground",
"widget_fix_over_under_segmentation_from_nuclei",
Expand Down
Loading

0 comments on commit 2083be1

Please sign in to comment.