## 1 Introduction  
### MRI and DTI Images  
Boundary extraction and image segmentation are widely used in the field of Medical and Biological Image Analysis, allowing researchers to make significant progresses in approaches that utilize images at all spatial scales, ranging from cellular, molecular or organ imaging. In this work we present an implementation of a method for feature extraction in MRI and DTI datasets [1]. In recent years, the DTI technique has been greatly developed, given that it can be used as a marker for white matter (WM) tracts' integrity through the detection of the spontaneous diffuse on motion of water molecules in the brain. WM water diffusion appears to be greater along fiber directions than in perpendicular ones, therefore, the diffusion process is strongly directional and it can be used to estimate the patterns of WM connectivity in human brain. WM diffusion is a three-dimensional process strongly anisotropic, because axonal membranes and myelin sheaths represent barriers to random water molecular motion. Along fiber directions the translational movement is about three to six times faster than perpendicularly. Consequently, it would be of great help to indicate the overall orientation of fiber bundles. As a result of this decreasing water mobility, the diffusion coefficient is smaller when measured perpendicularly to prevalent fiber directions. Anisotropic diffusion is more adequately characterized by a tensor \(D_{T}\) rather than a single scalar \(D\). The diffusion tensor \(D_{T}\) is a symmetric array of nine elements that describes mobility along orthogonal axes \(D_{xx},D_{yy},D_{zz}\) on right-left, anterior-posterior, inferior-superior directions, respectively, as well as in coupled different space directions \(D_{yy},D_{zz},D_{yz}\), right-anterior, right-inferior, anterior-inferior, so we have the symmetric positive-definite matrix:  
\[D_{T}= \begin{bmatrix}D_{xx}&D_{xy}&D_{xz}\\ D_{yx}&D_{yy}&D_{yz}\\ D_{xx}&D_{zy}&D_{zz}\end{bmatrix} \]  
In this way, the effects of anisotropy could be fully investigated providing a great amount of details about cerebral microstructures. As it is very difficult to display tensor data, for a synthetic representation, we can recur to an ellipsoid centered at each voxel, whose elongated shape describes locally the asymmetrical level of diffusion. The Cartesian equation of the ellipsoid, with the center in the origin of the reference system, is given by:  
\[D_{xx}x^{2}+D_{yy}y^{2}+D_{zz}z^{2}+2D_{xy}\cdot xy+2D_{xz}\cdot x+2D_{yz} \cdot yz=0\]  
In Diffusion Tensor Imaging (DTI), the matrix \(D_{T}\) could be determined at any voxel by means of a best-fitting procedure, using at least six noncollinear magnetic gradient directions in order to evaluate the six independent coefficients of the equation. The ellipsoid is a three-dimensional representation of mean diffusion distances covered in space by molecules at a given time interval. Its major principal axis is oriented in the direction of maximum diffusivity. In the case of isotropic diffusion, the ellipsoid will be a sphere with a radius proportional to the diffusion coefficient \(D\). The diagonalization of the symmetric diffusion tensor \(D_{T}\) yields three eigenvectors \(\left(\vec{v}_{1},\vec{v}_{2},\vec{v}_{3}\right)\) representing major, medium, and minor principal axes, whereas the corresponding eigenvalues \(\left(\lambda_{1},\lambda_{2},\lambda_{3}\right)\) estimate apparent diffusivity along their directions. Geometrically the level of anisotropic diffusion can be expressed by how much ellipsoidal shape differs from that of a sphere (Figure 1). Mathematically it may be evaluated by the degree to which the three tensor eigenvalues differ from one another.