medpy.graphcut.graph.GCGraph.set_tweights_all¶
-
GCGraph.
set_tweights_all
(tweights)[source]¶ Set all t-weights at once.
Parameters: tweights : iterable
Containing a pair of numeric values for each of the graphs nodes.
Notes
Since this method overrides already existing t-weights, it is strongly recommended to run
set_source_nodes
andset_sink_nodes
after the last call to this method.The weights for nodes directly connected to either the source or the sink are best set using
set_source_nodes
orset_sink_nodes
to ensure consistency of their maximum values.