VTK-CELL-DATA(1) General Commands Manual VTK-CELL-DATA(1)

vtk-datatransforms a list of values into cell data in VTK format

vtk-data [-n name ...] [-o output] -c cell_count [data]

vtk-data formats a list of double precision values in cell data sets as defined in the legacy VTK format. To describe a valid VTK file, the result must then be concatenated with a VTK file storing the geometry of the cells to which this data corresponds.

As input, vtk-data reads a set of cell_count floating-point ASCII values from data or from standard input if data is not specified. This continues until no more data is supplied or 8 sets have been read. Each set thus represents a data set associated with each cell. If a set doesn't contain enough data (i.e. less than cell_count), an error is returned.

The options are as follows:

name
Name of a data set. It cannot contain spaces or tabs. This option can be repeated as many times as there are data sets to be processed. By default, the name of each dataset is "datai", with i in [0,7] the dataset index.
output
Output file. If not defined, VTK output data is written to the standard output.
cell_count
Number of cells, i.e. number of floating-point values provided per data set.

The vtk-data utility exits 0 on success, and >0 if an error occurs.

Formats a list of 200 floating-point ASCII values read from the data.txt file into two sets of 100 values, one value per cell. Name the first set of data per cell "temperature", and the second "flux". Output VTK data are written to data.vtk. Next, concatenate the cell data with their corresponding geometry stored in the mesh.vtk file, and thus define the complete VTK file results.vtk.

vtk-cell-data -c 100 -n temperature -n flux -o data.vtk data.txt
cat mesh.vtk data.vtk > result.vtk

The VTK User's Guide, Kitware, Inc, 11, 470--482, 2010, Simple Legacy Formats.

May 9, 2025 UNIX