pyvista.set_vtkwriter_mode#
- set_vtkwriter_mode(
- vtk_writer: _VTKWriterType,
- use_binary: bool = True,
- compression: _CompressionOptions = 'zlib',
Set any vtk writer to write as binary or ascii.
- Parameters:
- vtk_writer
The vtk writer instance to be configured. Must be one of vtkDataWriter, vtkPLYWriter, vtkSTLWriter, vtkXMLWriter.
- use_binarybool, default:
True
If
True
, the writer is set to write files in binary format. IfFalse
, the writer is set to write files in ASCII format.- compression
str
orNone
, default: ‘zlib’ The compression type to use when
use_binary
isTrue
andvtk_writer
is of type vtkXMLWriter. This argument has no effect otherwise. Acceptable values are'zlib'
,'lz4'
,'lzma'
, andNone
.None
indicates no compression.Added in version 0.47.
- Returns:
- vtkDataWriter | vtkPLYWriter | vtkSTLWriter | vtkXMLWriter
The configured vtk writer instance.