Questions Regarding Calculating Persistent Diagram via TTK

49 views
Skip to first unread message

Mingzhe Li

unread,
Feb 19, 2021, 12:15:18 AM2/19/21
to ttk-...@googlegroups.com, Bei Wang
Hi TTKers,

I am a graduate student working on topological data analysis. I really appreciate the toolkit you have developed and maintained!

Here I have some questions when trying to compute the persistent diagram of a 2D scalar field with TTK on Paraview. And I hope that you may answer them for me.

First of all, I have read a conversation regarding the persistent diagram (https://groups.google.com/g/ttk-users/c/jrOwf0AnH78/m/57c4Z6QHCQAJ?pli=1), which said that "the connected component created in the global minimum (in principle with infinite persistence) is always considered to be destroyed at the global maximum." What will happen if the entire scalar field is split into two parts, so there are two separate connected components? Will one part be directly ignored when calculating the diagram?

Secondly, also according to the discussion in the link I posted, TTK only calculates H0 and H_{d-1} dimensional homology, which is actually fine. However, how can I distinguish those [birth, death) pairs in the diagram between H0 and H_{d-1}? The visualization of the diagram (in a Render View in Paraview) as well as the spreadsheet did not provide any information about the dimension of each [birth, death) pair.

Thirdly, I am also confused about how can we export each [birth, death) pair into a text file (.csv, .txt etc.). I know that TTK outputs Cell Data and Point Data for the persistent diagram. In the Point Data, I can actually see coordinates of each vertex in the persistent diagram. However, the information of each line in Cell Data is too vague to indicate which pair of vertices it connects. I assume that I have to run the process that generates the persistent line through command lines, and then get all the output from there, instead of from Paraview?

I'm looking forward to your reply. Thank you very much!

Best,
Mingzhe
University of Utah

Julien Tierny

unread,
Feb 19, 2021, 12:42:59 AM2/19/21
to ttk-...@googlegroups.com, Bei Wang, Mingzhe Li
hi mingzhe,

thanks for your email and your interest in ttk.

> I really
> appreciate the toolkit you have developed and maintained!
thanks! that's really rewarding to read :)

> What will happen if the entire scalar field is
> split into two parts, so there are two separate connected components? Will
> one part be directly ignored when calculating the diagram?
the diagram will be computed on a per connected component basis (see the attached screenshot).
so the above discussion is valid for each connected component of your triangulation.

> However, how can I distinguish those [birth, death) pairs in the diagram
> between H0 and H_{d-1}?
the cell data field "PairType" will report 0 for H0 and d-1 for H_{d-1}
the global min / global max pair will be assigned to the -1 pair type (to indicate it is a special case)

> Thirdly, I am also confused about how can we export each [birth, death)
> pair into a text file (.csv, .txt etc.).
> I know that TTK outputs Cell Data
> and Point Data for the persistent diagram.
when you save the persistence diagram in .csv format from paraview, you need to specify (in an upcoming dialog window) what data you want to save (cell data or point data). the same specification needs to happen if you're interacting with ttk from python.

if you save the point data of the diagrams, then the x and y coordinates of the off-diagonal points (in default mode) will correspond to the birth and death.

I hope this is helpful.

thanks for letting us know if you ran into further issues.
and thanks for citing the ttk papers (see https://topology-tool-kit.github.io/downloads.html) if you plan to use ttk in publications.

cheers,
--
Dr Julien Tierny
CNRS Researcher
Sorbonne Universite
http://lip6.fr/Julien.Tierny
Screenshot_20210219_063331.png
Reply all
Reply to author
Forward
0 new messages