Skip to content

Commit

Permalink
updating more docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
HaleySchuhl committed Apr 26, 2024
1 parent 05a8a43 commit edc027e
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions plantcv/annotate/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def _view(self, label="default", color="c", view_all=False):
:param label: string
:param color: string
:param view_all: boolean
:return:
"""
if label not in self.coords and color in self.colors.values():
warn("The color assigned to the new class label is already used, if proceeding, "
Expand Down Expand Up @@ -61,9 +60,22 @@ def _view(self, label="default", color="c", view_all=False):


def _recover_circ(bin_img, c):
"""function to recover circular objects
"""Function to recover circular objects
Inputs:
bin_img = binary image with all objects from which we can recover
c = coordinate of annotation for location of recovery
Returns:
masked_circ =
c =
success =
:param bin_img: numpy.ndarray
:param c = tuple
:return masked_circ: numpy.ndarray
:return c: tuple
:return success: bool
"""
# Generates a binary image of a disc based on the coordinates c
# and the surrounding white pixels in bin_img
Expand Down Expand Up @@ -141,8 +153,17 @@ def _recover_circ(bin_img, c):

def _remove_points(autolist, confirmedlist):
"""Function to remove points if interactively removed by user
Inputs:
autolist =
confirmedlist =
Returns:
removecoor =
:param autolist:
:param confirmedlist:
:return removecoor:
"""
# internal function to remove to remove points specified by a user
removecoor = []
Expand All @@ -162,14 +183,17 @@ def __init__(self, img, figsize=(12, 6), label="default", color="r", view_all=Fa
"""Points initialization method.
Inputs:
img = image to annotate
figsize = figure plotting size, by default (12, 6), optional
figure plotting size, by default (12, 6)
label = class label, by default "default", optional
img = image to annotate
figsize = figure plotting size, by default (12, 6), optional
label = class label, by default "default", optional
color = color for plotting, optional
view_all = a flag indicating whether or not view all labels
:param img: numpy.ndarray
:param figsize: tuple
:param label: str
:param color: str
:param view_all: bool
"""
self.img = img
self.figsize = figsize
Expand Down

0 comments on commit edc027e

Please sign in to comment.