<br>In an autodidactic effort, I&#39;m trying to rotate an image by &#39;hand&#39;, by multiplying the &#39;direction&#39; matrix of an image by a rotation matrix.<br><br>To do that, I&#39;m copying bits out of itkEuler3DTransform.txx<br>

In that file, a RotationX matrix is defined:<br><br>Matrix&lt;TScalarType,3,3&gt; RotationX<br><br>However, when I try doing that, I&#39;m getting the following error:<br><br>error: passing ‘const itk::Matrix&lt;double, 3u, 3u&gt;’ as ‘this’ argument of ‘const itk::Matrix&lt;T, NRows, NColumns&gt;&amp; itk::Matrix&lt;T, NRows, NColumns&gt;::operator=(const itk::Matrix&lt;T, NRows, NColumns&gt;&amp;) [with T = double, unsigned int NRows = 3u, unsigned int NColumns = 3u]’ discards qualifiers<br>

<br>1) What does this mean?<br>2) How do I get my beloved Matrix?<br><br>#include &lt;itkMatrix.h&gt;<br>#include &lt;vnl/vnl_matrix.h&gt;<br><br>  typedef itk::Matrix&lt;double,3,3&gt; Matrix;<br><br>  Matrix RotationX;<br>

 // ImageType::DirectionType RotationX;<br> <br>//  vnl_matrix_fixed&lt;double,3,3&gt; RotationX;<br>  <br>  RotationX[0][0] = 1; RotationX[0][1] =   0; RotationX[0][2] = 0;  <br>  RotationX[1][0] = 0; RotationX[1][1] =  cx; RotationX[1][2] = sx;  <br>

  RotationX[2][0] = 0; RotationX[2][1] = -sx; RotationX[2][2] = cx;<br><br>  direction = direction*RotationX;<br><br>cheers,<br><br>Michael<br><br><br><br>