Convert vtk data array to another vtk data array

General

Often, meshes contain geometrical data in common with data used for process simulation. Usually, such data used by the process simulation is associated to the mesh nodes or to the mesh cells. In the vtk unstructured grid file format the geometrical and the process data information is stored in one file - in so called data arrays.

Some tools, for instance paraview, export data arrays always using a floating point data type. OpenGeoSys expects the ‘MaterialIDs’ cell data array to have int data-type.

Other tools, for instance Gocad, export data associated with cells or nodes sometimes as float. The tool can convert the cell data arrays to double data-type.

Usage

convertVtkDataArrayToVtkDataArray
    --in-mesh <file name>
    --existing-property-name <name of the cell data array as string>
    --out-mesh <filename for the output mesh>
    --new-property-name <name of the new cell data array>
    --new-property-data-type <data type as string>

Example

convertVtkDataArrayToVtkDataArray
    -i doubleValuedMaterialIDs.vtu
    -e MaterialIDs_double
    --new-property-data-type int
    -n MaterialIDs
    -o intValuedMaterialIDs.vtu

This article was written by Thomas Fischer. If you are missing something or you find an error please let us know. Generated with Hugo 0.54.0. Last revision: December 17, 2018
Commit: [A/U/MP] Docu for convertDataArrayToDataArray tool. c89b064f4  | Edit this page on

Creative Commons License | Privacy policy / Legal statements / Impressum