SCTrack.feature module¶
- class SCTrack.feature.Feature(center, bbox, area=None, shape=None, cell_type=None, dic_intensity=None, dic_variance=None, mcy_intensity=None, mcy_variance=None, frame=None)[source]¶
Bases:
object
- All features contained in each cell instance, including the following:
area: cell area
bbox_area: bounding box area
shape: sequence of cell outline coordinates
center: cell center coordinates
vector: the vector of the cell relative to the origin
bbox: the bounding box coordinates of the cell [y_min, y_max, x_min, x_max]
dic_intensity: the dic gray value intensity of the mask area
mcy_intensity: mcy gray value intensity of the mask area
cell_type forecast period
- class SCTrack.feature.FeatureExtractor(*args, **kwargs)[source]¶
Bases:
object
Extract available features for each cell in a single image
- property cells¶
- convert_dtype(_FeatureExtractor__image: ndarray) ndarray [source]¶
Convert image from uint16 to uint8
- coordinate2mask(coords: np.ndarray | list | tuple, shape, value: int = 255) List[Mask] [source]¶
Draw the mask according to the contour coordinates. If you only pass in a set of contour coordinate values, be sure to put them in the list and pass in the function. For example, coord = ([x1 x2 … xn], [y1 y2 … yn]), please call it according to coordinate2mask([coord])
- get_roi_from_coord(cell: Cell, image: ndarray)[source]¶
Use the cell outline to obtain the dic image or the mcy image, depending on the incoming image parameters. :param cell: Cell object :param image: dic image or mcy image, that is, the parameter self.mcy or self.dic :return: roi np.ndarray
- class SCTrack.feature.Mask(mask=None, center=None, coord=None)[source]¶
Bases:
object
- property center: Tuple[int | float]¶
- property mask¶