I am trying to extract cells from a rectilinear grid (using  vtkExtractGeometry)  I want to extract a volume defined by Delaunay3D.  I Have been trying to use vtkDataSetSurfaceFilter to define the outer edge of the volume, which works fine.  Can I use this surface as an implicit function so that everything inside the surface is returned by ExtractGeometry?  The code below compiles but returns the error "vtkImplicitDataSet (hex): Can't evaluate dataset!"  This approach works fine with other implicit functions, sphere etc. so I am pretty sure my problem lies in my misuse of implicit dataset.  Any help is greatly appreciated.  A different approach is fine as well.  
<br><br>Thanks.<br><br>-Trevor<br><br>&nbsp;&nbsp;&nbsp; // Declarations<br>&nbsp;&nbsp;&nbsp; vtkPolyData&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; *poly = vtkPolyData::New();<br>&nbsp; &nbsp; vtkPoints&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *topoPnts = vtkPoints::New();<br>&nbsp; &nbsp; vtkDelaunay3D &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; *delny = vtkDelaunay3D::New();
<br>&nbsp;&nbsp;&nbsp; vtkImplicitDataSet&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *implData = vtkImplicitDataSet::New();<br>&nbsp; &nbsp; vtkExtractGeometry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *extract = vtkExtractGeometry::New();  <br>&nbsp;&nbsp;&nbsp; vtkRectilinearGrid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *rgrid = vtkRectilinearGrid::New();
<br>&nbsp;&nbsp;&nbsp; vtkDataSetSurfaceFilter&nbsp;&nbsp;&nbsp; *surface = vtkDataSetSurfaceFilter::New(); <br><br>&nbsp;&nbsp; /*<br>&nbsp;&nbsp;&nbsp; * Build Grid, open file containing x,y,z coordinates for topoPnts<br>&nbsp;&nbsp;&nbsp; */<br>&nbsp;<br>&nbsp;&nbsp;&nbsp; // Triangulate topographic surface using Delaunay3D
<br>&nbsp;&nbsp;&nbsp; poly-&gt;SetPoints(topoPnts);<br>&nbsp;&nbsp;&nbsp; delny-&gt;SetInput(poly);<br>&nbsp;&nbsp;&nbsp; surface-&gt;SetInputConnection(delny-&gt;GetOutputPort());<br>&nbsp;&nbsp;&nbsp; implData-&gt;SetDataSet(surface-&gt;GetOutput());&nbsp;&nbsp;  <br>&nbsp;&nbsp;&nbsp; extract-&gt;SetInput(rgrid);
<br>
&nbsp;&nbsp;&nbsp; extract-&gt;SetExtractInside(true);&nbsp; <br>&nbsp;&nbsp;&nbsp; extract-&gt;SetImplicitFunction(implData);<br><br>&nbsp;&nbsp; /*<br>&nbsp;&nbsp;&nbsp; * Process, render, etc.<br>&nbsp;&nbsp;&nbsp; */<br><br><br><br>