<!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 by a
positive X and then "reslice" it using it's own information as output
information. 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> </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> </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
==> the image shifts right ???</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=170031614-14112002>positive Y translate
==> the image shifts down ???</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=170031614-14112002>positive Z translate
==> 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> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=170031614-14112002>translate to origin
-> positive Z Rotation -> translate back ==> 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> </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> </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->PostMultiply();</FONT></DIV>
<DIV><FONT face=Arial size=2>AxisTransform->Translate( 100.0, 0.0, 0.0
);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>vtkImageReslice *reslice =
vtkImageReslice::New();</FONT></DIV>
<DIV><FONT size=2><FONT face=Arial>reslice->SetInterpolationModeToLinear();
</FONT><FONT color=#008000><FONT face=Arial>// For
Linear</FONT></DIV></FONT></FONT>
<DIV><FONT face=Arial
size=2>reslice->SetInput(reader->GetOutput());</FONT></DIV>
<DIV><FONT size=2><FONT
face=Arial>reslice->SetResliceTransform(AxisTransform); </FONT><FONT
color=#008000><FONT face=Arial>// Applying transformation to
volume</FONT></DIV></FONT></FONT>
<DIV><FONT face=Arial size=2>reslice->SetOutputSpacing(
reader->GetDataSpacing() );</FONT></DIV>
<DIV><FONT face=Arial size=2>reslice->SetOutputOrigin(
reader->GetDataOrigin() );</FONT></DIV>
<DIV><FONT face=Arial size=2>reslice->SetOutputExtent(
reader->GetDataExtent() );</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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->PrintSelf( std::cout, indent
);</FONT></DIV>
<DIV><FONT face=Arial size=2>reslice->PrintSelf( std::cout, indent
);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </DIV></BODY></HTML>