VMTKNUMPYTOMESH(1)
π NAME π
vmtknumpytomesh β it's a vmtk script, bestie, and its whole name is literally vmtknumpytomesh. That's it, that's the name. She's giving "User Commands" energy if you were wondering what manual section she lives in. πΈ
β¨ DESCRIPTION β¨
Okay so first things first: there's some automatic piping going on for vmtkNumpyToMesh, plus option parsing for vmtkNumpyToMesh. Very boilerplate, very "the script wires itself up", love that for her. π
Now the actual tea. π
vmtkNumpyToMesh takes a nested python dictionary whose values are numpy arrays, and those arrays specify Points, PointData, Cells, CellData, and CellPointIds β which is the stuff that describes the connectivity, iykyk. And then she hands you back a VMTK mesh, aka a VTK Unstructured Grid object. Iconic. β¨
π«Ά Input arguments
Here's everything you can feed her on the way in:
-idId (str,1); default=0β the script id. Just an id. She needs one, okay? π-handleSelf (self,1) β a handle to self. Self-care, literally. πͺ-disabledDisabled (bool,1); default=0β turns off execution and piping. The "not me today" switch. π-iArrayDict (dict,1) β the input array dictionary. Your whole lil nested dict of numpy arrays goes right here. π-ifileArrayDictInputFileName (str,1) β the filename for the defaultArrayDictreader. So instead of handing her the dict directly, you point at a file and she reads it. π¦-flattenFlattenListOfCells β enable this to convert cells that are formatted as a list of numpy arrays into the default flat structure. That's the entire vibe of this flag, no cap. π§-ofileMeshOutputFileName (str,1) β the filename for the defaultMeshwriter. Where the mesh goes when she's done. π
π Output arguments
And here's what she gives you back:
-idId (str,1); default=0β the script id again. Same girl, output side. π-handleSelf (self,1) β handle to self again. She contains multitudes (and also references herself twice). π-oMesh (vtkUnstructuredGrid,1) β the output mesh!! YourvtkUnstructuredGrid. The main character. β
Heads up bestie:-idand-handleshow up in both the input arguments and the output arguments, and that's not a typo, that's just how the page is. Both are real, both count. π«Ά
That's the whole scroll, fr fr. This was vmtknumpytomesh 1.5, dated April 2026 β slay, she's from the future and she still only does one thing: numpy dict in, unstructured grid out. Periodt. ππ
π¦ where this page comes from
- ubuntu stonking: vmtk 1.5.0+dfsg1-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms