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

Method deserialize

Serialization/Manager/Testing/Python/TestVolume.py:103–127  ·  view source on GitHub ↗
(status: dict)

Source from the content-addressed store, hash-verified

101 return status
102
103 def deserialize(status: dict):
104
105 if not len(status.get('ids')):
106 return
107
108 deser_om.PruneUnusedBlobs()
109
110 for object_id in status.get('ids'):
111 new_mtime = status.get('mtimes').get(object_id)
112 last_mtime = last_mtimes.get(object_id)
113 if last_mtime is not None and new_mtime is not None:
114 if last_mtime < new_mtime:
115 deser_om.UnRegisterState(object_id)
116 deser_om.RegisterState(ser_om.GetState(object_id))
117 elif last_mtime is None:
118 deser_om.RegisterState(ser_om.GetState(object_id))
119 last_mtimes.update({object_id: new_mtime})
120 for hash_text, blob in status.get('hashes').items():
121 deser_om.RegisterBlob(hash_text, blob)
122
123 deser_om.UpdateObjectsFromStates()
124
125 renderWindow = deser_om.GetObjectAtId(id_rwi).GetRenderWindow()
126 renderWindow.SetPosition(400, 1)
127 renderWindow.Render()
128
129 id_rwi = ser_om.RegisterObject(interactor)
130

Callers

nothing calls this directly

Calls 13

RenderMethod · 0.65
getMethod · 0.45
PruneUnusedBlobsMethod · 0.45
UnRegisterStateMethod · 0.45
RegisterStateMethod · 0.45
GetStateMethod · 0.45
updateMethod · 0.45
itemsMethod · 0.45
RegisterBlobMethod · 0.45
GetRenderWindowMethod · 0.45
GetObjectAtIdMethod · 0.45

Tested by

no test coverage detected