medpy.graphcut.maxflow.GraphFloat#

class medpy.graphcut.maxflow.GraphFloat[source]#

Graph template intance with float 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 :[source]#
C++ signature :

void __init__(_object*,int,int)

Methods

__init__(arg1, arg2, arg3)

C++ signature :

add_edge(arg1, arg2, arg3, arg4, arg5)

Add an edge from i to j with the capacity cap and reversed capacity rev_cap.

add_node(arg1, arg2)

C++ signature :

add_tweights(arg1, arg2, arg3, arg4)

Add a terminal weight from cap_source to i and from i to cap_sink.

get_arc_ends(arg1, arg2, arg3, arg4)

C++ signature :

get_arc_num(arg1)

C++ signature :

get_edge(arg1, arg2, arg3)

Returns the weight of the directed edge i->j between two node.

get_node_num(arg1)

Returns the number of nodes already declared with the add_node method.

get_rcap(arg1, arg2)

C++ signature :

get_trcap(arg1, arg2)

C++ signature :

mark_node(arg1, arg2)

C++ signature :

maxflow(arg1)

Compute the min-cut/max-flow of the graph and return the maxflow value.

remove_from_changed_list(arg1, arg2)

C++ signature :

reset(arg1)

Reset the whole graph to the state just after initialization.

set_rcap(arg1, arg2, arg3)

C++ signature :

set_trcap(arg1, arg2, arg3)

C++ signature :

sum_edge(arg1, arg2, arg3, arg4, arg5)

Add an edge from i to j with the capacity cap and reversed capacity rev_cap.

what_segment(arg1, arg2)

Returns the terminal the node i belongs to after executing the min-cut/max-flow.