Hi guys,<br><br>I&#39;m planing to use vtkImageReslice to get a slice from an 3D vtkImageData in two different ways:<br><br>- the first one based on rotation matrices<br>i just used the rotation angles as the directions cosines and it works as expected.  In this implementation i&#39;m using<br>
<br>SetResliceAxesDirectionCosines(...); //rotation matrix<br>
SetResliceAxesOrigin(...); // rotation point<br><br>
- the second one is based on the normal to a plane<br>
a have two points (in world coordinates) and i want to get the a plane that is orthogonal to that vector. I&#39;ve made some calculations and I got the plane, the normal and two other points inside that plane. As far a i know, i must use the same methods to get the slice<br>
<br>slicer-&gt;SetResliceAxesDirectionCosines(...);<br>slicer-&gt;SetResliceAxesOrigin(...);<br><br>plus the following:<br><br>slicer-&gt;SetOutputDimensionality(2);<br>slicer-&gt;SetOutputSpacing(...);<br>slicer-&gt;SetOutputExtent(...);<br>
<br>The result slice seems to have the correct pixels, however the data is skewed 45 degrees!! <a href="http://tinypic.com/r/qpj6kz/5">http://tinypic.com/r/qpj6kz/5</a>.<br><br>So my questions are:<br>- what are the actual parameters of &#39;SetResliceAxesDirectionCosines&#39;?<br>
<br>- this post: <a href="http://www.vtk.org/pipermail/vtkusers/2004-May/074177.html">http://www.vtk.org/pipermail/vtkusers/2004-May/074177.html</a>, depicts that the best example to look at is &#39;vtkImagePlaneWidget&#39;, however after making those changes i&#39;m getting a completely black image. So i think the problem must be the parameters to SetResliceAxesDirectionCosines that I&#39;m invoquing in this way:<br>
<br>SetResliceAxesDirectionCosines (<br>      v1[0], v1[1], v1[2], //based on the first point in the plane<br>      v2[0], v2[1], v2[2], //based on the second point in the plane<br>      normal[0], normal[1], normal[2]<br>
);<br><a href="http://www.vtk.org/pipermail/vtkusers/2004-May/074177.html" target="_blank"></a><a href="http://web.archiveorange.com/archive/v/50zHjsWfslvTDBylAOk7" target="_blank"></a><br>Apart from normalization, what else must be done to the vectors that represent the plane? do they must the something in particular, like the corners? or can be just anywhere in the plane?<br>
<br>I&#39;am also aware that for images with different scales a workaround could be using a ImageChangeInformation as a wrapper:<br><br>vtkSmartPointer&lt;itkImageChangeInformation&gt; change = vtkImageChangeInformation::New();<br>
change-&gt;SetInput(reader-&gt;GetOutput());<br><div class="gmail_extra">change-&gt;SetOutputSpacing(1,1,1);<br>change-&gt;Update();<br><br>but i still get the same results. Thanks for your help.<br></div><div class="gmail_extra">

<br>Best regards,<br><br>Fabian</div><br>