IAutoEFDiagnosis.cs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. using System;
  2. using System.Collections.Generic;
  3. using Vinno.AI.AutoEFDiagnosisSDK.Models;
  4. using Vinno.AI.CommonSDK.Enums;
  5. using Vinno.AI.CommonSDK.Interfaces;
  6. using Vinno.AI.CommonSDK.Models;
  7. namespace Vinno.AI.AutoEFDiagnosisSDK.Interfaces
  8. {
  9. public interface IAutoEFDiagnosis : IDiagnosis
  10. {
  11. #region 兽用
  12. /// <summary>
  13. /// 启用AutoEF计算(仅支持兽用)
  14. /// </summary>
  15. /// <param name="totalFrameCount">整个视频帧数</param>
  16. /// <param name="cmPerPixel">探头中像素与实际单位转换的参数</param>
  17. /// <param name="reprocess">后处理状态选择(vetAutoEF不适用,默认即可)</param>
  18. void StartAutotEFCalculation(long totalFrameCount, double cmPerPixel);
  19. /// <summary>
  20. /// 推入一张裸图(仅支持兽用)
  21. /// </summary>
  22. /// <param name="rawImage"></param>
  23. /// <param name="frameTime"></param>
  24. /// <returns></returns>
  25. void DetectOneImageForAutoEFCalculation(AIRawImage rawImage, double frameTime);
  26. /// <summary>
  27. /// 推入一张图(仅支持兽用)
  28. /// </summary>
  29. /// <param name="byteImage"></param>
  30. /// <param name="frameTime"></param>
  31. /// <returns></returns>
  32. void DetectOneImageForAutoEFCalculation(byte[] byteImage, double frameTime);
  33. /// <summary>
  34. /// 停止AutoEF并返回结果,若IsReturnEveryImgResult为True,则返回所有帧的AutoEF结果,若IsReturnEveryImgResult为False,则只返回ES,ED两张图的结果(仅支持兽用)
  35. /// </summary>
  36. /// <returns></returns>
  37. Dictionary<double, AIEDESDetectResult> StopAutoEFCalculation();
  38. #endregion 兽用
  39. #region 人用
  40. /// <summary>
  41. /// 启用AutoEF计算(仅支持人用)
  42. /// </summary>
  43. /// <param name="totalTime">表示要显示的AutoEF曲线的总时长</param>
  44. /// <param name="cmPerPixel">探头中像素与实际单位转换的参数</param>
  45. /// <param name="intervalTime">推理的间隔时间</param>
  46. string StartAutotEFCalculationForHuman(double totalTime, float cmPerPixel, double intervalTime);
  47. /// <summary>
  48. /// 检测单张图像(仅支持人用)
  49. /// </summary>
  50. /// <param name="calculationId"></param>
  51. /// <param name="rawImage"></param>
  52. /// <param name="frameTime"></param>
  53. /// <returns></returns>
  54. AICardiacCurveInfos DetectOneImageForHuman(string calculationId, AIRawImage rawImage, double frameTime);
  55. /// <summary>
  56. /// 检测单张图像(仅支持人用)
  57. /// </summary>
  58. /// <param name="byteImage"></param>
  59. /// <param name="byteImage"></param>
  60. /// <param name="frameTime"></param>
  61. /// <returns></returns>
  62. AICardiacCurveInfos DetectOneImageForHuman(string calculationId, byte[] byteImage, double frameTime);
  63. #endregion 人用
  64. /// <summary>
  65. /// Raised when the image evaluation is started.
  66. /// </summary>
  67. event EventHandler StartEvaluationNotification;
  68. /// <summary>
  69. /// Raised when the image evaluation is finished.
  70. /// </summary>
  71. event EventHandler<AICardiacCurveInfos> FinishEvaluationNotification;
  72. /// <summary>
  73. /// Start Image Provider
  74. /// </summary>
  75. void Start();
  76. /// <summary>
  77. /// Stop Image Provider
  78. /// </summary>
  79. void Stop();
  80. /// <summary>
  81. /// 设置每秒图片吞吐量
  82. /// </summary>
  83. /// <param name="detectTps">每秒图片吞吐量,必须大于0</param>
  84. void SetDetectTps(int detectTps);
  85. /// <summary>
  86. /// 设置间隔时间
  87. /// </summary>
  88. /// <param name="intervalTime"></param>
  89. void SetIntervalTime(int intervalTime);
  90. /// <summary>
  91. /// 设置一个像素代表的实际物理距离是多少cm
  92. /// </summary>
  93. /// <param name="cmPerPixel"></param>
  94. void SetCmPerPixel(double cmPerPixel);
  95. /// <summary>
  96. /// 设置检测模式
  97. /// </summary>
  98. /// <param name="detectMode"></param>
  99. void SetDetectMode(AIEnumDetectMode detectMode);
  100. /// <summary>
  101. /// Close AutoEF Diagnosis
  102. /// </summary>
  103. void Close();
  104. }
  105. }