vmtkScripts reference

Script Description
vmtkactivetubes  
vmtkbifurcationprofiles compute bifurcation profiles, i.e. the bifurcation splitting lines. The script takes in input the surface and the relative centerlines, both already split into branches.
vmtkbifurcationreferencesystems compute reference systems for each bifurcation of a tree. The script takes in input the centerlines already split into branches.
vmtkbifurcationsections compute branch sections located a fixed number of spheres away from each bifurcation. The script takes in input the surface and the relative centerlines, both already split into branches.
vmtkbifurcationvectors .
vmtkboundarylayer create a prismatic boundary layer from a surface mesh and a set of vectors defined on the nodes
vmtkboundarylayer2 create a prismatic boundary layer from a surface mesh and a set of vectors defined on the nodes
vmtkboundaryreferencesystems compute the reference systems relative to each open boundary of a model; a typical use is the specification of boundary conditions for CFD simulations; reference systems are given both as origin and normal, and as origin, a first point defining the x axis with the origin and a second point defining the xy plane with the former two
vmtkbranchclipper  
vmtkbranchextractor  
vmtkbranchgeometry compute geometric parameters for each branch of a tree. The script takes in input the centerlines already split into branches.
vmtkbranchmapping  
vmtkbranchmetrics Takes a centerline and input surface, already split into branches (with centerline attributes calculated) and calculates the surface angular and abscissa metric.
vmtkbranchpatching  
vmtkbranchsections compute geometric properties of branch sections located a fixed number of spheres away from each bifurcation. The script takes in input the surface and the relative centerlines, both already split into branches.
vmtkcenterlineattributes compute centerline attributes like abscissa and parallel transport normals; this is a requried step for mapping
vmtkcenterlinegeometry compute the local geometry of centerlines in terms of curvature and torsion
vmtkcenterlineinterpolation smooth centerlines with a moving average filter
vmtkcenterlinelabeler  
vmtkcenterlinemerge merge centerline tracts belonging to the same groups
vmtkcenterlinemeshsections extract mesh sections along centerlines. The script takes in input the mesh and the relative centerlines.
vmtkcenterlinemodeller converts a centerline to an image containing the tube function
vmtkcenterlineoffsetattributes offset centerline attributes relative to a bifurcation reference system, in such a way that the abscissa of the closest point the the origin is zero, and the centerline normal at that point coincides with the bifurcation reference system normal
vmtkcenterlineresampling resample input centerlines with a spline filter
vmtkcenterlines compute centerlines from a branching tubular surface (see papers for details); seed points can be interactively selected on the surface, or specified as the barycenters of the open boundaries of the surface; if vmtk is compiled with support for TetGen, TetGen can be employed to compute the Delaunay tessellation of the input points
vmtkcenterlinesections compute geometric properties of sections located along centerlines. The script takes in input the surface and the relative centerlines.
vmtkcenterlinesmoothing smooth centerlines with a moving average filter
vmtkcenterlinestonumpy Takes a VTK centerlines vtkPolyData file and returns a nested python dictionary containing numpyarrays specifying vertex points, associated scalar data, and cell data yielding connectivity
vmtkcenterlineviewer  
vmtkdelaunayvoronoi  
vmtkdijkstradistancetopoints This class computes the geodesic distance on the graph of a surface from a set of user-selected points on the surface using the Dijkstra algorithm.
vmtkdistancetocenterlines  
vmtkdistancetospheres This computes the euclidean from a set of user-selected spheres to a surface
vmtkendpointextractor  
vmtkentityrenumber Renumber cell entity id array.
vmtkflowextensions  
vmtkgeodesicsurfaceresolution This allows the user to specify a edge-length array to be used to specify resolution for surface remeshing The array is produced by RBF interpolation of values specified by the user by positioning spheres. This version use the geodesic distance along the surface instead of the 3D euclidean distance for the RBF
vmtkicpregistration register a surface to a reference surface using the ICP algorithm
vmtkimagebinarize binarize the input image producing a label map
vmtkimagecast cast an image to a specified type
vmtkimagecompare compares an image against a reference
vmtkimagecompose compose an image based on user-specified parameters or on a reference image
vmtkimagecurvedmpr Make an MPR image from a centerline and an input image
vmtkimagefeaturecorrection correct a feature image (e.g. remove influence of bone and/or air from CT-based feature images)
vmtkimagefeatures compute a feature image for use in segmentation
vmtkimageinitialization  
vmtkimagemipviewer display a 3D image
vmtkimagemorphology apply binary or grayscale morphology filter to the input image
vmtkimagenormalize automatically label an image using multiple Otsu thresholding
vmtkimageobjectenhancement compute a feature image for use in segmentation
vmtkimageotsuthresholds automatically label an image using multiple Otsu thresholding
vmtkimagereader read an image and stores it in a vtkImageData object
vmtkimagereslice reslice an image based on user-specified parameters or on a reference image
vmtkimageseeder interactively place seeds in a 3D image
vmtkimageshiftscale shift and scale the intensity of an image and cast it to a specified type
vmtkimagesmoothing smooth an image with a Gaussian kernel or anisotropic diffusion
vmtkimagetonumpy Takes a vtkImageData object and returns a nested dictionary of numpy arrays
vmtkimagevesselenhancement compute a feature image for use in segmentation
vmtkimageviewer display a 3D image
vmtkimagevoipainter fill a cubical region of an image with a given gray level
vmtkimagevoiselector select a cubical volume of interest and get rid of the rest of the image
vmtkimagewriter write an image to disk
vmtklevelsetsegmentation  
vmtklineartoquadratic convert the elements of a mesh from linear to quadratic
vmtklineresampling resample input lines with a spline filter
vmtklocalgeometry  
vmtkmarchingcubes generate an isosurface of given level from a 3D image
vmtkmeshaddexternallayer create an external prismatic layer from the wall of a mesh and the normals on the wall.
vmtkmesharrayoperation perform an operation between arrays of two meshes and store result in the first mesh
vmtkmeshboundaryinspector  
vmtkmeshbranchclipper  
vmtkmeshclipcenterlines interactively clip a mesh using the distance to centerlines
vmtkmeshclipper interactively clip a mesh with a box
vmtkmeshcompare compares a mesh against a reference
vmtkmeshconnectivity extract the largest connected region or the closest point-connected region from a mesh
vmtkmeshcutter slicing a mesh with a plane
vmtkmeshdatareader read data associated with a mesh
vmtkmeshextractpointdata extract the magnitude value of an array for a point id
vmtkmeshgenerator generate a mesh suitable for CFD from a surface
vmtkmeshlambda2 compute lambda2 from a velocity field
vmtkmeshlinearize convert the elements of a mesh to linear
vmtkmeshmerge Merge two or three meshes into one.
vmtkmeshmergetimesteps merge multiple mesh files with different timesteps into one
vmtkmeshpolyballevaluation evaluate the polyball function on the vertices of a mesh.
vmtkmeshprojection interpolates the point data of a reference mesh onto the input mesh
vmtkmeshreader read a mesh and stores it in a vtkUnstructuredGrid object
vmtkmeshscaling scale a mesh by an isotropic factor
vmtkmeshtetrahedralize convert the elements of a mesh to linear
vmtkmeshtetrahedralize2 convert the elements of a mesh to linear
vmtkmeshtonumpy Takes a VMTK mesh (VTK Unstructured Grid) object nested python dictionary containing numpyarrays specifying Points, PointData, Cells, CellData, and CellPointIds describing connectivity
vmtkmeshtosurface convert a mesh to a surface by throwing out volume elements and (optionally) the relative points
vmtkmeshtransform transform a mesh with a provided matrix
vmtkmeshtransformtoras transform a mesh generated in XYZ image space into RAS space
vmtkmeshvectorfromcomponents create a vector array from a number of scalar arrays treated as vector components
vmtkmeshviewer display a mesh
vmtkmeshviewer2 display a mesh
vmtkmeshvolume computes the volume of a mesh
vmtkmeshvorticityhelicity compute vorticity and helicity from a velocity field
vmtkmeshwallshearrate compute wall shear rate from a velocity field, producing a surface in output
vmtkmeshwriter write a mesh to disk
vmtkmeshwriter2 write a mesh to disk
vmtknetworkeditor  
vmtknetworkextraction extract a network of approximated centerlines from a surface, the surface must have at least an opening
vmtknetworkwriter write network to disk
vmtknumpyreader reads a pickled (or hdf5) file containing a nested dictionary of numpy arrays generated byvmtkcenterlinestonumpy, vmtkimagetonumpy, or vmtksurfacetonumpy from disk and stores theobject in memory into a standard dictionary of numpy arrays.
vmtknumpytocenterlines Takes a nested python dictionary containing numpy arrays specifying vertex points, associated scalar data, and cell data specifying line connectivityand returns a VTK centerlines vtkPolyData file
vmtknumpytoimage Takes a dictionary of numpy arrays specifying dimensions, origin, spacing, and the image point data and returns a vtkImageData object.
vmtknumpytomesh Takes a nested python dictionary containing numpy arrays specifying Points, PointData, Cells, CellData, and CellPointIds describing connectivity and returns a VMTK mesh (VTK Unstructured Grid) object
vmtknumpytosurface Takes a nested python dictionary containing numpy arrays specifying vertex points, associated scalar data, and cell data specifying triangle connectivityand returns a VTK triangulated surface vtkPolyData file
vmtknumpywriter Writes a dictionary containing a nested dictionary of numpy arrays (generated byvmtkcenterlinestonumpy, vmtkimagetonumpy, or vmtksurface to numpy) to disk as eithera python pickle object or as hdf5 file
vmtkparticletracer Generate streamlines
vmtkpathlineanimator Particle or streaklines animation
vmtkpointsplitextractor  
vmtkpointtransform transform points with a provided matrix
vmtkpolyballmodeller converts a polyball to an image containing the tube function
vmtkpotentialfit  
vmtkpythonscript execute a python script contained in a file
vmtkrbfinterpolation perform RBF interpolation from a set of seeds
vmtkrenderer renderer used to make several viewers use the same rendering window
vmtkrendertoimage takes a renderer in input and saves the rendering into an image file
vmtksurfaceappend append two surfaces into a single vtkPolyData. The script does not merge coincident points, consider using vmtksurfacetriangle for this.
vmtksurfacearrayoperation perform an operation between arrays of two surfaces and store result in the first surface
vmtksurfacearraysmoothing Perform smoothing of the point array defined on the surface
vmtksurfacebooleanoperation perform a boolean operation between two surfaces
vmtksurfacecapper add caps to the holes of a surface, assigning an id to each cap for easy specification of boundary conditions.
vmtksurfacecelldatatopointdata convert cell data arrays to point data surface arrays
vmtksurfacecenterlineprojection  
vmtksurfacecliploop Clip input surface using a loop
vmtksurfaceclipper interactively clip a surface with a box
vmtksurfacecompare compares a surface against a baseline
vmtksurfaceconnectivity extract the largest connected region, the closest point-connected region or the scalar-connected region from a surface
vmtksurfacecurvature compute curvature of an input surface, optionally reporting results back to a reference surface (by point id)
vmtksurfacedecimation reduce the number of triangles in a surface
vmtksurfacedistance compute the pointwise minimum distance of the input surface from a reference surface
vmtksurfaceendclipper interactively clip a tubular surface with normals estimated at seed locations. It is recomended that the option to clip based on centerlines normals is enabled to increase the accuracy of the clipping. If desired, a centerline containing the Frenet Tangent Array must be fed in along with the surface. This is generated by passing a centerline through the vmtkcenterlinegeometry script.
vmtksurfaceextractannularwalls Extract wall surfaces from an annular-cylindric surface.
vmtksurfaceextractinnercylinder Extract inner surface from an annular-cylindric volume.
vmtksurfacekiteremoval remove small kites in a surface mesh to avoid Taubin smoothing artifacts
vmtksurfaceloopextraction  
vmtksurfacemassproperties compute the volume of a closed surface.
vmtksurfacemodeller converts a surface to an image containing the signed distance transform from the surface points
vmtksurfacenormals compute normals to a surface
vmtksurfacepointdatatocelldata convert point data arrays to cell data surface arrays
vmtksurfacepolyballevaluation evaluate the polyball function on the vertices of a surface.
vmtksurfaceprojection interpolates the point data of a reference surface onto the input surface based on minimum distance criterion
vmtksurfacereader read a surface and store it in a vtkPolyData object
vmtksurfacereferencesystemtransform translate and rotate a surface in order to orient its reference system with a target reference system
vmtksurfaceregiondrawing draw a closed contour on a surface and generate a distance field on the surface
vmtksurfaceremeshing remesh a surface using quality triangles
vmtksurfaceresolution This allows the user to specify a edge-length array to be used to specify resolution for surface remeshing The array is produced by RBF interpolation of values specified by the user by positioning spheres
vmtksurfacescaling scale a surface by an isotropic factor, or x,y,z directions by separate factors
vmtksurfacesmoothing smooth a surface using Taubin’s algorithm
vmtksurfacesubdivision subdivide a triangulated surface
vmtksurfacetomesh convert surface to a mesh
vmtksurfacetonumpy Takes a VTK triangulated surface vtkPolyData file (optionally containing point data scalar arrays) and returns a nested python dictionary containing numpy arrays specifying vertex points, associated scalar data, and cell data yielding triangle connectivity
vmtksurfacetransform transform a surface with a provided matrix
vmtksurfacetransforminteractive interactively transform a surface to another surface
vmtksurfacetransformtoras transform a surface generated in XYZ image space into RAS space
vmtksurfacetriangle convert all cells in a surface to linear triangles.
vmtksurfaceviewer display a surface
vmtksurfacewriter write surface to disk
vmtksurfacewriter2 write surface to disk
vmtksurfmesh wrapper around surfmesh surface mesh generator by Gordan Stuhne
vmtktetgen wrapper around TetGen tetrahedral mesh generator by Hang Si (http://tetgen.berlios.de/)
vmtktetringenerator generate input files for the newtetr CFD solver
vmtkthreshold Extract part of surface or mesh with cell entitiy ids between given thresholds.