diff --git a/docs/napari_label_classes.md b/docs/napari_label_classes.md index db8ee17..6fab410 100644 --- a/docs/napari_label_classes.md +++ b/docs/napari_label_classes.md @@ -1,26 +1,26 @@ ## Label Image with Napari -This function opens an image in Napari and then defines a set of classes to label. A random shape label is assigned to each class. +This function opens an image in Napari and then defines a set of Points layers with the user-defined labels called `classes`. A random `shape` of the annotation symbol is assigned to each of the `classes`. Image can be annotated as long as viewer is open. -**plantcv.annotate.napari_label_classes*(*img, classes, size, shape =10, 'square', importdata=False, show=True*) +**plantcv.annotate.napari_label_classes*(*img, classes, size=10, shape='square', importdata=False, show=True*) **returns** napari viewer object - **Parameters:** - img - image data (compatible with gray, RGB, and hyperspectral data. If data is hyperspecral it should be the array e.g. hyperspectral.array_data) - classes - list of classes to label. This option is not necessary if data is data is imported. - - size - integer pixel size of label - - shape - can be 'o', 'arrow', 'clobber', 'cross', 'diamond', 'disc', 'hbar', 'ring', 'square', 'star', 'tailed_arrow', - 'triangle_down', 'triangle_up', 'vbar', 'x'. + - size - integer pixel size of label (also adjustable from the interactive Napari viewer) + - shape - shape of the annotation symbol. Can be 'o', 'arrow', 'clobber', 'cross', 'diamond', 'disc', 'hbar', 'ring', 'square' (default), 'star', 'tailed_arrow', + 'triangle_down', 'triangle_up', 'vbar', or 'x' (also adjustable from the interactive Napari viewer) - importdata - dictionary of data, data saved from napari_save_coor or data imported from napari_read_coor - - show - if show = True, viewer is launched. False setting is useful for test purposes. + - show - if `show=True`, viewer is launched. `False` setting is useful for test purposes. - **Context:** - - Adding class labels to images. Works best on an image that has objects segmented/classified with contours/clusters labeled with values (e.g. labeled mask, output of kmeans clustering). + - Adding one or more classes of points layer for annotation of the image. - **Example use:** - - Labeling output of kmeans clustering into classes. Labeling points. + - Ground truth counting, labeling classes of objects of interest. ```python @@ -31,9 +31,8 @@ import napari # Create an instance of the Points class img, path, name = pcv.readimage("./grayimg.png") -viewer = pcvan.napari_label_classes(img=img, classes=['background', 'wing','seed'], size = 30) - -# Should open interactive napari viewer +# Opens interactive napari viewer +viewer = pcvan.napari_label_classes(img=img, classes=['background', 'wing','seed'], size=30) ```