<div dir="ltr">Hi Shark,<div><br></div><div>I think the most efficient option would be a vtkTexture on a vtkPolyData.  You can use vtkPlaneSource to make a polydata that has as many points as your image has pixels.  If necessary, you can use vtkTransformTextureCoords to tweak the texture coords.</div><div><br></div><div>Then you can use e.g. vtkGridTransform or vtkBSplineTransform with vtkTransformPolyDataFilter to warp the plane, or perhaps vtkWarpVector.</div><div><br></div><div>Regards,</div><div> - David</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 21, 2017 at 6:26 AM, Shark <span dir="ltr"><<a href="mailto:m.nunes@fratoria.com" target="_blank">m.nunes@fratoria.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
I have been trying for some days to "mold" a 3D image slice. (imagine a<br>
towel in the wind)<br>
<br>
What I mean is that I have a 2D slice, extracted from a 3D vtkImageData, and<br>
one 3D vector for each pixel of the slice. I want to<br>
translate/transform/move each pixel from the 2D slice to a 3D position (and<br>
augmenting the extent of the 2D slice in x,y,z when necessary) while keeping<br>
these pixel stitched together. I believe my knowledge of all VTK filters is<br>
not that great, so I think something is already implemented for this, but I<br>
cannot find it.<br>
<br>
Currently, my line of thinking is: create an unstructured grid, apply the<br>
vectors transformation, create a new vtkImageData from this transformation<br>
and map the pixel values through ids (cell IDs? point IDs? ).<br>
<br>
In the end I would see a slice stretched, compressed and bent up, down and<br>
to the sides.<br>
<br>
Thank you!<br>
shark<br><br>
</blockquote></div><br></div></div></div>