Hello everyone,
Does anyone know how to pickle an arbitrary object type like MRMLCorePython.vtkMRMLScene
in python?
I am trying to start a process from the main process by passing the function SaveSceneToSlicerDataBundleDirectory
to the multiprocessing.Process
:
from multiprocessing import Process
f = slicer.mrmlScene.SaveSceneToSlicerDataBundleDirectory
p = Process(target=f, args=("C:/Users/Tex/Desktop/TestScene",))
p.start()
But I am getting the following error:
TypeError: cannot pickle 'MRMLCorePython.vtkMRMLScene' object
I would appreciate any help.
Thank you.