[Paraview] [paraview] Texture Map To Plane

Brian Panneton brian.panneton at gmail.com
Wed Apr 6 11:39:49 EDT 2011


I have a reader which outputs a Multi-block Dataset containing a polygonal
mesh of vertices in one block. I am trying to add another block to contain a
2D image on a plane. I am reading in the image as such:

[code]
 vtkSmartPointer<vtkImageReader2Factory> imageFactory =
     vtkSmartPointer<vtkImageReader2Factory>::New();
 vtkSmartPointer<vtkImageReader2> reader =
      imageFactory->CreateImageReader2(filename);
 reader->SetFileName(filename);
 reader->Update();

 vtkSmartPointer<vtkTextureMapToPlane> texturePlane =
     vtkSmartPointer<vtkTextureMapToPlane>::New();
 texturePlane->SetInput(reader->GetOutput());
 texturePlane->SetOrigin(0,0,0);
 texturePlane->SetPoint1(1, 0, 0);
 texturePlane->SetPoint2(0, 1, 0);

 mb->SetBlock(1, texturePlane->GetOutput());
[\code]

Under the Information Tab in the Object Inspector, I see the Image (Uniform
Rectilinear Grid) under the Multi-block DataSet. It has no cells or points.
The image does not show up in the 3d view either.

How can I get the image to show up?

Thanks,
Brian Panneton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110406/37efc850/attachment.htm>


More information about the ParaView mailing list