I tried to put together a simple example of itkVTKPolyDataReader (which I'd recommend adding to the Examples/Review folder). However, it seems to have some problems:<br><br><a href="http://www.rpi.edu/~doriad/ITK_List/itkVTKPolyDataReader/">http://www.rpi.edu/~doriad/ITK_List/itkVTKPolyDataReader/</a><br>
<br>These vtk files were all created using Paraview using the "Save Data -> Legacy VTK" from a vtp file loaded in paraview.<br><br>When run on BunnyMesh.vtk it hangs on "Trying to read...". <br><br>
After a bit of debugging it seems to never find the POLYGONS line (lines 117 - 120 in itkVTKPolyDataReader.txx)<br> while( !inputFile.eof() && line.find("POLYGONS") == std::string::npos )<br> {<br> std::getline( inputFile, line );<br>
}<br><br>When run on BunnyPoints.vtk (points only, no connectivity), it does the same thing.<br><br>When run on BunnyPointsASCII.vtk, it says:<br><br>terminate called after throwing an instance of 'std::out_of_range'<br>
what(): basic_string::basic_string<br>Aborted<br><br>It says the same thing when called on BunnyPoints.vtp file - but I know it is not designed to read vtp, so I'm assuming it is just also not designed to read ascii vtk.<br>
<br>I think we need to look into making this reader compatible with binary (and maybe ascii, too?) files exported as vtk from paraview.<br clear="all"><br>Thanks,<br><br>David<br>