cross_frame.dart 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import 'package:fis_common/event/event_type.dart';
  2. import 'package:fis_measure/interfaces/process/items/item.dart';
  3. import 'package:vid/us/vid_us_image.dart';
  4. /// 跨帧测量上下文
  5. abstract class ICrossFrameContext {
  6. /// 初始图像链接
  7. String get originUrl;
  8. /// 当前图像链接
  9. String get currentUrl;
  10. /// 初始帧索引
  11. int get originIndex;
  12. /// 当前帧索引
  13. int? get currentIndex;
  14. /// 当前帧
  15. VidUsImage? get currentFrame;
  16. /// 当前图像中 有测量记录的 帧索引 集合
  17. List<int> get recordIndexList;
  18. /// 测量项
  19. IMeasureItem get measureItem;
  20. /// 是否已结束
  21. bool get isOver;
  22. /// 切换图像
  23. ///
  24. /// [url] 图像链接
  25. bool switchImage(String url);
  26. /// 切换帧
  27. ///
  28. /// [frame] 帧数据
  29. void switchFrame(VidUsImage frame);
  30. /// 记录当前帧
  31. ///
  32. /// [index] 帧索引
  33. bool recordFrame(int index);
  34. /// 结束跨帧
  35. void finish();
  36. /// 跨帧测量自动结束事件
  37. late final FEventHandler<void> measureAutoOver;
  38. }