scal2vtk

NAME

scal2vtk - converts the data contained in a scalar file to data which can be included in a vtk file.

SYNOPSIS

scal2vtk [-?|-h|--help] [-c|--cell] [-p|--point] [-n NAME|--name NAME]

DESCRIPTION

scal2vtk converts a scalar file to VTK format. The data is read from the standard input and the result is returned to the standard output. A scalar file is an ASCII file with on the first line the number of scalars n_scalars followed by n_scalars line with the value of the scalar. Scalar files can be used with view_pt(1), view_li(1) or view_tri(1). VTK files can be used by vtk or paraview.

Format:

> number_of_scalars

> val1

> val2

> ...

> valn

Example. To import scalar data associated with a triangle file, the first step is to convert the triangle file:

tri2vtk < trifile > vtkfile

Then, scalars can be added:

scal2vtk --name 'scal1' --point < scal1_file >> vtkfile

scal2vtk --name 'scal2' < scal2_file >> vtkfile

scal2vtk --name 'scal3' --cell < scal3_file >> vtkfile

The first scalar file of a specific type (point or cell data) added to the vtk file must include a header line indicating its type: point data (option: -p ) or cells data (option: -c ).

OPTIONS

-h,--help,-?

Returns the manual page

-c,--cell

Add a header line indicating that the scalars are associated to the cells.

-n NAME, --name NAME

NAME of the scalar field.

-p,--point

Add a header line indicating that the scalars are associated to the points.

AUTHORS

Written by Pierre Smars (first version: 2011)

BUGS

Reports of bugs or problems should be submitted via electronic mail to <smars@yuntech.edu.tw>.

COPYRIGHT

Copyright (C) 2013 Pierre Smars. License GPLv2 <http://www.gnu.org/licenses/gpl-2.0.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

SEE ALSO

tri2vtk(1)

Pierre SMARS (tools, home page)