The instruction of our program which was written based on Matlab

advertisement
The instruction of our program which was written based on Matlab
1
Processing of CT data
All cranial bases were taken with multi-detector row CT (Sensation
16, Siemens Medical Systems) in helical mode. Acquired DICOM images
were reconstructed with 0.75-mm-thick sections at 0.5-mm increment.
Each pixel has its own address. The address of each pixel corresponds to
its own three-dimensional coordinates (x, y, z). These coordinates can be
read by some sofewares (such as Mimics). The X-axis runs left to right,
the Y-axis runs anterior to posterior, and the Z-axis runs superior to
inferior.
2
Instruction of the related algorithms of spatial analytical geometry
Below formulae are based on spatial analytical geometry
2.1 Spatial linear equation
Write the linear equation of a line from two spatial points
M1(x1,y1,z1) and M2(x2,y2,z2) and calculate the distance between them.
The linear equation is
 x  x1  tl

 y  y1  tm
 z  z  tn
1

t is the parameter, l,m and n are vectors of the line M 1M 2 . l =x2-x1;
m=y2-y1; n=z2-z1. Therefore,
x=x1 + (x2-x1) t
y=y1 + (y2-y1) t
z=z1 + (z2-z1) t
Eliminate the parameter t,
x  x1 y  y1 z  z1


l
m
n
or
x  x1
y  y1
z  z1


x2  x1 y 2  y
z 2  z1
1
This equation set is the standard form equation of a line.
The distance (d) between two points, M1 and M2 is
d= ( x2  x1 ) 2  ( y 2  y1 ) 2  ( z 2  z1 ) 2
The coordinates of the midpoint M0(x0,y0,z0) of a line segment
joining two points M1 and M2 is
x0=(x1+x2)/2
y0=(y1+y2)/2
z0=(z1+z2)/2
2.2 Spatial plane equation
Three spatial points which do not lie on the same line can determine a
plane.
The general equation for the spatial plane  is Ax + By + Cz + D = 0
If three points M1 (x1,y1,z1), M2(x2,y2,z2) and M3(x3,y3,z3) are not
lying on the same line, the equation for the plane passing through these
three points is
x  x1
y  y1
z  z1
x2  x1 y 2  y1 z 2  z1 =0
x3  x1 y3  y1 z3  z1
Solve this determinant,
A= y1·z2-y2·z1-y1·z3+y3·z1+y2·z3-y3·z2
B= - x1·z2+x2·z1+x1·z3-x3·z1-x2·z3+x3·z2
C= x1·y2-x2·y1-x1·y3+x3·y1+x2·y3-x3·y2
D= x1·y3·z2-x1·y2·z3+x2·y1·z3-x2·y3·z1-x3·y1·z2+x3·y2·z1
2.3 the angle between two planes
If equations for planes 1 and  2 are A1 x  B1 y  C1 z  D1  0 ,
A2 x  B2 y  C2 z  D2  0 ,respectively.
The angle between the two planes is equal to the acute angle φ
determined by the normal vectors of the planes.
cos  
A1 A2  B1 B2  C1C2
A12  B12  C12  A22  B22  C22
Download