napari_dmc_brainmap.segment package

Subpackages

Submodules

napari_dmc_brainmap.segment.segment module

class napari_dmc_brainmap.segment.segment.SegmentWidget(napari_viewer: Viewer)[source]

Bases: QWidget

QWidget for configuring and running segmentation processes for cells and projections.

progress_signal_cells
progress_signal_centroid
progress_signal_projections
napari_dmc_brainmap.segment.segment.create_cells_preseg(cells_segmenter: CellsSegmenter, progress_signal_cells: pyqtSignal) str[source]

Perform pre-segmentation of cells.

Parameters:
  • cells_segmenter (CellsSegmenter) – The cells segmentation instance.

  • progress_signal_cells (Signal) – Progress signal for updating the progress bar.

Returns:

Status of the operation.

Return type:

str

napari_dmc_brainmap.segment.segment.create_projection_preseg(projection_segmenter: ProjectionSegmenter, progress_signal_projections: pyqtSignal) str[source]

Perform pre-segmentation of projections.

Parameters:
  • projection_segmenter (ProjectionSegmenter) – The projections segmentation instance.

  • progress_signal_projections (Signal) – Progress signal for updating the progress bar.

Returns:

Status of the operation.

Return type:

str

napari_dmc_brainmap.segment.segment.get_centroid_coord(centroid_finder: CentroidFinder, progress_signal_centroid: pyqtSignal) str[source]

Perform centroid finding on pre-segmented data.

Parameters:
  • centroid_finder (CentroidFinder) – The centroid finder instance.

  • progress_signal_centroid (Signal) – Progress signal for updating the progress bar.

Returns:

Status of the operation.

Return type:

str

napari_dmc_brainmap.segment.segment.get_cmap(name: str) Dict[str, str][source]

Retrieve colormap definitions for specific segmentation types.

Parameters:

name (str) – Name of the colormap category.

Returns:

Mapping of segmentation types to colors.

Return type:

Dict[str, str]

napari_dmc_brainmap.segment.segment.get_path_to_im(input_path: Path, image_idx: int, single_channel: bool = False, chan: str | None = None, pre_seg: bool = False) Path | str[source]

Get the path to the image to be segmented.

Parameters:
  • input_path (Path) – Path to the base input directory.

  • image_idx (int) – Index of the image to retrieve.

  • single_channel (bool, optional) – Whether to use single-channel images. Defaults to False.

  • chan (str, optional) – The specific channel to retrieve. Defaults to None.

  • pre_seg (bool, optional) – Whether to retrieve the image name for pre-segmentation. Defaults to False.

Returns:

The path to the image or the name of the image.

Return type:

Union[Path, str]

napari_dmc_brainmap.segment.segment.initialize_findcentroids_widget()[source]

Initialize the widget for configuring centroid detection of pre-segmentation data.

Returns:

The initialized widget for centroid detection.

Return type:

FunctionGui

napari_dmc_brainmap.segment.segment.initialize_loadpreseg_widget() FunctionGui[source]

Initialize the widget for loading pre-segmentation data.

Returns:

The initialized widget for loading pre-segmentation data.

Return type:

FunctionGui

napari_dmc_brainmap.segment.segment.initialize_presegcells_widget()[source]

Initialize the widget for configuring cells pre-segmentation.

Returns:

The initialized widget for cells pre-segmentation.

Return type:

FunctionGui

napari_dmc_brainmap.segment.segment.initialize_presegproj_widget()[source]

Initialize the widget for configuring projections pre-segmentation.

Returns:

The initialized widget for projections pre-segmentation.

Return type:

FunctionGui

napari_dmc_brainmap.segment.segment.initialize_segment_widget() FunctionGui[source]

Initialize the segment widget for selecting input path and segmentation parameters.

Returns:

The initialized widget for segment configuration.

Return type:

FunctionGui

Module contents