We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I get an error when I want to write actors to a pickle file.
import vtkplotter import pickle obj = vtkplotter.Sphere() data = {'actors': obj} with open('actors.pickle', 'wb') as f: pickle.dump(data, f)
TypeError: can't pickle Actor objects
The text was updated successfully, but these errors were encountered:
Hi, you cannot pickle vtk objects, but you can still save single or multiple object to file, eg:
from vtkplotter import * obj1 = Sphere() obj2 = Torus().pos(0,0,1) # single mesh obj1.write('mysphere.vtk') # multiple meshes/volumes write([obj1, obj2], 'myobjs.npy')
then you can read them back with vtkplotter.load() or in terminal by command line: > vtkplotter myobjs.npy
vtkplotter.load()
> vtkplotter myobjs.npy
Sorry, something went wrong.
No branches or pull requests
I get an error when I want to write actors to a pickle file.
The text was updated successfully, but these errors were encountered: