Closed lnajman closed 3 years ago
The same is true for filter_non_relevant_node_from_tree
and I guess all the similar filterings
This is due to a bad handling of region adjacency graphs in filter_non_relevant_node_from_tree
.
Probably the faulty line is : https://github.com/higra/Higra/blob/8c0b45fcaf75fee119a3ea62906908d57b4b5200/higra/algo/tree.py#L186 which should be
saliency = hg.saliency(tree, altitudes, leaf_graph, handle_rag=False)
The code
filtered_tree, filtered_altitudes = hg.filter_small_nodes_from_tree(tree_ws_area, altitudes_ws_area, 100)
returns the errorThe dimension of the provided edge data array 'edge_weights' does not match the number of edges in the provided graph 'graph'.
when tree_ws_area is not a tree based on a mst (ie, when it is not computed by bpt_canonical)