medpy.graphcut.energy_voxel.boundary_maximum_linear#

medpy.graphcut.energy_voxel.boundary_maximum_linear(graph, xxx_todo_changeme1)[source]#

Boundary term processing adjacent voxels maximum value using a linear relationship.

An implementation of a boundary term, suitable to be used with the graph_from_voxels function.

The same as boundary_difference_linear, but working on the gradient image instead of the original. See there for details.

Parameters:
graphGCGraph

The graph to add the weights to.

gradient_imagendarray

The gradient image.

spacingsequence of float or False

A sequence containing the slice spacing used for weighting the computed neighbourhood weight value for different dimensions. If False, no distance based weighting of the graph edges is performed.

Notes

This function requires the gradient image to be passed along. That means that graph_from_voxels has to be called with boundary_term_args set to the gradient image.