BuildRPEGraph (Refine): Refinement of RPE segmentation (9-neighborhood)¶
PRLEC Framework for OCT Processing and Visualization
-
OCT_GUI.Algorithms.RefinementRPE.BuildRPEGraph.
calculateExpWeight
(value_v_i, value_v_j, shortest_path)[source]¶ Exponential weight calculation.
When a pixel’s intensity is smaller than 0.4, the weight is set to a constant (exp(6))
Parameters: - value_v_i: scalar, float
first pixel’s intensity
- value_v_j: scalar, float
second’s pixel’s intensity
- shortest_path: ndarray
when initial slice (shortest path = None), different behavior
- Returns
- ———-
- weight: scalar, float
the edge weight
-
OCT_GUI.Algorithms.RefinementRPE.BuildRPEGraph.
getRPEGraph
(_slice, shortest_path, scaling, y_offset)[source]¶ Construct the undirected, weighted RPE graph from the calculated.
For the initial slice (center), an extensive calculation is conducted. Afterwards, the shortest path of the predecessor is dilated to speed up the process. Invalid edges are set to np.nan
Parameters: - _slice: ndarray
weight slice
- scaling: scalar
scaling factor for calculation
- shortest_path: ndarray
the shortest path from the predecessor
- y_offset: scalar
the top row extracted from the predecessor
Returns: - g: graph
the resulting segmentation
- endpoint: scalar, int
the endpoint of the graph
- y_offset:
the top row extracted from the predecessor