I asked about this a while back, but was never able to get it to work - Here is an attempt at a simple example:<br><br>Input data: polydata, points on a sphere<br><a href="http://rpi.edu/~doriad/SpherePoints.vtp">http://rpi.edu/~doriad/SpherePoints.vtp</a><br>
<br>required output: the surface of the sphere<br><br>    vtkSmartPointer&lt;vtkXMLPolyDataReader&gt; reader = vtkSmartPointer&lt;vtkXMLPolyDataReader&gt;::New();<br>    reader-&gt;SetFileName(Filename.c_str());<br>    reader-&gt;Update();<br>
<br>    vtkPolyData* InputPolydata = reader-&gt;GetOutput();<br>    <br>    vtkSmartPointer&lt;vtkContourFilter&gt; CF = vtkSmartPointer&lt;vtkContourFilter&gt;::New();<br>    CF-&gt;SetInput(InputPolydata);<br>    CF-&gt;Update();<br>
    <br>    vtkMarchingCubes* MC = vtkMarchingCubes::New();<br>    MC-&gt;SetInput(CF-&gt;GetOutput()); //ERROR: cannot do this, because the input is vtkPolyData, not vtkImageData<br>    MC-&gt;Update();<br>    <br>    vtkPolyData* Output = MC-&gt;GetOutput();<br>
    <br>    //write<br>    vtkSmartPointer&lt;vtkXMLPolyDataWriter&gt; writer = vtkSmartPointer&lt;vtkXMLPolyDataWriter&gt;::New();<br>    writer-&gt;SetFileName(Filename.c_str());<br>    writer-&gt;SetInput(Output);<br>    writer-&gt;Write();<br>
<br>I thought the ContourFilter was supposed to do this polydata to imagedata conversion? A while back Bryn had recommended creating an empty image data and manually binning the points, but I feel like there should be a filter that does this? Also recommended was Deluanay triangulation. I&#39;ve had bad luck with this in the past with the type of surfaces I&#39;m trying to reconstruct, so I would like to compare it to marching cubes.<br>
<br>There have been several questions about this, but I haven&#39;t seen any resolutions. Has anyone gotten it to work?<br><br>Thanks,<br>Dave<br>