Submodule extending the
vtkImageActor object functionality.
Derived class of
vtkImageActor. Used to represent 2D pictures. Can be instantiated with a path file name or with a numpy array.
Use Picture.shape to access the number of pixels in x and y.
Set/get picture’s transparency.
blend(pic, alpha1=0.5, alpha2=0.5)¶
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.
Return an exact copy of the input Picture. If transform is True, it is given the same scaling and position.
crop(top=None, bottom=None, right=None, left=None)¶
Extract one component of the rgb image
fft(mode='magnitude', logscale=12, center=True)¶
Fast Fourier transform of a picture.
logscale (float) – if non-zero, take the logarithm of the intensity and scale it by this factor.
mode (str) – either [magnitude, real, imaginary, complex], compute the point array data accordingly.
center (bool) – shift constant zero-frequency to the center of the image for display. (FFT converts spatial images into frequency space, but puts the zero frequency at the origin)
Return the underlying
Mirror picture along x or y axis.
Resize the image by specifying the number of pixels in width and height. If left to zero, it will be automatically calculated to keep the original aspect ratio.
newsize (list) – shape of picture as [npx, npy]
Reverse Fast Fourier transform of a picture.
text(txt, pos=(0, 0, 0), s=1, c=None, alpha=1, bg=None, font='Theemim', dpi=500, justify='bottom-left')¶
Build an image from a string.
Create a polygonal Mesh from a Picture by filling regions with pixels luminosity above a specified value.
Convert an image to polygonal data (quads), with each polygon vertex assigned a RGBA value.
Write picture to file as png or jpg.