io

load_polydata(file_name[, is_mni_obj])

Load a vtk polydata to a supported format file.

save_polydata(polydata, file_name[, binary, …])

Save a vtk polydata to a supported format file.

set_input(vtk_object, inp)

Set Generic input function which takes into account VTK 5 or 6.

load_polydata

fury.io.load_polydata(file_name, is_mni_obj=False)[source]

Load a vtk polydata to a supported format file.

Supported file formats are OBJ, VTK, FIB, PLY, STL and XML

Parameters
file_namestring
is_mni_objbool
Returns
outputvtkPolyData

save_polydata

fury.io.save_polydata(polydata, file_name, binary=False, color_array_name=None, is_mni_obj=False)[source]

Save a vtk polydata to a supported format file.

Save formats can be VTK, FIB, PLY, STL and XML.

Parameters
polydatavtkPolyData
file_namestring
binarybool
color_array_name: ndarray
is_mni_objbool

set_input

fury.io.set_input(vtk_object, inp)[source]

Set Generic input function which takes into account VTK 5 or 6.

Parameters
vtk_object: vtk object
inp: vtkPolyData or vtkImageData or vtkAlgorithmOutput
Returns
vtk_object

Notes

This can be used in the following way::

from fury.utils import set_input poly_mapper = set_input(vtk.vtkPolyDataMapper(), poly_data)