-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About gudhi library application to brain surface segmentation #42
Comments
Three-dimensional map of cerebral cortex:https://github.com/tanjia123456/Brain/blob/main/brain_graph.png |
This is a common difficulty with TDA, you don't just throw it at your data, you need to select some view of your data, here a filtration. You could compute the homology (not persistent) of your surface, but it would likely not be very informative, probably it is just a sphere. You could filter by one coordinate as in the tutorial you mention (or by a function like the curvature), I don't know how informative that would be for your data. You could also consider the filtration of the offsets of your surface. We don't directly provide that, but since the triangles are rather small (and you can always subdivide if they are not small enough), computing the offsets of the vertices (with AlphaComplex) should give a similar result with extra points close to the diagonal. And there are certainly a number of other filtrations one could think of. If you were inspired by some paper using persistent homology on brain data, you may want to check in more details what filtration they were using. Extended persistence can apply when you are filtering your surface by a function, not so much for offsets or other filtrations. In some sense it allows you to get the result for a function f and -f at the same time, plus some information about the unfiltered space (not relevant here). |
Hello, thank you for your reply. My current data set not only has vertices and triangles, but also some characteristic files of the cerebral cortex, such as curvature, cortical thickness, and sulcus depth. You mean to use a certain characteristic (choose a threshold) as a filter condition to filter. So how to calculate the betti number next? Are there any relevant steps in your code as a reference? I just came into contact with TDA, so I don't really understand it yet. |
Only if that makes sense for your data. Persistence is about looking at the evolution of the topology (connected components, cycles) of a sequence of objects. One easy way to define a sequence could be using curvature as a parameter, so you start from the regions of low curvature, progressively include regions of higher and higher curvature, until you have the whole surface, and you can see how components and cycles appeared and merged during this growth (you could instead look at minus the curvature, so it starts from high curvature regions, or use extended persistence to get both, or use another one of your characteristics). That may or may not be something of interest to you, it is easy to define meaningless filtrations and harder to come up with some that are relevant to a particular application. You say you want to "use ph to extract topological features and perform a post-processing on the surface segmentation", but that's not very precise. I don't see any segmentation on your image. Sometimes reconstruction algorithms "fail" and reconstruct a surface with strange artifacts (long thin triangles that connect regions that are close but should not be connected) and people talk about topological errors, is that what you are talking about? (the picture doesn't look like it has such errors).
Usually we don't just compute Betti numbers (that would be taking one value of the parameter), we compute the whole persistence diagram (the evolution when the parameter changes), although that certainly also gives you Betti numbers.
Almost all our examples compute persistence somewhere...
https://arxiv.org/abs/1710.04019 can be a nice introduction. |
Ok, than you very much. I want to show you what I have get: My results are not good, I will assign a wrong label to a node. So I wonder if the introduction of PH can alleviate such problems? I have found some articles introduce TopoLoss to improve performance and get better results. |
Hello, sorry to bother you again. Q2: I add filter value manually But you said use extended_persistence, I have use it, but : Q3: I've added filter values to each node. What pair of distances do I need to use to weight the edges? Q4: Afetr I get the extended_persistent_barcode, How to get betti??? My datasets and codes are in:https://github.com/tanjia123456/Brain_area_PH/blob/main/compute_betti_gudhi3.py |
Hello, thank you for your works.
I want to use ph to extract topological features and perform a post-processing on the surface segmentation of the cerebral cortex. But I am currently a little confused as to whether I can apply ph to my subject. I see that the Tuto-GUDHI-extended-persistence.py file processes 3D data. For the brain, I also obtained the 3D trisurf based on the three-dimensional coordinate points (coord) and the triangle connection relationship (triangle). For this structure of the brain, should I use persistence barcode or extended persistence barcode? Or something else lasts? Or do you have any suggestions for me?
The text was updated successfully, but these errors were encountered: