[vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice
david.gobbi at gmail.com
Thu Dec 18 10:46:47 EST 2014
On Thu, Dec 18, 2014 at 8:40 AM, David Gobbi <david.gobbi at gmail.com> wrote:
> On Thu, Dec 18, 2014 at 8:17 AM, Vincent32160 <vsh at magellium.fr> wrote:
>> As I need to modify the angle from which the unrolling is starting I would
>> use the sophisticated solution you advise.
>> If I understand correctly the starting reslice axes are a 4x4 matrix
>> If I need to apply an angle, I could use only the 3x3 matrix
>> Can you tell me if I am right?
> Yes, the 3x3 matrix controls the orientation of the cylinder, and
> the final column is where you want the center to be.
> However: the bottom row should always be (0,0,0,1). And I'm
> not sure why you put in the "-1"s. Is there a reason why you want
> to rotate by 180 degrees?
I can add a little bit more information about how to set the 3x3 matrix.
The third column of the 3x3 matrix must be a unit vector that points
along the axis of the cylinder. The first and second columns must
be perpendicular to the third axis, and must be perpendicular to each
other (if they aren't, then the matrix isn't a rotation matrix).
The method vtkMath::Perpendiculars() can be used to compute the
three columns for the 3x3 matrix, if you know the axis of the cylinder.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers