neuralib.segmentation.cellpose.core.AbstractCellPoseOption

class neuralib.segmentation.cellpose.core.AbstractCellPoseOption[source]

Bases: AbstractSegmentationOption

__init__()

Methods

__init__()

eval()

eval the model in single file or batch files, and save the results

foreach_normalize_image()

Normalize the image in batch mode

foreach_raw_image()

Load image from a directory and convert to grayscale

ij_roi_output(filepath)

Get imageJ/Fiji .roi output save path

launch_cellpose_gui()

AttributeError: 'MainW' object has no attribute 'load_3D'.

launch_napari()

napari viewer

main([args, parse_only, system_exit])

parsing the commandline input args and call run().

new_parser(**kwargs)

create an ArgumentParser.

normalize_image()

Normalize the image

raw_image()

Load image from file and convert to grayscale

run()

called after main()

seg_output(filepath)

Get segmented output save path

Attributes

DESCRIPTION

parser description.

EPILOG

parser epilog.

EX_GROUP_SOURCE

USAGE

parser usage.

batch_mode

Flag batch mode

cellpose_view

launch cellpose gui for the analyzed result

chan_nuclear

nuclear channel

chan_seg

channel for segmentation default:{'none': -1, 'gray': 0, 'red': 1, 'green': 2, 'blue': 3}

diameter

diameter for each neuron (number of each pixel)

directory

images directory for batch processing

directory_suffix

suffix in batch mode

file

image file path

file_mode

Flag file mode

force_re_eval

force re-evaluate the result

model

which pretrained model

napari_view

view in napari

no_normalize

NOT DO Percentile-based image normalization for eval

save_ij_roi

if save also the imageJ/Fiji compatible .roi file

DESCRIPTION: str = 'ABC for GUI Cellpose'

parser description. Could be override as a method if its content is dynamic-generated.

model: Literal['cyto', 'cyto2', 'cyto3']

which pretrained model

chan_seg: int

channel for segmentation default:{‘none’: -1, ‘gray’: 0, ‘red’: 1, ‘green’: 2, ‘blue’: 3}

chan_nuclear: int

nuclear channel

diameter: int

diameter for each neuron (number of each pixel)

cellpose_view: bool

launch cellpose gui for the analyzed result

seg_output(filepath)[source]

Get segmented output save path

Parameters:

filepath (Path) – filepath for image

Returns:

segmented output save path

Return type:

Path

launch_napari()[source]

napari viewer

launch_cellpose_gui()[source]

AttributeError: ‘MainW’ object has no attribute ‘load_3D’. Cellpose version 3.0.10.

TODO open issue in cellpose -> move load_3D instance attribute to line above io._load_image() in MainW.__init__()