I have a question about vtkPoints to CSV file format.
My code is:
m_vtkPLYReader->SetFileName(path.c_str()); // Load ply file
//How to save vtkPoints to CSV?
But I don’t know how to save CSV file format.
I have tested with example code as below:
Please advise for me
Hello, what did you get when you tried to run the examples?
I’m so sorry for my late reply.
I don’t understand your question.
Could you please explain again in detail?
I already ran these examples and there were no problems.
Fine. So you simply need to change their code in order to conform to CSV format, which is quite straightforward, very similar to the second example.
Here’s an example of a CSV file (first line instructs MS Excel that the comma is the column separator):
1997,Ford,E350,"ac, abs, moon",30100.00
1999,Chevy,"Venture ""Extended Edition""",,49000.00
1996,Jeep,Grand Cherokee,"MUST SELL!
air, moon roof, loaded",479699.00
Ah… I’m sorry. I don’t understand your reply.
My purpose is to save the CSV file from the ‘vtkPoints’.
I have already tested as follow:
- Loading CSV file by ‘vtkDelimitedTextReader’ and updating to ‘vtkRenderWindow’.
- Loading PLY file by ‘vtkPLYReader’ and updating to ‘vtkRenderWindow’.
- Loading PLY or CSV file and updating to ‘vtkPoints’, and saving PLY format file.
I can get the ‘vtkPoints’ from the ‘vtkPLYReader’ or ‘vtkDelimitedTextReader’.
But, I still don’t know how to save the CSV file from ‘vtkPoints’.