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

James Matthews james.matthews at earthling.net
Tue Dec 16 02:29:42 EST 2008


I feel rather stupid for not realising that, thanks for the advice. Ideally 
I'd like to turn off this default behaviour open it in a 3D window.

I am still interested in the original question though, is it possible to 
package polydata and a texture map in a single file so when it is opened you 
see textured mapped geometry, rather than having to import the polydata with 
texture coords and then apply a texture through the display tab?

On Monday 15 December 2008 22:04:23 Moreland, Kenneth wrote:
> 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.  You can get rid of the 2D view by clicking
> the X just above and at the right side of the 2D view.
>
> -Ken
>
>
> On 12/14/08 1:24 PM, "James Matthews" <james.matthews at earthling.net> wrote:
>
> Thanks for the quick reply. I am not quite sure what you mean.
>
> I have written out my image data from a vtkImageData object using
> vtkXMLImageDataWriter to a .vti file.
>
> I have written my polydata out using vtkXMLPolyDataWriter to a .vtp file.
>
> The image data is orientated and locate such that it is a plane through the
> centre of the polydata model (which is a vehicle).
>
> If I open the files in Paraview (v3.4) it opens the image data in a
> separate window to the polydata. The image data cannot by rotated, just
> panned in 2D. I see options for 'slices' but not sure what I can do with
> them to solve this problem.
>
> Hopefully I've explained the problem reasonably well.
>
> <Apologies if this is a duplicate reply, I have had some email problems and
> my last reply doesn't seem to appear on the list>
>
> On Wednesday 10 December 2008 21:08:46 you wrote:
> > 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
> >
> > <james.matthews at earthling.net> 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
> > > ParaView at paraview.org
> > > http://www.paraview.org/mailman/listinfo/paraview
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>
>
>
>
>    ****      Kenneth Moreland
>     ***      Sandia National Laboratories
> ***********
> *** *** ***  email: kmorel at sandia.gov
> **  ***  **  phone: (505) 844-8919
>     ***      web:   http://www.cs.unm.edu/~kmorel



More information about the ParaView mailing list