<div id="mb_0">Hello,<br><br>Can someone assist please on how to convert const vnl_matrix<T> to itk::Matrix<T, NRows, NColumns>? <br><br>I
suppose itk::Matrix is a wrapper around vnl_matrix and thus there
should not be any problem but I am finding an error message "can not
convert from const vnl_matrix<T> to itk::Matrix<T, NRows,
NColumns>"
<br><br>Detail:<br><br>//I have a<br>DiffusionTensor3D<float> T;<br><br>//Compute its eigenvectors<br>itk::DiffusionTensor3D<float>::EigenVectorsMatrixType V;<br>itk::DiffusionTensor3D<float>::EigenValuesArrayType e;
<br>
V.ComputeEigenAnalysis(e, V);<br><br>//Compute the transpose of the eigenvector and assign it to itk::DiffusionTensor3D<float>::EigenVectorsMatrixType<br>itk::DiffusionTensor3D<float>::EigenVectorsMatrixType Vt =
V.GetTranspose();<br><br>ERROR: "can not convert from vnl_matrix_fixed<T, num_rows, num_cols> to itk::Matrix<T, NRows, NColumns>"<br><br>I tried,<br>itk::DiffusionTensor3D<float>::EigenVectorsMatrixType Vt =
V.GetTranspose().as_matrix();<br><br>Still ERROR: "can not convert from vnl_matrix<T> to itk::Matrix<T, NRows, NColumns>"<br><br>Any suggestion will be appreciated.<br><br>P.S.:-
I hope one will not say why not declaring Vt as vnl_matrix or
vnl_matrix_fixed. Of course that is the simplest solution but I need to
declare it as itk::Matrix as subsequent steps will need operations of
Vt and V like multiplication will bring the same error.
<br>
</div>