63 inline DiffusionTensor3D<TOutput> operator()
64 (
const DiffusionTensor3D<TInput> & A )
66 DiffusionTensor3D<TOutput> tensor;
67 Matrix<double, 3, 3> mat;
68 Matrix<double, 3, 3> matcorrect;
71 DiffusionTensor3DExtended<double> tensorDouble( A );
72 tensorDouble.ComputeEigenAnalysis( eigenValues, eigenVectors );
73 for(
int i = 0; i < 3; i++ )
75 mat[i][i] = ( eigenValues[i] < 0 ? -eigenValues[i] : eigenValues[i] );
77 eigenVectors = eigenVectors.GetTranspose();
78 matcorrect = eigenVectors * mat * eigenVectors.GetInverse();
79 tensorDouble.SetTensorFromMatrix( matcorrect );
80 for(
int i = 0; i < 6; i++ )
82 tensor[i] = ( TOutput ) tensorDouble[i];