Description
July 14, 2010
We will
show how to construct persistence diagrms [1] and
min-max diagrams
[2] [3] for 1D (simulated functional signal) and 2D data (cortical
thickness). The persistence and min-max diagrams are motivated by
topological data analysis where the underlying topology of data and
images is quantied.
The
codes
have been tested
under a Macbook pro with 4GB
memory and MATLAB 7.5. If
you are using the Matlab codes below for your publication,
please reference [1] or [2]. The detailed description of cortical
thickness data is given in [6].
Persistence & Min-Max diagrams for 1D functions
July 14, 2010
The construction for the persistence diagrm for 1D function is based on the iterative pairing and deleation algorithm [2]. Note that the min-max diagram [2] and the persistence diagram [1] are identical for 1D functions since there is no saddle points in 1D functions. Let us explain 1D example given in the MICCAI 2009 paper [2]. In the interval [0, 1], we construct a signal s and add noise e to obtain simulated signal Y.
x=[0:0.002:1]';
s= x + 7*(x -
0.5).^2 + cos(8*pi*x)/2;
e=normrnd(0,0.2,length(x),1);
Y=s+e;
This produces 3 pairs:
>>
pairs
pairs =
1.3126 1.6816
0.5948 1.1636
0.2130 0.8886
The
result
will
be
slightly
different each time you run the code since the
added noise is always changing. The pairing rule is explained in Figure
1.
Figure 1.
The
births and deaths of components in sublevel sets. We have critical
values a,b,c,d,e,f, where a < b < d <f are minimums and c<
e are maximums. At y=a, we have a single component marked by a single
gray area. When we increase the level to y=b, we have the birth of a
new component in addition to the existing component born at a. At the
maximum y=c, the two components merge together to form a single
component. Following the pairing rule given in Edelsbrunner (2008), we
pair (c,b) and (e,d). Other critical values are paired similarly. See
[1] or [2].
Cortical thickness data
July 17, 2010
We will
use the cortical surface data set used in [2]. There are total 16
autistic and 11 control subjects. Cortical thickness is computed as the
L2 distance between the two surfaces. autism_coord
is the gray matter surface for autistic subjects and autism_coordw
is the white matter surface for control subjects.
load AUTISM.coordinates.mat
thick_au=squeeze(sqrt(sum((autism_coord-autism_coordw).^2,2)));
thick_co=squeeze(sqrt(sum((control_coord-control_coordw).^2,2)));
We will display cortical thickness of the 1st autistic subject on a
unit sphere.
load unitsphere.mat
figure_trimesh(sphere,thick_au(1,:),
'rwb')
Since the cortical thickness data is fairly noisy, we will smooth using
the weighted-sphearicl
harmonic
representation with degree 42 and bandwidth 0.001 [4]
[5]. The detailed explanation of SPHARMsmooth is given here.
The smoothed cortical thickness is given in Figure 2.
directory='/basis/';
SPHARMconstruct(directory,42);
L=42;
sigma=0.001;
coord_co=zeros(11,3,40962);
coord_co(:,1,:)=thick_co;
[coord_sm_co,fourier_coeff_co]=
SPHARMsmooth(coord_co,L,sigma);
coord_au=zeros(16,3,40962);
coord_au(:,1,:)=thick_au;
[coord_sm_au,fourier_coeff_au]=
SPHARMsmooth(coord_au,L,sigma);
Figure 2.
Weighted spherical harmonic representation of cortical thickness.
Critical values are identified as crosses.
Min-max diagram of a function on a sphere
April 28, 2010
The
min-max diagram is constructed by pairing minimums and maximums in a
particular fashion [2]. To simplify the problem, we identify how
critical values are connected using the Delaunay triangulation.
Figure 3.
Delaunay triangulation of few minimums and maximums.
Let us map
cortical thickness given in Figure 2 onto a plane for better
visualization. fourier_coeff_au.x(:,:,1)is the spherical harmonic
coefficients of the 1st autistic subject.
square=SPHARM2square(fourier_coeff_au.x(:,:,1),42,0.001);
[lmax,
lmin]
= figure_extrema(square);
References
April
22,
2010;
October 8, 2010