medpy.graphcut.energy_voxel.regional_probability_map¶
-
medpy.graphcut.energy_voxel.
regional_probability_map
(graph, xxx_todo_changeme)[source]¶ Regional term based on a probability atlas.
An implementation of a regional term, suitable to be used with the
graph_from_voxels
function.Takes an image/graph/map as input where each entry contains a probability value for the corresponding GC graph node to belong to the foreground object. The probabilities must be in the range \([0, 1]\). The reverse weights are assigned to the sink (which corresponds to the background).
Parameters: graph : GCGraph
The graph to add the weights to.
probability_map : ndarray
The label image.
alpha : float
The energy terms alpha value, balancing between boundary and regional term.
Notes
This function requires a probability atlas image of the same shape as the original image to be passed along. That means that
graph_from_labels
has to be called withregional_term_args
set to the probability atlas image.