<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Dec 18, 2014 at 8:40 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Thu, Dec 18, 2014 at 8:17 AM, Vincent32160 <span dir="ltr"><<a href="mailto:vsh@magellium.fr" target="_blank">vsh@magellium.fr</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As I need to modify the angle from which the unrolling is starting I would<br>
use the sophisticated solution you advise.<br>
If I understand correctly the starting reslice axes are a 4x4 matrix<br>
(-1,0,0,center[0],0,-1,0,center[1],0,0,1,center[2],0,0,0,0).<br>
If I need to apply an angle, I could use only the 3x3 matrix<br>
(-1,0,0,0,-1,0,0,0,1).<br>
Can you tell me if I am right?<br>
Thanks</blockquote><div><br></div></span><div>Yes, the 3x3 matrix controls the orientation of the cylinder, and</div><div>the final column is where you want the center to be.</div><div><br></div><div>However: the bottom row should always be (0,0,0,1).  And I'm</div><div>not sure why you put in the "-1"s.  Is there a reason why you want</div><div>to rotate by 180 degrees?</div></div></div></div></blockquote><div><br></div><div><br></div><div>I can add a little bit more information about how to set the 3x3 matrix.</div><div>The third column of the 3x3 matrix must be a unit vector that points</div><div>along the axis of the cylinder.  The first and second columns must</div><div>be perpendicular to the third axis, and must be perpendicular to each</div><div>other (if they aren't, then the matrix isn't a rotation matrix).</div><div><br></div><div>The method vtkMath::Perpendiculars() can be used to compute the</div><div>three columns for the 3x3 matrix, if you know the axis of the cylinder.</div><div><br></div><div> - David</div><div> </div></div></div></div>