MSV-Project / MSVTK

Multiscale Visualization ToolKit
https://web.archive.org/web/20141218040109/http://msvtk.org/
Apache License 2.0
14 stars 8 forks source link

Change msvVTKPolyDataFileSeriesReader to use vtkDataReader #13

Closed rchristie closed 11 years ago

rchristie commented 11 years ago

Provide a concrete implementation of msvVTKFileSeriesReader based on vtkDataReader which supports any reader derived from it, including vtkPolyDataReader. This can replace the polydata-only file series reader. Update tests and example to use new class.

rchristie commented 11 years ago

A complication is that a dataset type string needs to be passed to vtkDataReader::IsFileValid() in the implementation of CanReadFile(), which is unknown. Our proposed solution is to call IsA() for passed-in readers and have a table of known dataset types for known reader types, with unrecognised readers returning true. CanReadFile() is not called from msvVTKFileSeriesReader anyway: it's a service for the client.

Note also that this class won't support vtkXMLReader-derived readers, nor any other readers not derived from vtkDataReader, such as vtkSTLReader. We're open to making the class capable of working with more varied readers, as it would be more convenient to use.