Skip to content

Commit 8f3e7b9

Browse files
chore: Build Models (#53)
Co-authored-by: github-merge-queue[bot] <118344674+github-merge-queue[bot]@users.noreply.github.com>
1 parent 3ba93ca commit 8f3e7b9

16 files changed

+99
-26
lines changed

models/csharp/PinpointModels.cs

Lines changed: 85 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,114 @@
44
[Serializable]
55
public struct AffineTransformModel
66
{
7+
public string Name;
8+
public string Prefix;
79
public Vector3 Scaling;
810
public Vector3 Rotation;
911

10-
public AffineTransformModel(Vector3 scaling, Vector3 rotation)
12+
public AffineTransformModel(string name, string prefix, Vector3 scaling, Vector3 rotation)
1113
{
14+
Name = name;
15+
Prefix = prefix;
1216
Scaling = scaling;
1317
Rotation = rotation;
1418
}
1519
}
1620

21+
1722
[Serializable]
18-
public struct CraniotomyGroup
23+
public struct CraniotomyModel
1924
{
20-
public string Atlas;
21-
public CraniotomyModel[] Data;
25+
public int Index;
26+
public Vector2 Size;
27+
public Vector3 Position;
2228

23-
public CraniotomyGroup(string atlas, CraniotomyModel[] data)
29+
public CraniotomyModel(int index, Vector2 size, Vector3 position)
2430
{
25-
Atlas = atlas;
26-
Data = data;
31+
Index = index;
32+
Size = size;
33+
Position = position;
2734
}
2835
}
2936

3037

3138
[Serializable]
32-
public struct CraniotomyModel
39+
public struct InsertionModel
3340
{
34-
public int Index;
35-
public Vector2 Size;
3641
public Vector3 Position;
37-
public bool Rectangle;
42+
public Vector3 Angles;
43+
public string AtlasName;
44+
public string TransformName;
45+
public Vector3 ReferenceCoord;
3846

39-
public CraniotomyModel(int index, Vector2 size, Vector3 position, bool rectangle)
47+
public InsertionModel(Vector3 position, Vector3 angles, string atlasName, string transformName, Vector3 referenceCoord)
4048
{
41-
Index = index;
42-
Size = size;
4349
Position = position;
44-
Rectangle = rectangle;
50+
Angles = angles;
51+
AtlasName = atlasName;
52+
TransformName = transformName;
53+
ReferenceCoord = referenceCoord;
54+
}
55+
}
56+
57+
58+
[Serializable]
59+
public struct ProbeModel
60+
{
61+
public InsertionModel Insertion;
62+
public string Uuid;
63+
public string Name;
64+
public Color Color;
65+
66+
public ProbeModel(InsertionModel insertion, string uuid, string name, Color color)
67+
{
68+
Insertion = insertion;
69+
Uuid = uuid;
70+
Name = name;
71+
Color = color;
72+
}
73+
}
74+
75+
76+
[Serializable]
77+
public struct RigModel
78+
{
79+
public string Name;
80+
public string Image;
81+
public Vector3 Position;
82+
public Vector3 Rotation;
83+
public bool Active;
84+
85+
public RigModel(string name, string image, Vector3 position, Vector3 rotation, bool active)
86+
{
87+
Name = name;
88+
Image = image;
89+
Position = position;
90+
Rotation = rotation;
91+
Active = active;
92+
}
93+
}
94+
95+
[Serializable]
96+
public struct SceneModel
97+
{
98+
public string AtlasName;
99+
public string TransformName;
100+
public ProbeModel[] Probes;
101+
public RigModel[] Rigs;
102+
public CraniotomyModel[] Craniotomies;
103+
public string[] SceneData;
104+
public string Settings;
105+
106+
public SceneModel(string atlasName, string transformName, ProbeModel[] probes, RigModel[] rigs, CraniotomyModel[] craniotomies, string[] sceneData, string settings)
107+
{
108+
AtlasName = atlasName;
109+
TransformName = transformName;
110+
Probes = probes;
111+
Rigs = rigs;
112+
Craniotomies = craniotomies;
113+
SceneData = sceneData;
114+
Settings = settings;
45115
}
46116
}
47117

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"$defs": {"Vector3": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}, "z": {"default": 0.0, "title": "Z", "type": "number"}}, "title": "Vector3", "type": "object"}}, "description": "Response format for the manipulator angles.\n\n:param angles: Position of the manipulator.\n:type angles: Vector3", "properties": {"Angles": {"allOf": [{"$ref": "#/$defs/Vector3"}], "default": {"x": 0.0, "y": 0.0, "z": 0.0}}, "Error": {"default": "", "title": "Error", "type": "string"}}, "title": "AngularResponse", "type": "object"}
1+
{"$defs": {"Vector3": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}, "z": {"default": 0.0, "title": "Z", "type": "number"}}, "title": "Vector3", "type": "object"}}, "description": "Response format for the manipulator angles.\n\n:param angles: Position of the manipulator.\n:type angles: Vector3", "properties": {"Angles": {"$ref": "#/$defs/Vector3", "default": {"x": 0.0, "y": 0.0, "z": 0.0}}, "Error": {"default": "", "title": "Error", "type": "string"}}, "title": "AngularResponse", "type": "object"}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"$defs": {"Vector4": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}, "z": {"default": 0.0, "title": "Z", "type": "number"}, "w": {"default": 0.0, "title": "W", "type": "number"}}, "title": "Vector4", "type": "object"}}, "description": "Response format for requesting available manipulators.\n\n:param manipulators: List of manipulators.\n:type manipulators: list[str]\n:param num_axes: Number of axes for the manipulators.\n:type num_axes: int\n:param dimensions: Dimensions of the manipulators (3-axis manipulators should set w to 0).\n:type dimensions: Vector4\n:param error: Error message if any.\n:type error: str", "properties": {"Manipulators": {"items": {"type": "string"}, "title": "Manipulators", "type": "array"}, "NumAxes": {"default": 0, "minimum": -1, "title": "Numaxes", "type": "integer"}, "Dimensions": {"allOf": [{"$ref": "#/$defs/Vector4"}], "default": {"x": 0.0, "y": 0.0, "z": 0.0, "w": 0.0}}, "Error": {"default": "", "title": "Error", "type": "string"}}, "title": "GetManipulatorsResponse", "type": "object"}
1+
{"$defs": {"Vector4": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}, "z": {"default": 0.0, "title": "Z", "type": "number"}, "w": {"default": 0.0, "title": "W", "type": "number"}}, "title": "Vector4", "type": "object"}}, "description": "Response format for requesting available manipulators.\n\n:param manipulators: List of manipulators.\n:type manipulators: list[str]\n:param num_axes: Number of axes for the manipulators.\n:type num_axes: int\n:param dimensions: Dimensions of the manipulators (3-axis manipulators should set w to 0).\n:type dimensions: Vector4\n:param error: Error message if any.\n:type error: str", "properties": {"Manipulators": {"items": {"type": "string"}, "title": "Manipulators", "type": "array"}, "NumAxes": {"default": 0, "minimum": -1, "title": "Numaxes", "type": "integer"}, "Dimensions": {"$ref": "#/$defs/Vector4", "default": {"x": 0.0, "y": 0.0, "z": 0.0, "w": 0.0}}, "Error": {"default": "", "title": "Error", "type": "string"}}, "title": "GetManipulatorsResponse", "type": "object"}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"$defs": {"Vector4": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}, "z": {"default": 0.0, "title": "Z", "type": "number"}, "w": {"default": 0.0, "title": "W", "type": "number"}}, "title": "Vector4", "type": "object"}}, "description": "Response format for the manipulator position.\n\n:param position: Position of the manipulator.\n:type position: Vector4\n:param error: Error message if any.\n:type error: str", "properties": {"Position": {"allOf": [{"$ref": "#/$defs/Vector4"}], "default": {"x": 0.0, "y": 0.0, "z": 0.0, "w": 0.0}}, "Error": {"default": "", "title": "Error", "type": "string"}}, "title": "PositionalResponse", "type": "object"}
1+
{"$defs": {"Vector4": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}, "z": {"default": 0.0, "title": "Z", "type": "number"}, "w": {"default": 0.0, "title": "W", "type": "number"}}, "title": "Vector4", "type": "object"}}, "description": "Response format for the manipulator position.\n\n:param position: Position of the manipulator.\n:type position: Vector4\n:param error: Error message if any.\n:type error: str", "properties": {"Position": {"$ref": "#/$defs/Vector4", "default": {"x": 0.0, "y": 0.0, "z": 0.0, "w": 0.0}}, "Error": {"default": "", "title": "Error", "type": "string"}}, "title": "PositionalResponse", "type": "object"}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"$defs": {"Vector3": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}, "z": {"default": 0.0, "title": "Z", "type": "number"}}, "title": "Vector3", "type": "object"}}, "properties": {"Scaling": {"$ref": "#/$defs/Vector3"}, "Rotation": {"$ref": "#/$defs/Vector3"}}, "required": ["Scaling", "Rotation"], "title": "AffineTransformModel", "type": "object"}
1+
{"$defs": {"Vector3": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}, "z": {"default": 0.0, "title": "Z", "type": "number"}}, "title": "Vector3", "type": "object"}}, "properties": {"Name": {"title": "Name", "type": "string"}, "Prefix": {"title": "Prefix", "type": "string"}, "Scaling": {"$ref": "#/$defs/Vector3"}, "Rotation": {"$ref": "#/$defs/Vector3"}}, "required": ["Name", "Prefix", "Scaling", "Rotation"], "title": "AffineTransformModel", "type": "object"}

