<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16609" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><FONT size=2>
<P>Hi </P>
<P>I am developing a MPR application and am having some difficulty</P>
<P>getting vtkImageReslice configured properly. I have a set of</P>
<P>"layout lines" interactively defined on a slice through the original </P>
<P>image data set. The user can set the number of slices, spacing (output slice
</P>
<P>thickness ) and length of the lines (in-plane FOV of the slices) as well</P>
<P>as the in-plane pixel dimensions (see attached jpeg). When I set</P>
<P>the vtkImageReslice, I use the following settings:</P>
<P>// r, s and t define the the output axes unit vectors</P>
<P>this->Reslice->SetResliceAxesDirectionCosines(</P>
<P>r[0],r[1],r[2],s[0],s[1],s[2],t[0],t[1],t[2]);</P>
<P>// turn off transformation of the input spacing origin and extent</P>
<P>// so we can use our own</P>
<P>this->Reslice->TransformInputSamplingOff();</P>
<P>// p0 corresponds to the origin of the output axes unit vectors</P>
<P>// and would correspond to one of the corners of the preview</P>
<P>// plane shown in the figure when that plane was on the first</P>
<P>// of the layout lines</P>
<P>this->Reslice->SetResliceAxesOrigin(p0[0], p0[1], p0[2]);</P>
<P>// neither of the following choices work!</P>
<P>// this->Reslice->SetOutputOrigin( p0[0], p0[1], p0[2] );</P>
<P>this->Reslice->SetOutputOrigin( 0.5*r_sp, 0.5*s_sp, 0.5*t_sp );</P>
<P>// r_sp, s_sp and t_sp are user specified spacings</P>
<P>this->Reslice->SetOutputSpacing( r_sp, s_sp, t_sp );</P>
<P>// w_ext is calculated from the specified spacings, the length of</P>
<P>// the layout lines, the distance they span, and the necessary height</P>
<P>// of the output slices so that none of the input data is truncated.</P>
<P>// w_ext[0], w_ext[2], w_ext[4] are all 0. </P>
<P>this->Reslice->SetOutputExtent(w_ext);</P>
<P>When I update the reslice, the output slices do not appear positioned</P>
<P>with respect to the requested origin. Is there some transform I have to </P>
<P>apply to get the correct origin? Would I have to transform the extent?</P>
<P>Dean </P></FONT></FONT></DIV></BODY></HTML>