pyvista.core._validation.validate.validate_transform4x4#

validate_transform4x4(transform, /, *, name='Transform')[source]#

Validate transform-like input as a 4x4 ndarray.

This function supports inputs with a 3x3 or 4x4 shape. If the input is 3x3, the array is padded using a 4x4 identity matrix.

Parameters:
transformarray_like | vtkTransform | vtkMatrix4x4 | vtkMatrix3x3 | scipy.spatial.transform.Rotation

Transformation matrix as a 3x3 or 4x4 array or vtk matrix, or a SciPy Rotation instance.

Transformation matrix as a 3x3 or 4x4 array, 3x3 or 4x4 vtkMatrix, or as a vtkTransform.

namestr, default: “Transform”

Variable name to use in the error messages if any of the validation checks fail.

Returns:
np.ndarray

Validated 4x4 transformation matrix.

See also

validate_transform3x3

Similar function for 3x3 transforms.

validate_array

Generic array validation function.