title: vtkSelectVisiblePoints filter output has 0 points
body: <p>I’m trying to obtain a polyData with only the visible part of a 3D model.
  To that extent, I’m passing the original data through a vtkSelectVisiblePoints filter.</p>
  
  <p>I’m using a mock renderer, mapper and actor because I want to post-process the visible points before displaying them.</p>
  
  <p>However, the output of the vtkSelectVisiblePoints filter contains “0” points for some reason…</p>
  
  <p>Using the following example:
  <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectVisiblePoints" rel="nofollow">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectVisiblePoints</a></p>
  
  <p>I came up with the following piece of code:</p>
  
  <pre><code>  // Render window and interactor
    vtkSmartPointer&lt;vtkRenderWindow&gt; renderWindow =
      vtkSmartPointer&lt;vtkRenderWindow&gt;::New();
    renderWindow-&gt;SetSize(800, 800);
  
    vtkSmartPointer&lt;vtkRenderWindowInteractor&gt; renderWindowInteractor =
      vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::New();
  
    renderWindowInteractor-&gt;SetRenderWindow(renderWindow);
  
  
    // Mock renderer, mapper and actor
    vtkSmartPointer&lt;vtkRenderer&gt; mockRenderer =
      vtkSmartPointer&lt;vtkRenderer&gt;::New();
  
    renderWindow-&gt;AddRenderer(mockRenderer);
  
    vtkSmartPointer&lt;vtkPolyDataMapper&gt; mockMapper =
      vtkSmartPointer&lt;vtkPolyDataMapper&gt;::New();
    mockMapper-&gt;SetInput(reader-&gt;GetOutput());
  
    vtkSmartPointer&lt;vtkActor&gt; mockActor = vtkSmartPointer&lt;vtkActor&gt;::New();
    mockActor-&gt;SetMapper(mockMapper);
    mockRenderer-&gt;AddActor(mockActor);
  
    // Set camera to the correct position
    mockRenderer-&gt;GetActiveCamera()-&gt;SetPosition(0, -1, 0);
    mockRenderer-&gt;GetActiveCamera()-&gt;SetFocalPoint(0, 0, 0);
    mockRenderer-&gt;GetActiveCamera()-&gt;SetViewUp(0, 1, 0);
    mockRenderer-&gt;ResetCamera();
  
    vtkSmartPointer&lt;vtkSelectVisiblePoints&gt; selectVisiblePoints =
      vtkSmartPointer&lt;vtkSelectVisiblePoints&gt;::New();
    selectVisiblePoints-&gt;SetInput(reader-&gt;GetOutput());
    selectVisiblePoints-&gt;SetRenderer(mockRenderer);
    selectVisiblePoints-&gt;Update();
  
    std::cout &lt;&lt; "Visible nr of points = " &lt;&lt; selectVisiblePoints-&gt;GetOutput()-&gt;GetNumberOfPoints() &lt;&lt; std::endl;
  
    renderWindow-&gt;RemoveRenderer(mockRenderer);
  </code></pre>
  
  <p>… prints 0.</p>
  
  <p>However, if I call <code>renderWindow-&gt;Render()</code>, the visible part of the model is correctly displayed... </p>
  
  <p>Am I missing anything...?</p>