{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# `ovf2vtk` tool\n", "\n", "`ovf2vtk` (which is equivalent to `python3 -m discretisedfield.io.ovf2vtk`) is a command line tool used to convert OVF to the VTK file format.\n", "\n", "Information about the tool and its usage can be accessed by typing:\n", "\n", "```\n", "$ ovf2vtk --help\n", "\n", "usage: ovf2vtk [-h] --input INPUT [INPUT ...] [--output OUTPUT [OUTPUT ...]]\n", "\n", "ovf2vtk - OVF to VTK file format conversion.\n", "\n", "optional arguments:\n", " -h, --help show this help message and exit\n", " --input INPUT [INPUT ...], -i INPUT [INPUT ...]\n", " Input OVF file(s).\n", " --output OUTPUT [OUTPUT ...], -o OUTPUT [OUTPUT ...]\n", " Output VTK file(s).\n", "```\n", "\n", "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`).\n", "\n", "### 1. Single file\n", "\n", "Probably the simplest use case is the conversion of a single fie.\n", "\n", "```\n", "$ ovf2vtk -i my-ovf-file.omf\n", "```\n", "\n", "This command is going to create the same output file as if we specified the output filename:\n", "\n", "```\n", "$ ovf2vtk -i my-ovf-file.omf -o my-ovf-file.vtk\n", "```\n", "\n", "### 2. Multiple files\n", "\n", "To convert multiple OVF files, a list of files is passed to the `ovf2vtk` tool.\n", "\n", "```\n", "$ ovf2vtk -i my-ovf-file1.omf my-ovf-file2.omf my-ovf-file3.omf\n", "```\n", "\n", "### 3. Wildcard\n", "\n", "Usually, the number of files which should be converted is very large. In that case, a filename with a wildcard can be used.\n", "\n", "```\n", "$ ovf2vtk --infile my-ovf-file*.omf\n", "```" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.12" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": {}, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 4 }