io¶
Submodule to load/write meshes and other objects in different formats, and other I/O functionalities.
Video¶
-
class
vedo.io.
Video
(name='movie.mp4', duration=None, fps=24, backend='ffmpeg')[source]¶ Bases:
object
Class to generate a video from the specified rendering window. Program
ffmpeg
is used to create video from each generated frame. :param str name: name of the output file. :param int fps: set the number of frames per second. :param float duration: set the total duration of the video and recalculates fps accordingly. :param str ffmpeg: set path to ffmpeg program. Default value assumes ffmpeg command is in the path.
ask¶
download¶
exportWindow¶
gunzip¶
importWindow¶
load¶
-
vedo.io.
load
(inputobj, unpack=True, force=False)[source]¶ Load
Mesh
,Volume
andPicture
objects from file or from the web.The output will depend on the file extension. See examples below. Unzip on the fly, if it ends with .gz. Can load an object directly from a URL address.
- Parameters
- Examples
from vedo import datadir, load, show # Return a Mesh object g = load(datadir+'250.vtk') show(g) # Return a list of 2 meshes g = load([datadir+'250.vtk', datadir+'270.vtk']) show(g) # Return a list of meshes by reading all files in a directory # (if directory contains DICOM files then a Volume is returned) g = load('mydicomdir/') show(g) # Return a Volume. Color/Opacity transfer functions can be specified later. g = load(datadir+'embryo.slc') g.c(['y','lb','w']).alpha((0.0, 0.4, 0.9, 1)).show() # Download a file from a URL address and unzip it on the fly g = load('https://vedo.embl.es/examples/panther.stl.gz') show(g)