[vtkusers] vtkPolyDataWriter: comma decimal mark instead of dot decimal mark
david.gobbi at gmail.com
Mon Aug 28 11:03:54 EDT 2017
I suspect that VTK could be fixed if someone simply added a call to
"imbue(std::locale::classic())" to vtkDataWriter::OpenVTKFile(), e.g.:
fptr = new std::ostringstream;
fptr = new ofstream(this->FileName, ios::out);
If you have built VTK from source, you can try making the above change to
see if it fixes the issue (the vtkDataSetReader might also need to be
fixed, as well as many other IO classes).
On Mon, Aug 28, 2017 at 8:33 AM, Romain LEGUAY <romain.leguay at gmail.com>
> Hi everyone,
> I have a little issue when I try to write then read a polydata.
> This is the code I use to write then read my polydata inside a string
> (not a file):
> // Writing part
> vtkSmartPointer<vtkPolyDataWriter> writer = vtkSmartPointer<
> char * data = writer->GetOutputString();
> // Reading part
> vtkSmartPointer<vtkPolyDataReader> polyReader = vtkSmartPointer<
> vtkSmartPointer<vtkPolyData> polyData = polyReader->GetOutput();
> Unfortunately, when I try to read the data, I have some error indicating
> some Unrecognized symbols: the decimal mark is a comma instead of a dot.
> Can we change easily this comportement or force VTK to write with dot
> decimal mark?
> I know the command std::setlocale but I would like to know if there is
> another way to fix this problem.
> Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers