MCPcopy Create free account
hub / github.com/Kitware/VTK / serialize

Function serialize

Serialization/Manager/Testing/Python/TestDataSetImportExport.py:31–38  ·  view source on GitHub ↗
(vtk_object: vtkObjectBase)

Source from the content-addressed store, hash-verified

29
30
31def serialize(vtk_object: vtkObjectBase) -> vtkCharArray:
32 manager = vtkObjectManager()
33 manager.Initialize()
34 manager.RegisterObject(vtk_object)
35 manager.UpdateStatesFromObjects()
36 # Equivalent to when using files:
37 # manager.Export("data_object")
38 return manager.ExportToBytes()
39
40
41def deserialize(serialized_data: vtkCharArray) -> vtkObjectBase:

Callers 12

testMethod · 0.70
testSceneManagementMethod · 0.70
testMethod · 0.70
test_polydataMethod · 0.70
test_image_dataMethod · 0.70
testMethod · 0.70
testMethod · 0.70
testMethod · 0.70
testMethod · 0.70
testMethod · 0.70

Calls 4

ExportToBytesMethod · 0.80
InitializeMethod · 0.45
RegisterObjectMethod · 0.45

Tested by

no test coverage detected