Previous topic

medpy.graphcut.graph.Graph.set_source_nodes

Next topic

medpy.graphcut.maxflow.GraphFloat

This Page

medpy.graphcut.maxflow.GraphDouble

class medpy.graphcut.maxflow.GraphDouble

Graph template intance with double for flowtype, tcaptype and captype. Takes the number of nodes as first and the number of edges as second parameter. Although it is possible to exceed these values later, it is discourage as it leads to bad memory management. The edges i->j and j->i count here as one single edge.

__init__((object)arg1, (int)arg2, (int)arg3) → None :
C++ signature :
void __init__(_object*,int,int)

Methods

__init__((object)arg1, (int)arg2, (int)arg3) C++ signature :
add_edge((GraphDouble)arg1, (int)arg2, …) Add an edge from i to j with the capacity cap and reversed capacity rev_cap.
add_node((GraphDouble)arg1, (int)arg2) C++ signature :
add_tweights((GraphDouble)arg1, (int)arg2, …) Add a terminal weight from cap_source to i and from i to cap_sink.
get_arc_ends((GraphDouble)arg1, …) C++ signature :
get_arc_num((GraphDouble)arg1) C++ signature :
get_edge((GraphDouble)arg1, (int)arg2, (int)arg3) Returns the weight of the directed edge i->j between two node.
get_node_num((GraphDouble)arg1) Returns the number of nodes already declared with the add_node method.
get_rcap((GraphDouble)arg1, (object)arg2) C++ signature :
get_trcap((GraphDouble)arg1, (int)arg2) C++ signature :
mark_node((GraphDouble)arg1, (int)arg2) C++ signature :
maxflow((GraphDouble)arg1) Compute the min-cut/max-flow of the graph and return the maxflow value.
remove_from_changed_list((GraphDouble)arg1, …) C++ signature :
reset((GraphDouble)arg1) Reset the whole graph to the state just after initialization.
set_rcap((GraphDouble)arg1, (object)arg2, …) C++ signature :
set_trcap((GraphDouble)arg1, (int)arg2, …) C++ signature :
sum_edge((GraphDouble)arg1, (int)arg2, …) Add an edge from i to j with the capacity cap and reversed capacity rev_cap.
what_segment((GraphDouble)arg1, (int)arg2) Returns the terminal the node i belongs to after executing the min-cut/max-flow.