<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=170031614-14112002>I am trying to take 
one MR volume that is an axial series and reslice it to correspond to an oblique 
series but I cannot get the volumes to line up correctly. I have stepped back to 
the basics and still cannot figure out the results from reslicer. In the snippet 
of code below all I am trying to do is translate the volume&nbsp;by a 
positive&nbsp;X and then "reslice" it using it's own information as output 
information.&nbsp;Everything seems to work but the image is shifted to the left, 
(I was expecting it to be shifted to the right). When I look at the 
transformation matrix everything looks right:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=170031614-14112002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=170031614-14112002>1 0 0 
100</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=170031614-14112002>0 1 0 
0</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=170031614-14112002>0 0 1 
0</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=170031614-14112002>0 0 0 
1</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=170031614-14112002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=170031614-14112002>Here are the results 
of other simple transformations:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=170031614-14112002>positive X translate 
==&gt; the image shifts right ???</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=170031614-14112002>positive Y translate 
==&gt; the image shifts down ???</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=170031614-14112002>positive Z translate 
==&gt; the volume shifts towards the viewer. (acts like a right handed 
coordinate system).</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=170031614-14112002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=170031614-14112002>translate to origin 
-&gt; positive Z Rotation -&gt; translate back&nbsp;==&gt; the image rotates 
clockwise (does not act like a right handed coordinate 
system).</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=170031614-14112002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=170031614-14112002>Could someone please 
tell me if these actions are correct, and if so why?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#008000><FONT face=Arial size=2>// VTK Class to set 
transformation matrix </FONT></DIV></FONT>
<DIV><FONT face=Arial size=2>vtkTransform *AxisTransform = 
vtkTransform::New();</FONT></DIV>
<DIV><FONT face=Arial size=2>AxisTransform-&gt;PostMultiply();</FONT></DIV>
<DIV><FONT face=Arial size=2>AxisTransform-&gt;Translate( 100.0, 0.0, 0.0 
);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkImageReslice *reslice = 
vtkImageReslice::New();</FONT></DIV>
<DIV><FONT size=2><FONT face=Arial>reslice-&gt;SetInterpolationModeToLinear(); 
</FONT><FONT color=#008000><FONT face=Arial>// For 
Linear</FONT></DIV></FONT></FONT>
<DIV><FONT face=Arial 
size=2>reslice-&gt;SetInput(reader-&gt;GetOutput());</FONT></DIV>
<DIV><FONT size=2><FONT 
face=Arial>reslice-&gt;SetResliceTransform(AxisTransform); </FONT><FONT 
color=#008000><FONT face=Arial>// Applying transformation to 
volume</FONT></DIV></FONT></FONT>
<DIV><FONT face=Arial size=2>reslice-&gt;SetOutputSpacing( 
reader-&gt;GetDataSpacing() );</FONT></DIV>
<DIV><FONT face=Arial size=2>reslice-&gt;SetOutputOrigin( 
reader-&gt;GetDataOrigin() );</FONT></DIV>
<DIV><FONT face=Arial size=2>reslice-&gt;SetOutputExtent( 
reader-&gt;GetDataExtent() );</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=170031614-14112002><FONT face=Arial size=2>// Print out the 
matrixes</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2>vtkIndent indent;</FONT></DIV>
<DIV><FONT face=Arial size=2>AxisTransform-&gt;PrintSelf( std::cout, indent 
);</FONT></DIV>
<DIV><FONT face=Arial size=2>reslice-&gt;PrintSelf( std::cout, indent 
);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>**************************</FONT></DIV>
<DIV><FONT face=Arial size=2>Scott O. Stiving M.S.</FONT></DIV>
<DIV><FONT face=Arial size=2>Mayo Clinic</FONT></DIV>
<DIV><FONT face=Arial size=2>MR Programming Support</FONT></DIV>
<DIV><FONT face=Arial size=2>Mayo Image Studio Team</FONT></DIV>
<DIV><FONT face=Arial size=2>(507) 266-0808</FONT></DIV>
<DIV><FONT face=Arial size=2><A 
href="mailto:Stiving@Mayo.edu">Stiving@Mayo.edu</A></FONT></DIV>
<DIV><FONT face=Arial size=2>***************************</FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>