[vtk-developers] problems with vtkStructuredPointsWriter [WinXP VTK5.2.1]

Paolo Quadrani p.quadrani at cineca.it
Fri Feb 6 07:55:13 EST 2009


Dear all,
I'm starting to learn VTK 5.2 (I come from VTK 4.4) and I encountered  
this problem:
I have a vtkStructuredPoints volume and I have to write it into a  
string, so I'm using the snippet code below:

....
       vtkStructuredPointsWriter *w = vtkStructuredPointsWriter::New();
       w->SetInput(dataStructured);
       w->SetFileTypeToBinary();
       w->SetWriteToOutputString(1);
       w->Update();

       std::string s;
       s = w->GetOutputString();
...

the output string of the writer contains only the header of the input  
data.
I tried also to set the FileTypeToASCII, but in that case I get an  
error from the vtkDataWriter.cxx at line 1723:

vtkErrorMacro("OutputString allocated buffer is not large enough.");

Saving the data into a file instead there are no problems.
Am I doing something wrong?

Thanks in advance.

Paolo Quadrani
_________________________________
CINECA
System and Technology Department
+39 0516171411 (Office)
+39 051 6132198 (Fax)

Via Magnanelli 6/3  40033
Casalecchio di Reno
Italy




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20090206/589d9e23/attachment.html>


More information about the vtk-developers mailing list