title: How to convert a vtkDoubleArray to an Eigen::matrix
body: <p>I've found the Eigen::Map class for converting a raw array to an Eigen class (and some useful snippets here <a href="https://stackoverflow.com/a/12007784/1136458">https://stackoverflow.com/a/12007784/1136458</a> )</p>
  
  <p>Is there any Eigen or vtk class to convert a vtk array to an Eigen class (and back)?
  What I am trying right now is: </p>
  
  <ul>
  <li>convert vtkDoubleArray to std::vector of std::vector (as in  <a href="https://stackoverflow.com/questions/24650468/how-to-get-the-the-values-of-a-vtkdoublearray-in-a-stdvector">How to get the the values of a vtkDoubleArray in a std::vector</a> )</li>
  <li><p>using map to have a matrixxd </p>
  
  <pre><code>Eigen::MatrixXd eig_arr; 
  eig_arr = Eigen::Map&lt;Eigen::MatrixXd&gt; (cpp_matrix.data(), n_rows, n_components)
  </code></pre></li>
  </ul>
  
  <p>But I get the following error:</p>
  
  <p>error C2665: 'Eigen::Map::Map' : none of the 4 overloads could convert all the argument types </p>
  
  <p>I don't necessarily need the intermediate cpp_matrix, if there is a direct method that would be fine as well</p>