spateo.tdr.models.utilities.io ============================== .. py:module:: spateo.tdr.models.utilities.io Functions --------- .. autoapisummary:: spateo.tdr.models.utilities.io.read_model spateo.tdr.models.utilities.io.save_model Module Contents --------------- .. py:function:: read_model(filename: str) Read any file type supported by vtk or meshio. :param filename: The string path to the file to read. :returns: Wrapped PyVista dataset. .. py:function:: save_model(model: Union[pyvista.DataSet, pyvista.MultiBlock], filename: str, binary: bool = True, texture: Union[str, numpy.ndarray] = None) Save the pvvista/vtk model to vtk/vtm file. :param model: A reconstructed model. :param filename: Filename of output file. Writer type is inferred from the extension of the filename. If model is a pyvista.MultiBlock object, please enter a filename ending with ``.vtm``; else please enter a filename ending with ``.vtk``. :param binary: If True, write as binary. Otherwise, write as ASCII. Binary files write much faster than ASCII and have a smaller file size. :param texture: Write a single texture array to file when using a PLY file. Texture array must be a 3 or 4 component array with the datatype np.uint8. Array may be a cell array or a point array, and may also be a string if the array already exists in the PolyData. If a string is provided, the texture array will be saved to disk as that name. If an array is provided, the texture array will be saved as 'RGBA'