I output data to .vtu with vtkXMLUnstructuredGridWriter.
However, VTU files always have
InformationKey name=“L2_NORM_RANGE” location=“vtkDataArray” length=“2”
Value index=“0”
0
Value
Value index=“1”
1.1661903912
Value
InformationKey
I don’t want to output InformationKey. How can I not output it?
from vtkmodules.vtkIOXML import vtkXMLDataSetWriter
from vtkmodules.vtkCommonCore import vtkPoints
import vtkmodules
from vtkmodules.vtkCommonCore import *
from vtkmodules.util import numpy_support
import numpy
if __name__ == '__main__':
position = vtkPoints()
position.SetDataType(VTK_FLOAT)
position.InsertNextPoint(0, 0, 0)
position.InsertNextPoint(1, 0, 0)
position.InsertNextPoint(0, 1, 0)
position.InsertNextPoint(0, 0, 1)
position.InsertNextPoint(1, 0, .4)
position.InsertNextPoint(0, 1, .6)
grid = vtkmodules.vtkCommonDataModel.vtkUnstructuredGrid()
grid.SetPoints(position)
data = numpy.arange(0, 6, 1)
data = numpy_support.numpy_to_vtk(data)
data.SetName("pressure")
grid.GetPointData().AddArray(data)
writer = vtkmodules.vtkIOXML.vtkXMLUnstructuredGridWriter()
#writer.SetDataModeToAppended()
writer.SetDataMode(writer.Ascii)
writer.SetFileName('a.vtu')
writer.SetInputData(grid)
writer.Write()