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

Function pwfSerializer

Web/Python/vtkmodules/web/render_window_serializer.py:1063–1082  ·  view source on GitHub ↗
(parent, instance, objId, context, depth)

Source from the content-addressed store, hash-verified

1061# -----------------------------------------------------------------------------
1062
1063def pwfSerializer(parent, instance, objId, context, depth):
1064 nodes = []
1065
1066 for i in range(instance.GetSize()):
1067 # x, y, midpoint, sharpness
1068 node = [0, 0, 0, 0]
1069 instance.GetNodeValue(i, node)
1070 nodes.append(node)
1071
1072 return {
1073 "parent": getReferenceId(parent),
1074 "id": objId,
1075 "type": class_name(instance),
1076 "properties": {
1077 "range": list(instance.GetRange()),
1078 "clamping": instance.GetClamping(),
1079 "allowDuplicateScalars": instance.GetAllowDuplicateScalars(),
1080 "nodes": nodes,
1081 },
1082 }
1083
1084# -----------------------------------------------------------------------------
1085

Callers

nothing calls this directly

Calls 9

getReferenceIdFunction · 0.90
class_nameFunction · 0.85
GetClampingMethod · 0.80
rangeClass · 0.50
listClass · 0.50
GetSizeMethod · 0.45
GetNodeValueMethod · 0.45
appendMethod · 0.45
GetRangeMethod · 0.45

Tested by

no test coverage detected