From b589e3bd1b1359980867b42e3dd0399cfeaf0666 Mon Sep 17 00:00:00 2001 From: Christopher Rhodes <christopher.rhodes@embl.de> Date: Wed, 14 Aug 2024 15:37:17 +0200 Subject: [PATCH] docstrings only --- model_server/base/roiset.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/model_server/base/roiset.py b/model_server/base/roiset.py index 0ed42890..c220c215 100644 --- a/model_server/base/roiset.py +++ b/model_server/base/roiset.py @@ -296,7 +296,7 @@ class RoiSet(object): """ A set of regions of interest, referenced by their positions and contours in the YXCZ space of stack acc_raw. RoiSet contains their internal state, which may be exported as patches, maps, and other products by export methods. - :param acc_raw: accessor to a generally a multichannel z-stack + :param acc_raw: accessor to a generally multichannel z-stack :param df: dataframe containing at minimum bounding box and segmentation mask information :param params: optional arguments that influence the definition and representation of ROIs """ @@ -318,12 +318,12 @@ class RoiSet(object): params: RoiSetMetaParams = RoiSetMetaParams(), ): """ - - :param acc_raw: + Create an RoiSet from an object identities map + :param acc_raw: accessor to a generally a multichannel z-stack :param acc_obj_ids: accessor to a 2D single-channel object identities map, where each pixel's intensity labels its membership in a connected object - :param params: - :return: + :param params: optional arguments that influence the definition and representation of ROIs + :return: RoiSet object """ assert acc_obj_ids.chroma == 1 @@ -344,6 +344,13 @@ class RoiSet(object): yxhw_list: List, params: RoiSetMetaParams = RoiSetMetaParams() ): + """ + Create and RoiSet from bounding boxes + :param acc_raw: + :param yxhw_list: list of bounding boxing coordinates [corner X, corner Y, height, width] + :param params: optional arguments that influence the definition and representation of ROIs + :return: RoiSet object + """ df = pd.DataFrame([ { 'y0': yxhw[0], -- GitLab