Submodule extending the vtkImageActor object functionality.


class vedo.picture.Picture(obj=None)[source]

Bases: vtkRenderingCorePython.vtkImageActor, vedo.base.Base3DProp

Derived class of vtkImageActor. Used to represent 2D pictures. Can be instantiated with a path file name or with a numpy array.

rotateImage.py rotateImage.py


Set/get picture’s transparency.

blend(pic, alpha1=0.5, alpha2=0.5)[source]

Take L, LA, RGB, or RGBA images as input and blends them according to the alpha values and/or the opacity setting for each input.

crop(top=None, bottom=None, right=None, left=None)[source]

Crop picture.

  • top (float) – fraction to crop from the top margin

  • bottom (float) – fraction to crop from the bottom margin

  • left (float) – fraction to crop from the left margin

  • right (float) – fraction to crop from the right margin


Return the underlying vtkImagaData object.


Mirror picture along x or y axis.

text(txt, pos=0, 0, 0, s=1, c=None, alpha=1, bg=None, font='Gula', dpi=500, justify='bottom-left')[source]

Build an image from a string.