<br><div class="gmail_quote"><br>Hi ,<span lang="en"><span>When</span> <span>I run the</span> <span>following code</span><span>,</span> <span>the following</span> <span>error</span> <span>occurs<br>
</span></span><br><span lang="en"><span><span lang="en"><span>The input</span> <span>file</span> <span>is</span> <span>attached to</span> <span>e-mail.<br>
</span></span>How to solve this error?thanks a lot!<br></span></span><br><br>#include &lt;vtkSmartPointer.h&gt;<br>#include &lt;vtkPolyDataMapper.h&gt;<br>#include &lt;vtkStructuredGridReader.h&gt;<br>#include &lt;<div>
vtkStructuredGridGeometryFilter.h&gt;<br>
#include &lt;vtkRenderWindow.h&gt;<br>#include &lt;vtkRenderWindowInteractor.h&gt;<br>#include &lt;vtkRenderer.h&gt;<br>#include &lt;vtkImageData.h&gt;<br>int main(int argc, char* argv[])<br>{<br>//  // Verify input arguments<br>


//  /*if ( argc != 2 )<br>//    {<br>//    std::cout &lt;&lt; &quot;Usage: &quot; &lt;&lt; argv[0]<br>//              &lt;&lt; &quot; Filename(.vtk)&quot; &lt;&lt; std::endl;<br>//    return EXIT_FAILURE;<br>//    }*/<br>


<br> std::string inputFilename = &quot;C:\\VTK\\VTKData\\Data\\tooth.vtk&quot;;<br><br>     <br>  vtkSmartPointer&lt;vtkStructuredGridReader&gt; reader =<br>    vtkSmartPointer&lt;vtkStructuredGridReader&gt;::New();<br>  reader-&gt;SetFileName(inputFilename.c_str());<br>


  reader-&gt;Update();<br>// <br>  vtkSmartPointer&lt;vtkStructuredGridGeometryFilter&gt; geometryFilter =<br>    vtkSmartPointer&lt;vtkStructuredGridGeometryFilter&gt;::New();<br>  geometryFilter-&gt;SetInputConnection(reader-&gt;GetOutputPort());<br>


  geometryFilter-&gt;Update();<br> <br>  // Visualize<br>  vtkSmartPointer&lt;vtkPolyDataMapper&gt; mapper =<br>    vtkSmartPointer&lt;vtkPolyDataMapper&gt;::New();<br>  mapper-&gt;SetInputConnection(geometryFilter-&gt;GetOutputPort());<br>


 <br>  vtkSmartPointer&lt;vtkActor&gt; actor =<br>    vtkSmartPointer&lt;vtkActor&gt;::New();<br>  actor-&gt;SetMapper(mapper);<br> <br>  vtkSmartPointer&lt;vtkRenderer&gt; renderer =<br>    vtkSmartPointer&lt;vtkRenderer&gt;::New();<br>


  vtkSmartPointer&lt;vtkRenderWindow&gt; renderWindow =<br>    vtkSmartPointer&lt;vtkRenderWindow&gt;::New();<br>  renderWindow-&gt;AddRenderer(renderer);<br>  vtkSmartPointer&lt;vtkRenderWindowInteractor&gt; renderWindowInteractor =<br>


    vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::New();<br>  renderWindowInteractor-&gt;SetRenderWindow(renderWindow);<br> <br>  renderer-&gt;AddActor(actor);<br>  renderer-&gt;SetBackground(.3, .6, .3); // Background color green<br>


 <br>  renderWindow-&gt;Render();<br>  renderWindowInteractor-&gt;Start();<br> <br>  return EXIT_SUCCESS;<br>}<br><br><br>ERROR: In ..\..\VTK\IO\vtkStructuredGridReader.cxx, line 103<br>vtkStructuredGridReader (00000000025B4890): Cannot read dataset type: structured_points<br>


<br>ERROR: In ..\..\VTK\IO\vtkStructuredGridReader.cxx, line 198<br>vtkStructuredGridReader (00000000025B4890): Cannot read dataset type: structured_points</div>
</div><br>