pyvista.core._validation.validate.validate_transform4x4#
- validate_transform4x4(transform, /, *, must_be_finite=True, 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:
- transform
TransformLike
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.
- must_be_finitebool, default:
True
Check
if all elements of the array are finite, i.e. notinfinity
and not Not a Number (NaN
).- name
str
, default: “Transform” Variable name to use in the error messages if any of the validation checks fail.
- transform
- Returns:
np.ndarray
Validated 4x4 transformation matrix.
See also
validate_transform3x3
Similar function for 3x3 transforms.
validate_array
Generic array validation function.