[Paraview] Export polydata and texture map in vtk file for viewing in paraview

James Matthews james.matthews at earthling.net
Wed Dec 10 14:34:41 EST 2008


Hi, I would like some advice regarding displaying a 2D slice of scalar
data on a structured grid in a 3D scene containing polydata using
Paraview.

I have a 2D slice of data from an FE analysis which with I want to view
in Paraview. I want to view it on a 2D plane within a 3D 'scene'
consisting of 3D polydata. For example I have a vehicle placed in the
center of the scene which is imported from a .vtp file I have created. I
have analysis results on a plane through the centre of the vehicle. This
is scalar data on a 2D structured grid. I want to be able to import the
vehicle model in .vtp format and import the analysis results in a
standard vtk format and view both.

The analysis data I have in an vtkimagedata object. One solution is to
use the geometry filter and create polydata and write this to a .vtp
file. e.g. (assuming the image data is stored in *id);

vtkImageDataGeometryFilter *idf = vtkImageDataGeometryFilter::New();
idf->SetInput(id);

vtkXMLPolyDataWriter *writer = vtkXMLPolyDataWriter::New();
writer->SetInput(idf->GetOutput());
writer->SetFileName(fname.c_str());
writer->Write();

For large data sets the visualisation is slow. What I really want to do
is create a plane and texture map the analysis data onto it. I can create
a plane with texture coords and export this separately as a .vtp file. I
can also export the image data as an image file (png/jpeg etc.). In
paraview I can then open the .vtp file containing the plane with texture
coords and then apply the texture by reading in the image. 

However, can I do this using a single file? Is there a way to have the
texture mapped polydata and texture in one file so that when it is opened
you see the texture mapped polydata? Have I gone  about this all wrong?
Any better ideas as to how I do this?

Many Thanks,

JM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20081210/a68d1904/attachment.htm>


More information about the ParaView mailing list