<div dir="ltr"><div><div>That seems like a reasonable approach to doing what you are describing. If you need only to compute normals between points on a Delaunay2D surface and display them immediately, then the rendering is already doing that for you on the GPU, so it is very fast. If you need to save out the texture, then doing it the way you describe also sounds reasonable.<br><br></div>HTH,<br></div>Cory<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 11, 2017 at 8:32 AM, Jean-Max Redonnet <span dir="ltr"><<a href="mailto:jmax.red@gmail.com" target="_blank">jmax.red@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi, I'm still quite new to vtk, and I would like a pro advice.<br><br>I
have a set of pixels, each one given with its full rgb color
information. I would like to build a full image by interpolating color
of pixels between the given points. First, I would like to know if there
is a magic wand to do that. I searched it for days but maybe I missed
something.<br><br>If the job need to be done by hand, I plan to do this:<br>- first I split my image using a Delaunay algorithm.<br>-
then, each pixels (except the given ones) belongs to a single triangle.
Thus I can calculate the scalar factors using a barycenter formula.<br><br>For
example, let be a triangle defined by three pixels A, B and C. Let be P
a pixel inside this triangle. The following vectorial relations can be
written: PA = a.u, PB = b.v and PC = c.w, where u,v and w are unit
vector along (PA), (PB) and (PC) respectively. In this context I plan to
use scalar factors a, b and c to interpolate A,B and C pixels colors
values. The color of pixel P being then set to these interpolated
values.<br><br>Is it the right way to do ? Do you know a better way to do this ?<br><br>Giving
you a larger sight may help you to help me. Actually I want to
interpolate a vector field from a given set of vectors. The idea is to
do something like normal maps used in computer graphics. Mapping the 3D
vectors position to a 2D space is not a problem since their starting
point belongs to a parametric surface, therefore the 2D parametric space
of the surface can be used. Then the (u,v) space can easily be mapped
to an image pixels space while the coordinates of my vectors can
meanwhile be mapped to a rgb color space.<br><br>Using an image to build
and store my vector field interpolation is convenient but I would like
to set up all this in the most efficient manner.<br><br>According to you, what is the better way to do this ?<br><br>Thanks for any help.<br></div><div><br>jMax<br><br></div></div>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Cory Quammen<br>Staff R&D Engineer<br>Kitware, Inc.</div>
</div>