You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
522 B

  1. export class SegmentationItem {
  2. constructor(
  3. public id: number,
  4. public uuid: string,
  5. public label: number,
  6. public points: number[]
  7. ) {}
  8. static valueOf({
  9. id,
  10. uuid,
  11. label,
  12. points
  13. }: {
  14. id: number
  15. uuid: string
  16. label: number
  17. points: number[]
  18. }): SegmentationItem {
  19. return new SegmentationItem(id, uuid, label, points)
  20. }
  21. toObject(): Object {
  22. return {
  23. id: this.id,
  24. uuid: this.uuid,
  25. label: this.label,
  26. points: this.points
  27. }
  28. }
  29. }