Document

advertisement
Data Visualization
Fall 2015
Tensor Data Visualization
• 0th order tensors – scalars (magnitude)
• 1st order tensors – vectors (magnitude + direction)
• 2nd order tensors – quantities that have magnitude and two
directions, represents variation of magnitude
• Tensors (math.) are independent of the coordinate systems
• Components are tensor representation in a coordinate system
• Tensor field T: R3xR3 → R
Fall 2015
(vector field v: R3 → R3)
Data Visualization
2
Tensor Data Visualization
• A tensor with rank (order) r in a n-dimensional space has r indices and
nr components
• r … number of simultaneous directions
• Scalars (r = 0) … n0 component with no index (value)
• Vectors (r = 1) … n1 components with only one index (vector[i])
• Matrices (r = 2) … n2 components with two indices (matrix[i][j])
• Tensors (r ≥ 3)
Fall 2015
Data Visualization
3
Tensor Data Visualization
• Cauchy stress tensor – 2nd order tensor
• Completely define the state of stress at a point inside a material
Fall 2015
Data Visualization
4
Tensor Data Visualization
• Tensor fields are common quantity in engineering and physical
sciences:
• Stress, strain, diffusion, velocity gradients, etc.
• Mostly second-order tensors – interpreted as a linear transformation
between vectors (represented in 3D by 3x3 matrices):
• Stress to strain, force to deformation
• Special case – symmetric second-order tensors:
• Can be viewed as anisotropic ellipsoids (eigenvectors and
eigenvalues are principal axes of the diffusion ellipsoids)
Fall 2015
Data Visualization
5
Tensor Data Visualization
• Tensor attributes are high-dimensional generalization of vectors and
matrices
• In other words, tensor data encode some spatial property that varies
as a function of position and direction
• Example: curvature as a tensor
• For every point x0 on planar curve consider local coordinate
system (x, y) such that:
• x – tangent to the curve
• y – normal to the curve
Fall 2015
Data Visualization
6
Tensor Data Visualization
• Example: curvature as a tensor
• For every point x0 on planar curve consider local coordinate
system (x, y) such that:
• x – tangent to the curve
• y – normal to the curve
• In this system, curve can be described as y = f(x) in the
neighborhood of x0, where f(x0) = 0
Fall 2015
Data Visualization
7
Tensor Data Visualization
• Example: curvature as a tensor
• Curve is described as y = f(x) in the neighborhood of x0,
where f(x0) = 0
2 f
• Curvature in 1D: C ( x)  2 ( x)
x
• C(x) = 1 / radius of circle tangent to f at x
• How quickly normal n changes around x
Fall 2015
Data Visualization
8
Tensor Data Visualization
• Example: curvature as a tensor
• What if we deal with surfaces?
• Analogy with 1D case but…
• In which direction to look for changes?
2 f
• We have to compute C (x, s)  2 (x)
s
Fall 2015
Data Visualization
9
Tensor Data Visualization
• Example: curvature as a tensor
2 f
• We have to compute C (x, s)  2 (x)  sT Hs
s
where H is Hessian matrix as follows
 2 f
 2
x
H 2
 f

 yx
Fall 2015
2 f 

xy 
2 f 
2 
y 
Data Visualization
The problem is that we need
to construct local coordinate
systems at every point on
surface and it is not obvious
how to do that
10
Tensor Data Visualization
• Example: curvature as a tensor
• Let the surface be describe as an implicit function (i.e. the zerolevel isosurface of a function)
2 f
• We have to compute C (x, s)  2 (x)  sT Hs
 2 f
 2
 x
 2 f
H
 2yx
 f
 zx

Fall 2015
s
2 f
xy
2 f
y 2
2 f
zy
Data Visualization
2 f 

xz 
2 f 

yz 
2 f 
z 2 
A curvature tensor is fully
described by 3x3 matrix of
2nd order derivatives
11
Tensor Data Visualization
• Example: diffusion tensor
• Consider an anisotropic material
• We have to compute diffusivity at a point x in a direction s
2 f
D(x, s)  2 (x)
s
f … speed of water motion in tissue
• Application: Diffusion of water in the human brain tissue
• Strong along neural fibers
• Weak across fibers
Fall 2015
Data Visualization
12
Tensor Data Visualization
• Example: diffusion tensor
• Compute Hessian in R3
• Select some slice of interest
• Visualize all components of H using
color mapping
• We get 9 images, some are same
due to the symmetry
• But we do not really care about
diffusion along x, y, z axes
Fall 2015
Data Visualization
13
Tensor Data Visualization
• Principal component analysis
α … angle of s with local coordinate axis x0
2 f
C (x, s)  2 (x)  sT Hs  h11 cos 2   (h12  h21 ) sin  cos   h22 cos 2 
s
C
( x, s )  0

We are looking for extremal curvature
• This is equivalent to a system of equations in matrix form
Hs  s
Fall 2015
( H  I )s  0
Data Visualization
14
Tensor Data Visualization
• Principal component analysis

1
1  2  3 
3
• White = strong mean diff.
• Black = weak mean diff.
Fall 2015
Data Visualization
15
Tensor Data Visualization
Fall 2015
Data Visualization
16
Tensor Data Visualization
Fall 2015
Data Visualization
17
Tensor Data Visualization
• Tensor visualization:
• Component visualization
• Anisotropy visualization
• Major eigenvector visualization
• Fiber tracking
• Basic fiber tracking
• Stream tubes
• Hyperstreamlines
Fall 2015
Data Visualization
18
Download