<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-GB link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>In paraview you would create a simple python script that could
loop over 50 items and generate the names of poly and tex files from the loop
variable. Then load each poly/tex separately and do the assign texture in your
python script.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Off the top of my head, I don’t know the syntax, but I’ve seen
it done, so it’s just a matter of experimentation until you get it right.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>JB<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> vtkusers-bounces@vtk.org
[mailto:vtkusers-bounces@vtk.org] <b>On Behalf Of </b>David Doria<br>
<b>Sent:</b> 16 November 2009 00:54<br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Subject:</b> Re: [vtkusers] Associate texture with polydata<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<div>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;
margin-left:4.8pt;margin-right:0cm'>
<p class=MsoNormal>The vtkActor has a SetTexture method that allows you to
associate a vtkTexture<br>
object with polydata. The vtkTexture is essentially a mapper that takes a<br>
vtkImageData and turns it into an OpenGL texture.<br>
<br>
The vtkPlaneSource should produce a polydata that already has the proper<br>
texture coordinates to map the points of the plane to the corners of the image.<br>
There is also a vtkTextureMapToPlane filter that can be used to add texture<br>
coordinates to a polydata.<br>
<br>
AFAIK none of the VTK file formats allow textures to be stored with polydata,<br>
but they will at least save the texture coordinates.<br>
<span style='color:#888888'><br>
David</span><o:p></o:p></p>
</blockquote>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><br>
Hm, I'm not sure that will help. Let me explain what I am actually trying to
do. I have a text file with 50 sets of camera parameters (describing 50 camera
positions and orientations). I have a folder of 50 images - one for each
camera. What I am trying to do is create a plane for each camera and texture
map the corresponding image onto the plane. Then I want to load the scene in
paraview. You can see how I wouldn't want to select manually 50 images to map
onto each of the planes. I actually don't even know how that would work if
there is more than 1 plane in the polydata (if I used vtkAppendPolyData).<br>
<br>
Do anyone have any other suggestions now that you know the full story?<br>
<br clear=all>
Thanks,<br>
<br>
David<o:p></o:p></p>
</div>
</div>
</body>
</html>