medpy.graphcut.energy_label.regional_atlas#
- medpy.graphcut.energy_label.regional_atlas(graph, label_image, xxx_todo_changeme1)[source]#
Regional term based on a probability atlas.
An implementation of a regional term, suitable to be used with the
graph_from_labels
function.This regional term introduces statistical probability of a voxel to belong to the object to segment. It computes the sum of all statistical atlas voxels under each region and uses this value as terminal node weight for the graph cut.
- Parameters:
- graphGCGraph
The graph to add the weights to.
- label_imagendarray
The label image.
- probability_mapndarray
The probability atlas image associated with the object to segment.
- alphafloat
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.This function is tested on 2D and 3D images and theoretically works for all dimensionalities.