ovf2vtk
tool#
ovf2vtk
(which is equivalent to python3 -m discretisedfield.io.ovf2vtk
) is a command line tool used to convert OVF to the VTK file format.
Information about the tool and its usage can be accessed by typing:
$ ovf2vtk --help
usage: ovf2vtk [-h] --input INPUT [INPUT ...] [--output OUTPUT [OUTPUT ...]]
ovf2vtk - OVF to VTK file format conversion.
optional arguments:
-h, --help show this help message and exit
--input INPUT [INPUT ...], -i INPUT [INPUT ...]
Input OVF file(s).
--output OUTPUT [OUTPUT ...], -o OUTPUT [OUTPUT ...]
Output VTK file(s).
There are three main use cases how ovf2vtk
tool can be used. In any case, specifying the output file name(s) is optional. More precisely, if the names of the output files are omitted, they are going to be the same as the input files, but with a different extension (.vtk
instead of .ovf
).
1. Single file#
Probably the simplest use case is the conversion of a single fie.
$ ovf2vtk -i my-ovf-file.omf
This command is going to create the same output file as if we specified the output filename:
$ ovf2vtk -i my-ovf-file.omf -o my-ovf-file.vtk
2. Multiple files#
To convert multiple OVF files, a list of files is passed to the ovf2vtk
tool.
$ ovf2vtk -i my-ovf-file1.omf my-ovf-file2.omf my-ovf-file3.omf
3. Wildcard#
Usually, the number of files which should be converted is very large. In that case, a filename with a wildcard can be used.
$ ovf2vtk --input my-ovf-file*.omf