GeometricalAnalysis
- class PVBM.GeometricalAnalysis.GeometricalVBMs[source]
A class that can perform geometrical biomarker computation for a fundus image.
Deprecated since version 2.9.0: This class will be removed in version 3.0. Use GeometryAnalysis.GeometricalVBMs instead.
- area(segmentation)[source]
Computes the area of the blood vessels calculated as the total number of pixels in the segmentation, and is expressed in pixels^2 (squared pixels).
- Parameters:
segmentation (array) – The segmentation is a two-dimensional array (HxW) with binary values (0 or 1).
- Returns:
The area of the segmentation.
- Return type:
float
- compute_branching_angles(segmentation_skeleton)[source]
Computes the mean, standard deviation, and median branching angle of the fundus image vasculature segmentation.
- Parameters:
segmentation_skeleton (np.ndarray) – The skeleton of the segmentation is a two-dimensional array (HxW) with binary values (0 or 1).
- Returns:
The mean of the branching angles (in degrees)
The standard deviation of the branching angles (in degrees)
The median of the branching angles (in degrees)
A dictionary containing all the branching angles with their respective indices in the array as keys
A two-dimensional numpy array representing the visualization of the computed centroid of the segmentation skeleton.
- Return type:
(float, float, float, dict, np.ndarray)
- compute_particular_points(segmentation_skeleton)[source]
The particular point is the union between the endpoints and the intersection points. This function computes the number of endpoints and intersection points of the fundus image vasculature segmentation.
- Parameters:
segmentation_skeleton (np.ndarray) – The skeleton of the segmentation is a two-dimensional array (HxW) with binary values (0 or 1).
- Returns:
The number of endpoints
The number of intersection points,
An array with endpoint pixel positions
An array with intersection point pixel positions.
- Return type:
(int, int, np.ndarray, np.ndarray)
- compute_perimeter(segmentation)[source]
Computes the perimeter and the border of the fundus image vasculature segmentation.
- Parameters:
segmentation (np.ndarray) – The segmentation is a two-dimensional array (HxW) with binary value (0 or 1).
- Returns:
The perimeter (in pixel)
A matrix containing the edges of the segmentation.
- Return type:
(float, np.ndarray)
- compute_tortuosity_length(segmentation_skeleton)[source]
Computes the median tortuosity and the length of the fundus image vasculature segmentation.
- Parameters:
segmentation_skeleton (np.ndarray) – The skeleton of the segmentation is a two-dimensional array (HxW) with binary values (0 or 1).
- Returns:
The median tortuosity
The overall length (in pixel)
A list of chord distance of each blood vessel (in pixel)
A list of lengths distance (arc) of each blood vessel (in pixel)
A dictionary with connection information.
- Return type:
(float, float, list, list, dict)