GeometryAnalysis

class PVBM.GeometryAnalysis.GeometricalVBMs[source]

A class that can perform geometrical biomarker computation for a fundus image.

compute_geomVBMs(blood_vessel, skeleton, xc, yc, radius)[source]

Compute various geometrical vascular biomarkers (VBMs) for a given blood vessel graph.

This function analyzes the blood vessel segmentation and skeleton to extract several biomarkers such as area, tortuosity index, median tortuosity, overall length, median branching angle, and counts of start, end, and intersection points. It also provides visualizations of specific points on the graph.

Parameters:
  • blood_vessel (np.array) – Blood vessel segmentation containing binary values within {0,1}.

  • skeleton (np.array) – Blood vessel segmentation skeleton containing binary values within {0,1}.

  • xc (int) – X-axis coordinate of the optic disc center.

  • yc (int) – Y-axis coordinate of the optic disc center.

  • radius (int) – Radius in pixels of the optic disc.

Returns:

A tuple containing: - A list of biomarkers [area, tortuosity index, median tortuosity, overall length, median branching angle, number of start points, number of end points, number of intersection points]. - A tuple of visualizations (endpoints, interpoints, startpoints, angles_dico, dico).

Return type:

Tuple[list, tuple]

apply_roi(segmentation, skeleton, zones_ABC, roi)[source]

Apply a region of interest (ROI) mask to the segmentation and skeleton images.

Parameters:
  • segmentation (np.array) – The segmentation image containing binary values within {0, 1}.

  • skeleton (np.array) – The skeleton image containing binary values within {0, 1}.

  • zones_ABC (np.array) – A mask image used to exclude specific zones, where the second channel defines the exclusion areas.

  • roi (np.array) – The region of interest mask, where the second channel defines the ROI areas.

Returns:

A tuple containing: - The modified segmentation image with the ROI applied. - The modified skeleton image with the ROI applied.

Return type:

Tuple[np.array, np.array]