Hello Federico,<br /><br />
after some research and trial and error I found a solution for that. Here is a complete example (without rendering anything):<br /><br />
<pre><span style=' color: Green;'>/*
This is a backdoor that can be used to test many points for containment. 
First initialize the instance, then repeated calls to IsInsideSurface() 
can be used without rebuilding the search structures. 
The complete method releases memory. 
<br />In other words, you do have to feed the vtkSelectEnclosedPoints object
neither with polydata as the input nor with a surface.
*/</span>
#<span style=' color: Blue;'>include</span> &lt;vtkSphereSource.h&gt;
#<span style=' color: Blue;'>include</span> &lt;vtkSmartPointer.h&gt;
#<span style=' color: Blue;'>include</span> &lt;vtkPolyData.h&gt;
#<span style=' color: Blue;'>include</span> &lt;vtkSelectEnclosedPoints.h&gt;

<span style=' color: Blue;'>int</span> main()
{
    vtkSmartPointer&lt;vtkSphereSource&gt; sphereSource = 
        vtkSmartPointer&lt;vtkSphereSource&gt;::New();
    sphereSource-&gt;SetCenter(<span style=' color: Maroon;'>0</span><span style=' color: Maroon;'>.0</span>, <span style=' color: Maroon;'>0</span><span style=' color: Maroon;'>.0</span>, <span style=' color: Maroon;'>0</span><span style=' color: Maroon;'>.0</span>);
    sphereSource-&gt;SetRadius(<span style=' color: Maroon;'>1</span><span style=' color: Maroon;'>.0</span>);
    sphereSource-&gt;Update();

    vtkPolyData* sphere = sphereSource-&gt;GetOutput();

    <span style=' color: Blue;'>double</span> testInside[<span style=' color: Maroon;'>3</span>] = {<span style=' color: Maroon;'>0</span><span style=' color: Maroon;'>.0</span>, <span style=' color: Maroon;'>0</span><span style=' color: Maroon;'>.0</span>, <span style=' color: Maroon;'>0</span><span style=' color: Maroon;'>.0</span>};
    <span style=' color: Blue;'>double</span> testOutside[<span style=' color: Maroon;'>3</span>] = {<span style=' color: Maroon;'>10</span><span style=' color: Maroon;'>.0</span>, <span style=' color: Maroon;'>0</span><span style=' color: Maroon;'>.0</span>, <span style=' color: Maroon;'>0</span><span style=' color: Maroon;'>.0</span>};
    vtkSmartPointer&lt;vtkSelectEnclosedPoints&gt; selectEnclosedPoints = 
        vtkSmartPointer&lt;vtkSelectEnclosedPoints&gt;::New();

    selectEnclosedPoints-&gt;Initialize(sphere);
    <span style=' color: Blue;'>std</span>::<span style=' color: Blue;'>cout</span> &lt;&lt; selectEnclosedPoints-&gt;IsInsideSurface(testInside) &lt;&lt; <span style=' color: Blue;'>std</span>::<span style=' color: Blue;'>endl</span>;
    <span style=' color: Blue;'>std</span>::<span style=' color: Blue;'>cout</span> &lt;&lt; selectEnclosedPoints-&gt;IsInsideSurface(testOutside) &lt;&lt; <span style=' color: Blue;'>std</span>::<span style=' color: Blue;'>endl</span>;
    <span style=' color: Blue;'>return</span> EXIT_SUCCESS;
}
</pre>
<br /><br />
with kind regards<br />
Jochen
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/vtkSelectEnclosedPoints-without-an-input-tp5713685p5713686.html">Re: vtkSelectEnclosedPoints without an input</a><br/>
Sent from the <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html">VTK - Users mailing list archive</a> at Nabble.com.<br/>