<font size="2"><font face="verdana,sans-serif">I spent a few hours at least trying to get it right. You can also look through these discussions:<br><a href="http://vtk.1045678.n5.nabble.com/Announcement-New-image-rendering-classes-for-VTK-td4526574.html">http://vtk.1045678.n5.nabble.com/Announcement-New-image-rendering-classes-for-VTK-td4526574.html</a><br>

<a href="http://vtk.1045678.n5.nabble.com/Question-for-relationship-between-ITK-and-VTK-coordination-system-td3350578.html#a3354743" target="_blank">http://vtk.1045678.n5.nabble.com/Question-for-relationship-between-ITK-and-VTK-coordination-system-td3350578.html#a3354743</a><br>


and the older version of the example:</font></font><br><a href="http://vtk.1045678.n5.nabble.com/Convert-ITK-image-to-VTK-volume-keeping-proper-orientation-and-position-td4553107.html" target="_blank">http://vtk.1045678.n5.nabble.com/Convert-ITK-image-to-VTK-volume-keeping-proper-orientation-and-position-td4553107.html</a><br>


<br><div class="gmail_quote">2011/11/15 Jeremy Lecoeur <span dir="ltr">&lt;<a href="mailto:jeremy.lecoeur@vanderbilt.edu" target="_blank">jeremy.lecoeur@vanderbilt.edu</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>

  
    
  
  <div bgcolor="#ffffff" text="#000000">
    I already tried that. Results are different but still not correct...<div><div></div><div><br>
    <br>
    On 15/11/2011 10:20, Dženan Zukić wrote:
    <blockquote type="cite"><font size="2"><font face="verdana,sans-serif">The
          order in which you apply rotation and translation is
          important. Try the opposite of what you are doing right now.<br>
        </font></font><br>
      <div class="gmail_quote">2011/11/15 Jeremy Lecoeur <span dir="ltr">&lt;<a href="mailto:jeremy.lecoeur@vanderbilt.edu" target="_blank">jeremy.lecoeur@vanderbilt.edu</a>&gt;</span><br>
        <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
          <div bgcolor="#ffffff" text="#000000"> So, if I got this
            right, my translation should be the difference (in mm)
            between the 1st voxel of each image and my rotation should
            be based on the three Euler angles. <br>
            When I do that, the orientation looks good but not the the
            translation. Is there a trick related to the fact that the
            two images have different resolutions.<br>
            Small volume is 0.0683 x 0.0683 x 0.5 mm and big volume is
            0.5 x 0.5 x 0.5 mm.<br>
            <br>
            Jeremy
            <div>
              <div><br>
                <br>
                On 11/11/2011 02:39, Dženan Zukić wrote:
                <blockquote type="cite"><font size="2"><font face="verdana,sans-serif">Maybe this example will
                      help:<br>
                      <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/VolumeRendering/itkVtkImageConvert" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/VolumeRendering/itkVtkImageConvert</a><br>
                      <br>
                    </font></font><br>
                  <div class="gmail_quote">On Thu, Nov 10, 2011 at
                    21:28, Jeremy Lecoeur <span dir="ltr">&lt;<a href="mailto:jeremy.lecoeur@vanderbilt.edu" target="_blank">jeremy.lecoeur@vanderbilt.edu</a>&gt;</span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"> <br>
                      <br>
                      Hello,<br>
                      <br>
                      I have two 3D images, one is a sub-volume of the
                      other but is not in the<br>
                      same orientation.<br>
                      For the big image, I know its size and also the
                      coordinates in mm of its<br>
                      first voxel with respect to a frame of reference.<br>
                      For the small image, I know its size, the
                      coordinates in mm of its first<br>
                      voxel with respect to the same frame of reference
                      and also the 3 euler<br>
                      angles (phi, theta, psi) that defines its
                      orientation.<br>
                      With that, how can I compute the transformation
                      matrix that will allow<br>
                      me to see the small image in the big image, at the
                      right place? I know<br>
                      it&#39;s supposed to be fairly simple but I cannot
                      figure it out.<br>
                      <br>
                      Jeremy<br>
                      <br>
                      -- <br>
                      Jeremy Lecoeur, Ph.D.<br>
                      <br>
                      <br>
                      <br>
                      _____________________________________<br>
                      Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
                      <br>
                      Visit other Kitware open-source projects at<br>
                      <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
                      <br>
                      Kitware offers ITK Training Courses, for more
                      information visit:<br>
                      <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
                      <br>
                      Please keep messages on-topic and check the ITK
                      FAQ at:<br>
                      <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
                      <br>
                      Follow this link to subscribe/unsubscribe:<br>
                      <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
                    </blockquote>
                  </div>
                  <br>
                </blockquote>
                <br>
                <br>
              </div>
            </div>
            <font color="#888888">
              <pre cols="72">-- 
Jeremy Lecoeur, Ph.D.
Research Associate
Vanderbilt University
Phone: <a href="tel:%2B1%20615%20343%207798" value="+16153437798" target="_blank">+1 615 343 7798</a>
Fax: <a href="tel:%2B1%20615%20343%205459" value="+16153435459" target="_blank">+1 615 343 5459</a></pre>
            </font></div>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
    <br>
    <pre cols="72">-- 
Jeremy Lecoeur, Ph.D.
Research Associate
Vanderbilt University
Phone: <a href="tel:%2B1%20615%20343%207798" value="+16153437798" target="_blank">+1 615 343 7798</a>
Fax: <a href="tel:%2B1%20615%20343%205459" value="+16153435459" target="_blank">+1 615 343 5459</a></pre>
  </div></div></div>

</blockquote></div><br>