<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Apr 30, 2015 at 5:20 AM, Jason <span dir="ltr"><<a href="mailto:2130220212@email.szu.edu.cn" target="_blank">2130220212@email.szu.edu.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have read David Gobbi's tips in<br>
<a href="http://vtk.1045678.n5.nabble.com/vtkImageReslice-class-td1233015.html#a1233022" target="_blank">http://vtk.1045678.n5.nabble.com/vtkImageReslice-class-td1233015.html#a1233022</a><br>
<br>
it use x = T*M*x' where "T" is ResliceTransform and "M" is ResliceMatrix<br>
to calculate the position in 3D volume(x) by the point position in 2D<br>
slice(x')<br>
<br>
but I'm still wondering that the slice we need cut through and how to use<br>
the ResliceTransform(vtkAbstractTransform) to calculate the point position<br>
in 3D coordinate.<br>
<br>
Does just make the x'=(x0,y0,0,1) , M=ResliceAxes ? what about T ? I cannot<br>
get its matirx.<br>
</blockquote></div><br></div><div class="gmail_extra">Yes, M is ResliceAxes. And T is identity unless you call SetResliceTransform.</div><div class="gmail_extra"><br></div><div class="gmail_extra">The slice is defined with SetOutputOrigin(x0,y0,z0), SetOutputSpacing(dx,dy,dz),</div><div class="gmail_extra">and SetOutputExtent(0,xn-1,0,yn-1,0,0) where:</div><div class="gmail_extra"><br></div><div class="gmail_extra">(x0,y0,z0) is the corner of the slice (in x' coords, not x coords, usually z0=0)</div><div class="gmail_extra">dx, dy, dz is the voxel spacing (in x' coords, usually dz=dy=dx)</div><div class="gmail_extra">xn * yn are the dimensions of the slice (number of columns and rows)</div><div class="gmail_extra"><br></div><div class="gmail_extra">So imagine a for loop over the rows and columns of the slice:</div><div class="gmail_extra"><br></div><div class="gmail_extra">for i = 0 to xn-1</div><div class="gmail_extra"> for j = 0 to yn-1</div><div class="gmail_extra"> x' = (x0 + i*dx, y0 + j*dy, z0, 1)</div><div class="gmail_extra"> x = T*M*x'</div><div class="gmail_extra"><br></div><div class="gmail_extra">The x values generated by this loop are the sample points for the slice.</div><div class="gmail_extra"><br></div><div class="gmail_extra"> - David</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div>