Skip to content

Commit

Permalink
Merge pull request #70 from haesleinhuepf/dont_show_table
Browse files Browse the repository at this point in the history
optionally don't show table
  • Loading branch information
haesleinhuepf authored Mar 11, 2023
2 parents a190019 + bbaaf83 commit dd80c68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions napari_skimage_regionprops/_load_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


@register_function(menu="Measurement > Load from CSV (nsr)")
def load_csv(csv_filename:"magicgui.types.PathLike", labels_layer: "napari.layers.Labels", viewer: "napari.Viewer" = None):
def load_csv(csv_filename:"magicgui.types.PathLike", labels_layer: "napari.layers.Labels", show_table: bool = True, viewer: "napari.Viewer" = None):
"""Save contents of a CSV file into a given layer's properties"""
import pandas as pd
# load region properties from csv file
Expand All @@ -30,6 +30,6 @@ def load_csv(csv_filename:"magicgui.types.PathLike", labels_layer: "napari.layer
if hasattr(labels_layer, "features"):
labels_layer.features = edited_reg_props

if viewer is not None:
if viewer is not None and show_table:
from ._table import add_table
add_table(labels_layer, viewer)

0 comments on commit dd80c68

Please sign in to comment.