<HTML>
<HEAD>
<TITLE>Re: [Paraview] Export polydata and texture map in vtk file for viewing in paraview</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>You can view a 2D image in a 3D view by simply selecting the 3D view (clicking on it so that the red boarder is around it) and then clicking the eyeball next to the image data. &nbsp;You can get rid of the 2D view by clicking the X just above and at the right side of the 2D view.<BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 12/14/08 1:24 PM, &quot;James Matthews&quot; &lt;<a href="james.matthews@earthling.net">james.matthews@earthling.net</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Thanks for the quick reply. I am not quite sure what you mean.<BR>
<BR>
I have written out my image data from a vtkImageData object using<BR>
vtkXMLImageDataWriter to a .vti file.<BR>
<BR>
I have written my polydata out using vtkXMLPolyDataWriter to a .vtp file.<BR>
<BR>
The image data is orientated and locate such that it is a plane through the<BR>
centre of the polydata model (which is a vehicle).<BR>
<BR>
If I open the files in Paraview (v3.4) it opens the image data in a separate<BR>
window to the polydata. The image data cannot by rotated, just panned in 2D. I<BR>
see options for 'slices' but not sure what I can do with them to solve this<BR>
problem.<BR>
<BR>
Hopefully I've explained the problem reasonably well.<BR>
<BR>
&lt;Apologies if this is a duplicate reply, I have had some email problems and my<BR>
last reply doesn't seem to appear on the list&gt;<BR>
<BR>
On Wednesday 10 December 2008 21:08:46 you wrote:<BR>
&gt; In 3.4, if you load a 2D image and show it using the Slice<BR>
&gt; representation, ParaView will use texture map automatically. So you<BR>
&gt; shouldn't need to do anything but load the image data directly.<BR>
&gt;<BR>
&gt; -berk<BR>
&gt;<BR>
&gt; On Wed, Dec 10, 2008 at 2:34 PM, James Matthews<BR>
&gt;<BR>
&gt; &lt;<a href="james.matthews@earthling.net">james.matthews@earthling.net</a>&gt; wrote:<BR>
&gt; &gt; Hi, I would like some advice regarding displaying a 2D slice of scalar<BR>
&gt; &gt; data on a structured grid in a 3D scene containing polydata using<BR>
&gt; &gt; Paraview.<BR>
&gt; &gt;<BR>
&gt; &gt; I have a 2D slice of data from an FE analysis which with I want to view<BR>
&gt; &gt; in Paraview. I want to view it on a 2D plane within a 3D 'scene'<BR>
&gt; &gt; consisting of 3D polydata. For example I have a vehicle placed in the<BR>
&gt; &gt; center of the scene which is imported from a .vtp file I have created. I<BR>
&gt; &gt; have analysis results on a plane through the centre of the vehicle. This<BR>
&gt; &gt; is scalar data on a 2D structured grid. I want to be able to import the<BR>
&gt; &gt; vehicle model in .vtp format and import the analysis results in a<BR>
&gt; &gt; standard vtk format and view both.<BR>
&gt; &gt;<BR>
&gt; &gt; The analysis data I have in an vtkimagedata object. One solution is to<BR>
&gt; &gt; use the geometry filter and create polydata and write this to a .vtp<BR>
&gt; &gt; file. e.g. (assuming the image data is stored in *id);<BR>
&gt; &gt;<BR>
&gt; &gt; vtkImageDataGeometryFilter *idf = vtkImageDataGeometryFilter::New();<BR>
&gt; &gt; idf-&gt;SetInput(id);<BR>
&gt; &gt;<BR>
&gt; &gt; vtkXMLPolyDataWriter *writer = vtkXMLPolyDataWriter::New();<BR>
&gt; &gt; writer-&gt;SetInput(idf-&gt;GetOutput());<BR>
&gt; &gt; writer-&gt;SetFileName(fname.c_str());<BR>
&gt; &gt; writer-&gt;Write();<BR>
&gt; &gt;<BR>
&gt; &gt; For large data sets the visualisation is slow. What I really want to do<BR>
&gt; &gt; is create a plane and texture map the analysis data onto it. I can create<BR>
&gt; &gt; a plane with texture coords and export this separately as a .vtp file. I<BR>
&gt; &gt; can also export the image data as an image file (png/jpeg etc.). In<BR>
&gt; &gt; paraview I can then open the .vtp file containing the plane with texture<BR>
&gt; &gt; coords and then apply the texture by reading in the image.<BR>
&gt; &gt;<BR>
&gt; &gt; However, can I do this using a single file? Is there a way to have the<BR>
&gt; &gt; texture mapped polydata and texture in one file so that when it is opened<BR>
&gt; &gt; you see the texture mapped polydata? Have I gone &nbsp;about this all wrong?<BR>
&gt; &gt; Any better ideas as to how I do this?<BR>
&gt; &gt;<BR>
&gt; &gt; Many Thanks,<BR>
&gt; &gt;<BR>
&gt; &gt; JM<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt; _______________________________________________<BR>
&gt; &gt; ParaView mailing list<BR>
&gt; &gt; <a href="ParaView@paraview.org">ParaView@paraview.org</a><BR>
&gt; &gt; <a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><BR>
<BR>
_______________________________________________<BR>
ParaView mailing list<BR>
<a href="ParaView@paraview.org">ParaView@paraview.org</a><BR>
<a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
&nbsp;&nbsp;&nbsp;**** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kenneth Moreland<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sandia National Laboratories<BR>
*********** &nbsp;<BR>
*** *** *** &nbsp;email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** &nbsp;*** &nbsp;** &nbsp;phone: (505) 844-8919<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;web: &nbsp;&nbsp;<a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>