pycroglia.ui.widgets.segmentation package

Subpackages

Submodules

class pycroglia.ui.widgets.segmentation.results.SegmentationResults(file_path, img, segmented_cell_indices, gray_filter_value, min_size, erosion_radius)[source]

Bases: object

Data class containing the results of cell segmentation for a single image.

Stores the file path and the labeled cells resulting from the segmentation process. Used to pass segmentation results between workflow steps.

Parameters:
file_path

Path to the original image file that was segmented.

Type:

str

img

The labeled cells object containing segmentation results.

Type:

LabeledCells

cell_indices

List of all cell indices from segmentation.

Type:

Optional[List[int]]

gray_filter_value

Gray filter threshold used.

Type:

Optional[float]

min_size

Minimum size for small object removal.

Type:

Optional[int]

erosion_radius

Erosion footprint radius.

Type:

Optional[int]

as_dict()[source]

Convert the segmentation results to a dictionary representation.

Returns:

Dictionary containing file_path, img, and metadata as key-value pairs.

Return type:

dict

erosion_radius: int
file_path: str
gray_filter_value: float
img: LabeledCells
min_size: int
segmented_cell_indices: List[int]

Module contents