PartSeg

PartSeg

PartSeg is python GUI and set of napari plugins for bio imaging analysis especially nucleus analysis,

PartSeg is a specialized GUI for feature extraction from multichannel light microscopy images, but also most of its features are available as napari Widgets. Information about PartSeg as standalone program or library are here

Who is This For?

This plugin is for 2D and 3D segmentation of distinct objects from images and measuring various parameters of these objects.

This plugin process everything in memory, so it may not work with images stored in dask arrays. Currently, this plugin does not support the processing of Time data.

How-to Guide

The example data is stored here.

The above video presents simple segmentation and measurement of various parameters of this segmentation (ROI).

As bellow described, algorithms are the result of porting PartSeg utilities to napari then detailed description could be found in PartSeg documentation/

ROI Extraction (Segmentation, pixel labeling)

The PartSeg is focused on the reproducible ROI Extraction process and offers two groups of algorithms:

  • ROI Mask Extraction set of algorithms (from PartSeg ROI Analysis) to work on a whole stack and mainly used for extracting nucleus or cell from a stack.

  • ROI Analysis Extraction set of algorithms (from PartSeg ROI Mask) for detailed segmentation on the level of a single nucleus. If possible, they use an inner caching mechanism to improve performance while adjusting parameters.

Algorithms from both groups should support masking. (perform ROI extraction only on the mask layer's area has non-zero values).

Parameters of ROI Extraction could be saved for later reuse (in the program) or exported to JSON and imported in another instance. With an accuracy of up to channel selection, they are identical to PartSeg, so importing should work both ways, but the channel selection step needs to be repeated.

The list of available algorithms could be extensible using the PartSeg plugin mechanism.

Measurement widgets

PartSeg offers two measurement widgets:

Measurement

Interface to PartSeg measurement engine. In this widget, there are two tabs. *Measurement settings that allow to define, delete, import, and export set of measurements

Measurement Settings

and Measurement for performing measures using an already defined set.

Measurement

The list of available measurements could be extensible using the PartSeg plugin mechanism.

Simple Measurement

Simple Measurement

Set of measurements that could be calculated per component respecting data voxel size. In comparison to Measurement list of available measures is limited to ones that do not need Mask information and could be calculated per component.

This widget is equivalent to the PartSeg ROI Mask Simple Measurement window.

Search label

Widget to find the layer with the given number By highlighting it or zooming on it. The highlight widget uses white color, so the highlight may not be visible if the label has a bright color.

Mask create

Transform labels layer into another labels layer with the possibility to dilate, and filling small holes

Mask create widget

Algorithm group widgets

The central concept of PartSeg is the group of algorithms that shares the same interface. This allows to create workflows where author of the workflow does not need to know which algorithm for a given task is the best. The user could select the best one and use it. For example workflow author may specify only that he expect thresholding operator and user could select any of available. (currently used only in PartSeg ROI Extraction)

Currently there are five algorithm groups and each of them has its own widget:

Threshold

Threshold widget

Noise filtering

Noise filtering widget

Double threshold

where area of interest is defined by positive value and core objects (start for sprawl) by value 2:

Double threshold widget

Border smooth for smoothing Labels border

Border smooth widget

Watershed for watershed segmentation

Watershed widget

Part of the flow methods require information if the central object is brighter or darker than the area to split. Examples of such methods are MSO and Path.

Helpful widgets

There are also two widgets to simplify work with labels:

Connected component

image

Split core objects

It is for extract core objects returned by double threshold widget

image

Label selector

This is widget that allows to create custom label mapping. It could be useful to prepare publications figures. If image hase more labels that selected label mapping contains it cycle colors. Created mapping will be stored between sessions

This widget will not work with really big labels numbers.

Create labels mapping: Label mapping creation

Apply label mapping: Label mapping apply

More details about usage could be found here

Copy labels

Copy labels widget

Copy selected Labels from current layer along z-axis.

Image Colormap

This widget allows to create custom colormap for image.

Create colormaps will be stored between sessions.

Create new colormap: Create colormap

Apply colormap: Apply colormap

More details about usage could be found here

Reader plugins

In this plugin, there are also all PartSeg readers and writers. The most important readers are this, which allows loading PartSeg projects to napari. The one which could impact a user workflow is tiff reader. In comparison to the napari default one, there are two essential differences. Napari's built-in plugin loads data as they are in a file. PartSeg plugin read file metadata and return data in TZYX order. PartSeg reader returns each channel as a separate layer. PartSeg reader also tries to parse voxel size metadata and set scale parameters to nanometers' size.

Version:

  • 0.15.2

Last updated:

  • 28 August 2023

First released:

  • 14 January 2019

License:

Supported data:

  • Information not submitted

Save extension:

Save layers:

GitHub activity:

  • Stars: 29
  • Forks: 6
  • Issues + PRs: 16

Python versions supported:

Operating system:

Requirements:

  • IPython >=7.7.0
  • PartSegCore-compiled-backend <0.16.0,>=0.13.11
  • PartSegData ==0.10.0
  • QtAwesome !=1.2.0,>=1.0.3
  • QtPy >=1.10.0
  • SimpleITK >=2.0.0
  • appdirs >=1.4.4
  • czifile >=2019.5.22
  • defusedxml >=0.6.0
  • fonticon-fontawesome6 >=6.1.1
  • h5py >=3.3.0
  • imagecodecs >=2020.5.30
  • imageio >=2.5.0
  • ipykernel >=5.2.0
  • local-migrator >=0.1.7
  • magicgui !=0.5.0,>=0.4.0
  • mahotas >=1.4.10
  • napari >=0.4.14
  • nme >=0.1.7
  • numpy >=1.18.5
  • oiffile >=2020.1.18
  • openpyxl >=2.5.7
  • packaging >=20.0
  • pandas >=1.1.0
  • psygnal >=0.3.1
  • pydantic <2,>=1.8.1
  • pygments >=2.4.0
  • qtconsole >=4.7.7
  • requests >=2.18.0
  • scipy >=1.4.1
  • sentry-sdk >=0.14.3
  • six >=1.11.0
  • superqt >=0.3.0
  • sympy >=1.1.1
  • tifffile >=2020.9.30
  • traceback-with-variables >=2.0.4
  • vispy >=0.9.4
  • xlrd >=1.1.0
  • xlsxwriter >=2.0.0

Sign up to receive updates