neuralib.segmentation.stardist.run_2d.StarDistResult
- final class neuralib.segmentation.stardist.run_2d.StarDistResult[source]
Bases:
objectStardist results
Dimension parameters:
N = Number of segmented cell
E = Number of polygons edge
W = Image width
H = Image height
P = Number of image pixel with label
- filename: str
Source image file name
- labels: ndarray
Image with label. Array[float, [H, W]]
- cords: ndarray
Coordinates. Array[float, [N, 2, E]]
- prob: ndarray
Detected probability. Array[float, N]
- points: ndarray
Coordinates to points by simple XY average. Array[float, [N, 2]]
- classmethod load(file)[source]
- Parameters:
file (str | Path | bytes | BinaryIO | BufferedIOBase | BufferedReader)
- Return type:
Self
- savez(output_file)[source]
Save
filename,cord,prob,point,shape,index,index,valueas a npz file.shape: Array[int, 2] in H,W
index: index with labels. Array[int, [P, 2]]
value: label value in its index Array[int, P]
- Parameters:
output_file (str | Path | bytes | BinaryIO | BufferedIOBase | BufferedReader) – output
- Return type:
None
- save_roi(output_file)[source]
Save as imageJ
.roifile- Parameters:
output_file (str | Path | bytes | BinaryIO | BufferedIOBase | BufferedReader)
- Return type:
None
- get_index_value()[source]
Get labelled pixel index and its value.
- Returns:
Array[int, [P, 2]] and Array[float, P]
- Return type:
tuple[ndarray, ndarray]
- __init__(filename, labels, cords, prob)
Method generated by attrs for class StarDistResult.
- Parameters:
filename (str)
labels (ndarray)
cords (ndarray)
prob (ndarray)
- Return type:
None