In 3.4, if you load a 2D image and show it using the Slice representation, ParaView will use texture map automatically. So you shouldn't need to do anything but load the image data directly.
-berk On Wed, Dec 10, 2008 at 2:34 PM, James Matthews <[EMAIL PROTECTED]> wrote: > 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 > > > _______________________________________________ > ParaView mailing list > [email protected] > http://www.paraview.org/mailman/listinfo/paraview > > _______________________________________________ ParaView mailing list [email protected] http://www.paraview.org/mailman/listinfo/paraview
