[vtkusers] vtkXMLImageDataWriter to buffer?
Stephen Hamilton
stephenshamilton at gmail.com
Wed Jun 24 18:16:30 EDT 2015
Hi,
I'm working on a web service that will allow users to generate and download
vti files. I've gotten everything in place so far, but I'm stuck at how to
serve the files. I *could* use the vtkXMLImageDataWriter to write to a
temporary file and serve that file, however I would prefer to put it into a
buffer and serve that buffer with mime type for the vti file.
It appeared at first that I should use the SetWriteOutputToString, which is
part of vtkXMLWriter, but it doesn't seem to be available on my setup
(python using vtk 6). The problem is that I can't execute the Write()
function without setting a filename--I would prefer if I could just give it
a file handle then I could create an in memory file. I noticed that the
error suggests that I can either set a file name or a stream. I'm thinking
the stream might work, but I can't figure out how to do that either.
Any help would be appreciated!
Thanks.
Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150624/0991c96a/attachment.html>
More information about the vtkusers
mailing list