Hi,<br><br>I&#39;m trying to use vtkPlaneSource, and pasting a vtkTexture which gets its data from vtkImageData. The code below displays the image fine, but it does not match the image size in pixels. How do I configure vtkPlaneSource so that I see the image of proper size??<br>
<br>------------------------------------------------------------------------------------------------------------------------------------------------<br><br>    vtkPNGReader *pngReader = vtkPNGReader::New();<br>        pngReader-&gt;SetFileName(argv[1]);<br>
        pngReader-&gt;Update();<br>        ima = pngReader-&gt;GetOutput();<br><br>vtkTexture* VTKtexture = vtkTexture::New();<br>   VTKtexture-&gt;SetInput(ima);<br>   VTKtexture-&gt;InterpolateOn(); <br><br>vtkPlaneSource* VTKplane = vtkPlaneSource::New();<br>
  VTKplane-&gt;SetOrigin( -0.5, -0.5, 0.0);<br>  VTKplane-&gt;SetPoint1(  0.5, -0.5, 0.0);<br>  VTKplane-&gt;SetPoint2( -0.5,  0.5, 0.0);<br><br> vtkPolyDataMapper *VTKplaneMapper = vtkPolyDataMapper::New();<br>  VTKplaneMapper-&gt;SetInputConnection(VTKplane-&gt;GetOutputPort());<br>
<br><br>   vtkActor* VTKplaneActor = vtkActor::New();<br>   VTKplaneActor-&gt;SetTexture(VTKtexture);<br>   VTKplaneActor-&gt;SetMapper(VTKplaneMapper);<br>   <br>   vtkRenderer        *ren = vtkRenderer::New();<br>   vtkRenderWindow *renwin = vtkRenderWindow::New();<br>
   renwin-&gt;AddRenderer(ren);<br>   renwin-&gt;FullScreenOn();<br><br> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<br>   iren-&gt;SetRenderWindow(renwin);<br>   ren-&gt;AddActor(VTKplaneActor);<br>
   ren-&gt;SetBackground(0,0,0.5);<br>   renwin-&gt;Render();<br><br>--------------------------------------------------------------------------------------------------------------------------------------<br><br>