Good news! I was able to solve this using VTK IO classes, as follows:
import vtk
import csv
fileIn = 'myPoints.vtk'
fileOut = 'myTable.csv'
reader = vtk.vtkGenericDataObjectReader()
reader.SetFileName(fileIn)
reader.Update()
point_obj = reader.GetOutput()
points = point_obj.GetPoints()
table = vtk.vtkDataObjectToTable()
table.SetInputData(point_obj)
table.Update()
table.GetOutput().AddColumn(points.GetData())
table.Update()
writer = vtk.vtkDelimitedTextWriter()
writer.SetInputConnection(table.GetOutputPort())
writer.SetFileName(fileOut)
writer.Update()
writer.Write()
This has the added benefit of saving other arrays associated with the points along with the points themselves.
It seems the fundamental problem with the code in my original post was using
table.SetInputConnection(reader.GetOutputPort())
…instead of:
table.GetOutput().AddColumn(points.GetData())
for the points, and
table.SetInputData(point_obj)
to get data array data (not my original intention, but a bonus)
This code now accepts a VTK file containing Cartesian points (with or without arrays) and generates a CSV with any array information and the point information.