models/schemas/pinpoint/CraniotomyGroup.json

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"$defs": {"Vector2": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}}, "title": "Vector2", "type": "object"}, "Vector3": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}, "z": {"default": 0.0, "title": "Z", "type": "number"}}, "title": "Vector3", "type": "object"}}, "properties": {"Index": {"title": "Index", "type": "integer"}, "Size": {"$ref": "#/$defs/Vector2"}, "Position": {"$ref": "#/$defs/Vector3"}, "Rectangle": {"default": false, "title": "Rectangle", "type": "boolean"}}, "required": ["Index", "Size", "Position"], "title": "CraniotomyModel", "type": "object"}
1+
{"$defs": {"Vector2": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}}, "title": "Vector2", "type": "object"}, "Vector3": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}, "z": {"default": 0.0, "title": "Z", "type": "number"}}, "title": "Vector3", "type": "object"}}, "properties": {"Index": {"title": "Index", "type": "integer"}, "Size": {"$ref": "#/$defs/Vector2"}, "Position": {"$ref": "#/$defs/Vector3"}}, "required": ["Index", "Size", "Position"], "title": "CraniotomyModel", "type": "object"}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"$defs": {"Vector3": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}, "z": {"default": 0.0, "title": "Z", "type": "number"}}, "title": "Vector3", "type": "object"}}, "properties": {"Position": {"$ref": "#/$defs/Vector3"}, "Angles": {"$ref": "#/$defs/Vector3"}, "AtlasName": {"title": "Atlasname", "type": "string"}, "TransformName": {"title": "Transformname", "type": "string"}, "ReferenceCoord": {"$ref": "#/$defs/Vector3"}}, "required": ["Position", "Angles", "AtlasName", "TransformName", "ReferenceCoord"], "title": "InsertionModel", "type": "object"}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"$defs": {"Color": {"properties": {"r": {"default": 1, "maximum": 1.0, "minimum": 0.0, "title": "R", "type": "number"}, "g": {"default": 1, "maximum": 1.0, "minimum": 0.0, "title": "G", "type": "number"}, "b": {"default": 1, "maximum": 1.0, "minimum": 0.0, "title": "B", "type": "number"}, "a": {"default": 1, "maximum": 1.0, "minimum": 0.0, "title": "A", "type": "number"}}, "title": "Color", "type": "object"}, "InsertionModel": {"properties": {"Position": {"$ref": "#/$defs/Vector3"}, "Angles": {"$ref": "#/$defs/Vector3"}, "AtlasName": {"title": "Atlasname", "type": "string"}, "TransformName": {"title": "Transformname", "type": "string"}, "ReferenceCoord": {"$ref": "#/$defs/Vector3"}}, "required": ["Position", "Angles", "AtlasName", "TransformName", "ReferenceCoord"], "title": "InsertionModel", "type": "object"}, "Vector3": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}, "z": {"default": 0.0, "title": "Z", "type": "number"}}, "title": "Vector3", "type": "object"}}, "properties": {"Insertion": {"$ref": "#/$defs/InsertionModel"}, "Uuid": {"title": "Uuid", "type": "string"}, "Name": {"title": "Name", "type": "string"}, "Color": {"$ref": "#/$defs/Color"}}, "required": ["Insertion", "Uuid", "Name", "Color"], "title": "ProbeModel", "type": "object"}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"$defs": {"Vector3": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}, "z": {"default": 0.0, "title": "Z", "type": "number"}}, "title": "Vector3", "type": "object"}}, "properties": {"Name": {"title": "Name", "type": "string"}, "Image": {"title": "Image", "type": "string"}, "Position": {"$ref": "#/$defs/Vector3", "default": {"x": 0.0, "y": 0.0, "z": 0.0}}, "Rotation": {"$ref": "#/$defs/Vector3", "default": {"x": 0.0, "y": 0.0, "z": 0.0}}, "Active": {"title": "Active", "type": "boolean"}}, "required": ["Name", "Image", "Active"], "title": "RigModel", "type": "object"}

0 commit comments

Comments
 (0)