[vtkusers] vtkPolyDataWriter: comma decimal mark instead of dot	decimal mark
    Romain LEGUAY 
    romain.leguay at gmail.com
       
    Mon Aug 28 10:33:11 EDT 2017
    
    
  
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<vtkPolyDataWriter>::New();
writer->WriteToOutputStringOn();
writer->SetInputData(myPolyData);
writer->Update();
char * data = writer->GetOutputString();
// Reading part
vtkSmartPointer<vtkPolyDataReader> polyReader = vtkSmartPointer<vtkPolyDataReader>::New();
polyReader->ReadFromInputStringOn();
polyReader->SetInputString(data);
polyReader->Update();
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!
Romain 
    
    
More information about the vtkusers
mailing list