neuralib.stardist.run_2d.StarDist2DOptions
- class neuralib.stardist.run_2d.StarDist2DOptions[source]
Bases:
AbstractSegmentationOptions- __init__()
Methods
__init__()eval(**kwargs)eval the model in single file or batch files in directory, and save the results
foreach_process_image([to_gray])Iterates over image files in the specified directory, processes each image, and yields the file path along with the processed image.
ij_roi_output(filepath)Get imageJ/Fiji
.roioutput save pathlaunch_napari([with_widget])Launch napari viewer for stardist results
main([args, parse_only, system_exit])parsing the commandline input args and call
run().new_parser(**kwargs)create an
ArgumentParser.process_image([to_gray])Process the image for segmentation.
run()called after
main().seg_output(filepath)Get segmented output save path
Attributes
parser description.
EPILOGparser epilog.
EX_GROUP_SOURCEGROUP_IOUSAGEparser usage.
batch_modeflag batch mode
directorydirectory for batch imaging processing
directory_suffixsuffix in the directory for batch mode (default: '.tif')
fileimage file path
file_modeflag file mode
invalid_existed_resultforce re-evaluate the result (default: False)
stardist pretrained model (default: '2D_versatile_fluo')
napari_viewview result by napari GUI, only available in single file mode (default: False)
no_normalizenot do percentile-based image normalization (default: False)
Consider only object candidates from pixels with predicted object probability above this threshold.
save_ij_roiif save also the imageJ/Fiji compatible .roi file (default: False)
with_normflag normalize image
- DESCRIPTION: str | None = 'Run the Stardist model for segmentation'
parser description. Could be override as a method if its content is dynamic-generated.
- model: Literal['2D_versatile_fluo', '2D_versatile_he', '2D_paper_dsb2018', '2D_demo']
stardist pretrained model (default: ‘2D_versatile_fluo’)
- prob_thresh: float | None
Consider only object candidates from pixels with predicted object probability above this threshold. Seealso: stardist.models.base._predict_instances_generator: prob_thresh (default: None)
- seg_output(filepath)[source]
Get segmented output save path
- Parameters:
filepath (Path) – filepath for image
- Returns:
segmented output save path
- Return type:
Path