Closed orpheus92 closed 6 years ago
This problem should already be addressed by nglpy (see here), but unfortunately it is not exposed to either the python interface for nglpy or here. We can possibly just expose that feature in both cases, so all you have to do is set a flag that says connected=True
. Does the fact that the data is not one connected component cause any troubles on your end? In theory, you should still be able to process everything with mulitple connected components. Your tree will just have more than one root node.
We can add two functionalities. One for exposing this parameter so you can ensure your data is connected before performing a Morse-Smale decomposition on it, and we can also add a function is_single_component()
or connected_components()
that returns either a boolean or a count of the number of connected components exist in the data.
So right now when the k parameter is not large enough, the partitions will not be merged to 1 single component. I need to add validation check on that. Do you think it makes more sense to add that in topopy or post_process?