Description
January 6, 2008
The weighed
spherical
harmonic (weighted-SPHARM) representation is a
unified surface data smoothing, surface parametrization and
surface registration technique formulated in a unified
Hilbert space framework. The weighted-SPHARM expresses
surface data as a weighted linear combination of spherical
harmonics. The weighted-SPHARM generalizes the traditional
SPHARM representation as a special case. If
you are using the Matlab codes/sample data below for
your publication, please reference [1], [2] or [4] in
the References. The codes have been tested under Matlab
versions 6.1, 6.5 and 7.5.
Constructing
Weighted-SPHARM representation (MNI mesh format)
September 19,
2006
This implementation is based on the Montreal Neurological Institute (MNI) mesh format. Follow the step by step procedures below. It can construct up to the 85th degree representation and store them into a hard drive. It requires 2.4GB of space and 6 minutes in Pentium 4 computer. Download unitsphere.mat. It contains coordinates and topological information of the mesh of a unit sphere. The weighted-SPHARM representation is built upon this mesh. Download Y_l.m. It computes spherical harmonics Y_lm [1]. This is needed for SPHARMconstruct.m.
Figure 1.
Weighted-SPHARM representation of an outer cortical surface
with different bandwidths. The p-value plot automatically
determine the optimal degree for the representaion in a
forward model selection framework. See [2] for detail.
Constructing
Weighted-SPHARM representation (FreeSurfer mesh format)
June 20, 2008
Using the spherical mesh
lh.sphere, we can establish spherical angles \theta and
\varphi. The domains of \theta and \varphi follows the
convention established in [1, 2], which is different from the
MATLAB convension used in cart2sph.m. Our convension is more
widely used in mathematics literature. We check if we spherical
angles are properly computed:
[theta varphi]=EULERangles(sphere);
figure_trimesh(surf,theta,'rwb');
figure_trimesh(surf,varphi,'rwb');
figure_trimesh
projects the spherical angles \theta and \varphi to the cortical
surface. The spherical
angles are necessary to establish the weighted spherical harmonic
representation on a unit sphere. The weighted
spherical harmonic representation of degree 40 and bandwidth
sigma=0 is given by the code
It
takes about 243, 624 and 1265 seconds for constructing degree 40,
60 and 80 representations respectively (Figure 1-b). For the choice of optimal degree, see
[2].
Figure
1-b. Weighted spherical harmonic representation of
various degree. Degree 40-5o would be sufficient for most
applications.
The spherical harmonic coefficients
can be extracted for each weighted-SPHARM representation
possibly for data reduction and classification purposes. For
each representation, we have Fourier coefficients for x,y
and z coordinates. The above SPHARMsmooth.m generates a structured array called
fourier_coeff. If we are using the 42-th degree
representation for 12 subjects, we have
> fourier_coeff
fourier_coeff
=
x:
[43x85x12 double]
y:
[43x85x12 double]
z:
[43x85x12 double]
The first dimension is the degree between 0
and 42; the second dimesion is the order between -42 and 42;
the last dimension is the subject number. See Figure 2
for the display of the Fourier coefficients for subject 1.
For the l-th
degree, there are total 2l+1
degrees so not all elements in the matrix
contains Fourier coefficients. Figure 2 shows the upper
triangle elements in the matrix is padded with zeros (Note:
MATLAB convention for array indexing is that the downward
direction increases the array index). To make the Fourier coefficients up to degree
k into a single
feature vector, run the following code:
>k=42
>fourier_vector=SPHARMvectorize(fourier_coeff,k)
fourier_vector=
x:
[1849x12 double]
y:
[1849x12 double]
z:
[1849x12 double]
Note that there are total 1 + (2+1) + (2*2 +1
) + ... + (2*42+1) = (42+1)^2 = 1849 Fourier coefficients.
Figure 2.
Fourier coefficients for x-coordinates. The order
(horizontal) is arranged from -42 to 42. The upper triangle
elements in the matrix is padded with zeros.
Figure 3. Plot of
vectorized Fourier coefficients of x-coodinates for 16
autistic subject (red) and 12 control subjects (blue).
Reconstruction
from Spherical harmonic coefficients
January 9, 2008
Using the Fourier coefficients matrix
fourier_coeff, surface coordinates x,y,z can be
reconstructed.
>load unitsphere.mat
>surf=SPHARMrepresent2(sphere,
fourier_coeff,42);
To display the surface,
figure_trimesh(surf,surf_x,'rwb');
Figure 4.
Display of the 42-th degree weighted-SPHARM representation
of a cortical surface.
Surface
registration via SPHARM-correspondence
July 5, 2007
The weighted-SPHARM
can be used to establish surface
correspondence between subjects. The concept is
introduced in [2]. Download two sample outer surfaces: outsurface1.obj
and outsurface2.obj
Figure 5. The trajectory
of deformation from the weighted-SPHARM
of outsurface1.obj
(1st surface) to the
weighted-SPHARM
of outsurface2.obj
(5th surface).
Gibbs Phenomenon
(Ringing Artifacts)
January 23,
2009
The Fourier
series are known to introduce the Gibbs phenomeon
(ringing artifacts) [1] [2]. The Gibbs phoenomeon occurs in
rapidgly changing or discontinous measurments. Since the
spherical harmonics are continuous and smooth basis functions,
it is not possible to represent discontinuity of data using
spherical harmonics.
References
on weighted-SPHARM
January 6, 2008
Last updated April 15, 2013