[vtk-developers] reading and writing to non-files

Michael Halle mhalle at bwh.harvard.edu
Wed Dec 15 11:38:28 EST 2004


We've been investigating reading and writing VTK
data files from non-file sources (network connections,
databases, etc).  vtkDataReader and DataWriter now seem
to support IO from/to strings and client-controlled
character arrays as well as using SetFileName().
Reading everything from a single string isn't ideal;
I'd prefer to have a method called "FeedData()" that
I could give smaller chunks of data to a reader, but
at least the string methods allow some flexibility.

On the other hand, the newer XML readers don't seem
to have that functionality (they don't subclass the
DataReaders and DataWriters, and they don't implement it
natively).  The Image IO classes don't seem to allow
non-file access either.

On cursory inspection, the XML IO classes to use
vtkOutputStream and vtkInputStream, which could
probably be modified to provide the right kind
of functionality, but the streams themselves are
protected as part of the class implementation.

Is there some way to uniformly address this issue?
Files are so 1980's.

Thanks.

Michael Halle
mhalle @ bwh.harvard.edu




More information about the vtk-developers mailing list