[vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice
David Gobbi
david.gobbi at gmail.com
Thu Dec 18 08:43:01 EST 2014
Hi Vincent,
The radialSize is the number of angular segments. If you think of your
cylinder as a pie, it is the number of pie slices. The radialSize controls
the angular resolution.
The OutputOrigin of reslice is in cylindrical coords, so changing it will
not change the center, because the center is in rectangular coordinates,
not cylindrical coordinates. Here's the best way to think about this:
everything in the pipeline before vtkImageReslice is in rectangular
coords, and everything after vtkImageReslice (including its own output)
is in cylindrical coords.
If you recall, the centering is done by the vtkImageChangeInformation
just after the reader. Currently it uses CenterImageOn() to automatically
center the image. But you can instead call SetOutputOrigin() on
vtkImageChangeInformation to set the center to anywhere that you want.
(Note that SetOutputOrigin() does not directly set the center, in fact what
it does is set the position of the corner of the image, which of course also
controls the position of the center).
A more sophisticated way of setting the center would be to create a 4x4
matrix for reslice->SetResliceAxes(). This matrix could be used to
control the center and the orientation of the cylinder. I'd only recommend
this if you are very familiar with 4x4 matrix transformations, however.
- David
On Thu, Dec 18, 2014 at 2:36 AM, Vincent32160 <vsh at magellium.fr> wrote:
>
> Thanks for this, very helpful.
> I have two questions: what is the difference between radialSize and r?
> Should I change the OutputOrigin of reslice to unroll a cylinder which has
> a
> center different from (0,0,0)?
> Thanks again
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141218/bfc38e35/attachment-0001.html>
More information about the vtkusers
mailing list