trees_fusion.hpp 1.52 KB
 Baptiste Esteban committed Oct 07, 2021 1 2 3 4 5 6 7 8 9 10 ``````#pragma once #include #include #include #include namespace mln::morpho::details { `````` Baptiste Esteban committed Oct 13, 2021 11 12 13 14 15 16 17 `````` /// \brief Compute the inclusion graph of the trees given in input /// \param trees The input trees /// \param nodemaps The nodemaps related to each tree /// \param depths The depths attribute of each tree /// \param The number of tree given in argument /// \return A pair (graph, tree_to_graph) where graph is the inclusion graph and tree_to_graph /// is a map (tree_index, tree_node) -> graph_node `````` Baptiste Esteban committed Oct 07, 2021 18 19 20 `````` std::pair>, std::vector>> compute_inclusion_graph(component_tree<>* trees, image2d* nodemaps, std::vector* depths, int ntrees); `````` Baptiste Esteban committed Oct 13, 2021 21 22 23 24 25 26 27 28 `````` /// \brief Compute the depth map of an inclusion graph /// \param graph The inclusion graph /// \param tree_to_graph A map (tree_index, tree_node) -> graph_node /// \param nodemaps The nodemaps of each tree which built the inclusion graph /// \return The depth map of the inclusion graph (The depth should not exceed 2^16) /// FIXME: For future optimization, the arguments should be change to /// (const std::vector>& graph, const std::vector& tree_to_graph, image2d* nodemaps, const /// std::vector& tree_shapes) `````` Baptiste Esteban committed Oct 07, 2021 29 30 31 `````` image2d compute_depth_map(const std::vector>& graph, const std::vector>& tree_to_graph, image2d* nodemaps); } // namespace mln::morpho::details``````