optica-core 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optica-core",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Shared frontend core of the Optica viewers",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "type": "module",
@@ -40,9 +40,13 @@ export interface AnnotationsSet {
40
40
  toCSVRows(): string[][]
41
41
  }
42
42
 
43
- export const ANNOTATIONS_CSV_HEADER =["Group", "Group Label", "Landmark Label", "Color", "Pose_X", "Pose_Y", "Image", "ImageLabel", "X", "Y", "Z"]
43
+ export const LANDMARK_CSV_HEADER =["Group", "Group Label", "Landmark Label", "Color"]
44
+ export const POSE_CSV_HEADER = ["Pose_X", "Pose_Y", "Image", "ImageLabel"]
45
+ export const POSITION_CSV_HEADER = ["X", "Y", "Z"]
44
46
 
45
- // one CSV row (ANNOTATIONS_CSV_HEADER), `group`: label of the distance or profile of the landmark
47
+ export const DEFAULT_CSV_HEADER = [...LANDMARK_CSV_HEADER, ...POSE_CSV_HEADER, ...POSITION_CSV_HEADER]
48
+
49
+ // one CSV row (DEFAULT_CSV_HEADER), `group`: label of the distance or profile of the landmark
46
50
  export function landmarkCSVRow(type: string, group: string, landmark: Landmark): string[] {
47
51
  const { marker, image } = landmark.pose
48
52
  const position = landmark.position
@@ -198,7 +202,7 @@ export class Annotations implements AnnotationsSet {
198
202
  }
199
203
 
200
204
  csvHeader(): string[] {
201
- return ANNOTATIONS_CSV_HEADER
205
+ return DEFAULT_CSV_HEADER
202
206
  }
203
207
 
204
208
  // one row per landmark, the ones of a distance carry its label (no header)