[Insight-users] itkVTKPolyDataReader example issues

Bill Lorensen bill.lorensen at gmail.com
Sun Aug 9 14:28:47 EDT 2009


It only reads ASCII and, according to the comments, it only reads triangles.

I loaded the bunny into paraview, saved it in legacy ascii and the
data loads fine with the itkVTKPolyDataReader.

Bill

On Sun, Aug 9, 2009 at 10:41 AM, David Doria<daviddoria+itk at gmail.com> wrote:
> 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:
>
> http://www.rpi.edu/~doriad/ITK_List/itkVTKPolyDataReader/
>
> These vtk files were all created using Paraview using the "Save Data ->
> Legacy VTK" from a vtp file loaded in paraview.
>
> When run on BunnyMesh.vtk it hangs on "Trying to read...".
>
> After a bit of debugging it seems to never find the POLYGONS line (lines 117
> - 120 in itkVTKPolyDataReader.txx)
>   while( !inputFile.eof() && line.find("POLYGONS") == std::string::npos )
>     {
>     std::getline( inputFile, line );
>     }
>
> When run on BunnyPoints.vtk (points only, no connectivity), it does the same
> thing.
>
> When run on BunnyPointsASCII.vtk, it says:
>
> terminate called after throwing an instance of 'std::out_of_range'
>   what():  basic_string::basic_string
> Aborted
>
> 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.
>
> I think we need to look into making this reader compatible with binary (and
> maybe ascii, too?) files exported as vtk from paraview.
>
> Thanks,
>
> David
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list