Skip to content

Commit

Permalink
chore: Build Models
Browse files Browse the repository at this point in the history
  • Loading branch information
dbirman authored and github-actions[bot] committed Sep 24, 2024
1 parent 30e443b commit 59faec4
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 18 deletions.
100 changes: 85 additions & 15 deletions models/csharp/PinpointModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,114 @@
[Serializable]
public struct AffineTransformModel
{
public string Name;
public string Prefix;
public Vector3 Scaling;
public Vector3 Rotation;

public AffineTransformModel(Vector3 scaling, Vector3 rotation)
public AffineTransformModel(string name, string prefix, Vector3 scaling, Vector3 rotation)
{
Name = name;
Prefix = prefix;
Scaling = scaling;
Rotation = rotation;
}
}


[Serializable]
public struct CraniotomyGroup
public struct CraniotomyModel
{
public string Atlas;
public CraniotomyModel[] Data;
public int Index;
public Vector2 Size;
public Vector3 Position;

public CraniotomyGroup(string atlas, CraniotomyModel[] data)
public CraniotomyModel(int index, Vector2 size, Vector3 position)
{
Atlas = atlas;
Data = data;
Index = index;
Size = size;
Position = position;
}
}


[Serializable]
public struct CraniotomyModel
public struct InsertionModel
{
public int Index;
public Vector2 Size;
public Vector3 Position;
public bool Rectangle;
public Vector3 Angles;
public string AtlasName;
public string TransformName;
public Vector3 ReferenceCoord;

public CraniotomyModel(int index, Vector2 size, Vector3 position, bool rectangle)
public InsertionModel(Vector3 position, Vector3 angles, string atlasName, string transformName, Vector3 referenceCoord)
{
Index = index;
Size = size;
Position = position;
Rectangle = rectangle;
Angles = angles;
AtlasName = atlasName;
TransformName = transformName;
ReferenceCoord = referenceCoord;
}
}


[Serializable]
public struct ProbeModel
{
public InsertionModel Insertion;
public string Uuid;
public string Name;
public Color Color;

public ProbeModel(InsertionModel insertion, string uuid, string name, Color color)
{
Insertion = insertion;
Uuid = uuid;
Name = name;
Color = color;
}
}


[Serializable]
public struct RigModel
{
public string Name;
public string Image;
public Vector3 Position;
public Vector3 Rotation;
public bool Active;

public RigModel(string name, string image, Vector3 position, Vector3 rotation, bool active)
{
Name = name;
Image = image;
Position = position;
Rotation = rotation;
Active = active;
}
}

[Serializable]
public struct SceneModel
{
public string AtlasName;
public string TransformName;
public ProbeModel[] Probes;
public RigModel[] Rigs;
public CraniotomyModel[] Craniotomies;
public string[] SceneData;
public string Settings;

public SceneModel(string atlasName, string transformName, ProbeModel[] probes, RigModel[] rigs, CraniotomyModel[] craniotomies, string[] sceneData, string settings)
{
AtlasName = atlasName;
TransformName = transformName;
Probes = probes;
Rigs = rigs;
Craniotomies = craniotomies;
SceneData = sceneData;
Settings = settings;
}
}

2 changes: 1 addition & 1 deletion models/schemas/pinpoint/AffineTransformModel.json
Original file line number Diff line number Diff line change
@@ -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"}
{"$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"}
1 change: 0 additions & 1 deletion models/schemas/pinpoint/CraniotomyGroup.json

This file was deleted.

2 changes: 1 addition & 1 deletion models/schemas/pinpoint/CraniotomyModel.json
Original file line number Diff line number Diff line change
@@ -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"}
{"$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"}
1 change: 1 addition & 0 deletions models/schemas/pinpoint/InsertionModel.json
Original file line number Diff line number Diff line change
@@ -0,0 +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"}
1 change: 1 addition & 0 deletions models/schemas/pinpoint/ProbeModel.json
Original file line number Diff line number Diff line change
@@ -0,0 +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"}
1 change: 1 addition & 0 deletions models/schemas/pinpoint/RigModel.json
Original file line number Diff line number Diff line change
@@ -0,0 +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": {"allOf": [{"$ref": "#/$defs/Vector3"}], "default": {"x": 0.0, "y": 0.0, "z": 0.0}}, "Rotation": {"allOf": [{"$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"}
1 change: 1 addition & 0 deletions models/schemas/pinpoint/SceneModel.json
Original file line number Diff line number Diff line change
@@ -0,0 +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"}, "CraniotomyModel": {"properties": {"Index": {"title": "Index", "type": "integer"}, "Size": {"$ref": "#/$defs/Vector2"}, "Position": {"$ref": "#/$defs/Vector3"}}, "required": ["Index", "Size", "Position"], "title": "CraniotomyModel", "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"}, "ProbeModel": {"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"}, "RigModel": {"properties": {"Name": {"title": "Name", "type": "string"}, "Image": {"title": "Image", "type": "string"}, "Position": {"allOf": [{"$ref": "#/$defs/Vector3"}], "default": {"x": 0.0, "y": 0.0, "z": 0.0}}, "Rotation": {"allOf": [{"$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"}, "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": {"AtlasName": {"title": "Atlasname", "type": "string"}, "TransformName": {"title": "Transformname", "type": "string"}, "Probes": {"items": {"$ref": "#/$defs/ProbeModel"}, "title": "Probes", "type": "array"}, "Rigs": {"items": {"$ref": "#/$defs/RigModel"}, "title": "Rigs", "type": "array"}, "Craniotomies": {"items": {"$ref": "#/$defs/CraniotomyModel"}, "title": "Craniotomies", "type": "array"}, "SceneData": {"items": {"type": "string"}, "title": "Scenedata", "type": "array"}, "Settings": {"title": "Settings", "type": "string"}}, "required": ["AtlasName", "TransformName", "Probes", "Rigs", "Craniotomies", "SceneData", "Settings"], "title": "SceneModel", "type": "object"}

0 comments on commit 59faec4

Please sign in to comment.