CentralRetinalAnalysis

class PVBM.CentralRetinalAnalysis.CREVBMs[source]

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

compute_central_retinal_equivalents(blood_vessel, skeleton, xc, yc, radius, artery=True, Toplot=False)[source]

Compute the CRAE or CRVE equivalent for a given blood vessel 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 of the optic disc center

  • yc (int) – y axis of the optic disc center

  • radius (int) – radius in pixel of the optic disc

  • artery (Bool) – Flag to decide if to use CRAE or CRVE formulas (artery to True means CRAE, and to False means CRVE)

  • Toplot (Bool) – Flag to decide if to store the visualisation element. (Setting it to true use more RAM)

Returns:

A tuple containing: - A result dictionnary (Dict): Dictionnary containing the computer CRE (-1 if it has failed) - plotable_list (List): A summary that contains the topology information required to plot the visualisation (really useful when Toplot is True). Return None if the computation has failed.

Return type:

Tuple[Dict, List]

apply_roi(segmentation, skeleton, zones_ABC)[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.

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]