<div><div class="gmail_quote">On Wed, Sep 15, 2010 at 1:23 PM, Haider Syed <span dir="ltr"><<a href="mailto:hsyed88@gmail.com">hsyed88@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I have set up a very basic vtkParametricTorus and can't figure out how to move the "center" of the torus to an x,y,z location of my choice.<br><br>vtkParametricTorus *torus=vtkParametricTorus::New();<br> torus->SetRingRadius(tumor_rad);<br>
torus->SetCrossSectionRadius(0.00028);<br><br> vtkParametricFunctionSource *ptorus=vtkParametricFunctionSource::New();<br> ptorus->SetParametricFunction(torus);<br><br> vtkPolyDataMapper *torusMapper=vtkPolyDataMapper::New();<br>
torusMapper->SetInput(ptorus->GetOutput());<br><br> vtkActor *torusActor=vtkActor::New();<br> torusActor->SetMapper(torusMapper);<br><br>Please help.<br><br>Thanks,<br><font color="#888888">Haider<br><br>
</font></blockquote>You can create a vtkTransform and apply it with vtkTransformFilter. Here is an example of the setup:<div><br></div><div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TransformFilter">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TransformFilter</a><br clear="all">
<br></div><div>Thanks,<br><br></div><div>David </div></div><br></div>