Roi.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using AI.Common;
  2. using AI.DiagSystem;
  3. using System.Collections.Generic;
  4. namespace AIDiagnosisDemo.Infrastucture
  5. {
  6. public class MyRect
  7. {
  8. public int Left { get; }
  9. public int Top { get; }
  10. public int Right { get; }
  11. public int Bottom { get; }
  12. public int Width { get; }
  13. public int Height { get; }
  14. public MyRect(int left, int top, int width, int height)
  15. {
  16. Left = left;
  17. Top = top;
  18. Width = width;
  19. Height = height;
  20. Right = left + width;
  21. Bottom = top + height;
  22. }
  23. }
  24. public class MyPoint
  25. {
  26. public int X { get; set; }
  27. public int Y { get; set; }
  28. public MyPoint(int x, int y)
  29. {
  30. X = x;
  31. Y = y;
  32. }
  33. }
  34. public class Roi
  35. {
  36. public EnumOrgans Organ { get; set; }
  37. public MyRect BoundBox { get; set; }
  38. public MyPoint[][] Contour { get; set; }
  39. public Point2D[][] Contours { get; set; }
  40. public System.Windows.Media.Brush Color { get; set; }
  41. public string LabelName { get; set; }
  42. public string Confidence { get; set; }
  43. public List<IDescription> Descriptions { get; set; }
  44. public Roi(EnumOrgans organ, MyRect boundBox, Point2D[][] contours, System.Windows.Media.Brush color, string labelName, string confidence, List<IDescription> descriptions)
  45. {
  46. Organ = organ;
  47. BoundBox = boundBox;
  48. Contours = contours;
  49. Color = color;
  50. LabelName = labelName;
  51. Confidence = confidence;
  52. Descriptions = descriptions;
  53. }
  54. }
  55. }