BuildILMGraph: Module for building graph of ILM layer¶
PRLEC Framework for OCT Processing and Visualization
-
OCT_GUI.Algorithms.AutomaticSegmentation.BuildILMGraph.
calculateWeight
(value_v_i, value_v_j)[source]¶ Exponential weight calculation
When a pixel’s intensity is zero, 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
Returns: - weight: scalar, float
the edge weight
-
OCT_GUI.Algorithms.AutomaticSegmentation.BuildILMGraph.
getILMGraph
(_slice, scaling, shortest_path, y_offset)[source]¶ Construct the undirected, weighted ILM graph from the weights.
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