v2d_visual.dart 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import 'package:fis_measure/interfaces/date_types/rect_region.dart';
  2. import 'package:fis_measure/interfaces/process/visuals/visual_area.dart';
  3. import 'package:fis_measure/process/visual/time_motion_area.dart';
  4. import 'package:fis_measure/process/visual/tissue_area.dart';
  5. import 'package:vid/us/vid_us_2d_visual.dart';
  6. import 'package:vid/us/vid_us_mode.dart';
  7. import 'package:vid/us/vid_us_visual.dart';
  8. import 'package:vid/us/vid_us_visual_area_type.dart';
  9. import 'visual.dart';
  10. class V2dVisual extends VisualBase {
  11. V2dVisual(VidUsVisual visualData, RectRegion region)
  12. : super(visualData, region);
  13. @override
  14. List<IVisualArea> loadAreas() {
  15. List<IVisualArea> visualAreas = [];
  16. for (var areaType in visualData.physicalCoordinates.keys) {
  17. IVisualArea? area;
  18. switch (areaType) {
  19. case VidUsVisualAreaType.Tissue:
  20. area = TissueArea(this, areaType, VidUsModeType.Tissue);
  21. break;
  22. case VidUsVisualAreaType.Flow:
  23. area = TissueArea(this, areaType, VidUsModeType.Flow);
  24. break;
  25. case VidUsVisualAreaType.TimeMotion:
  26. case VidUsVisualAreaType.TissueTimeMotion:
  27. area = TimeMotionArea(this, areaType, VidUsModeType.TissueTM);
  28. break;
  29. case VidUsVisualAreaType.Doppler:
  30. area = TimeMotionArea(this, areaType, VidUsModeType.Doppler);
  31. break;
  32. case VidUsVisualAreaType.Trace:
  33. case VidUsVisualAreaType.Colorbar:
  34. case VidUsVisualAreaType.Tissue3D:
  35. case VidUsVisualAreaType.AssociateTissue:
  36. case VidUsVisualAreaType.AssociateFlow:
  37. case VidUsVisualAreaType.ZoomTissue:
  38. case VidUsVisualAreaType.ZoomFlow:
  39. break;
  40. }
  41. if (area != null) {
  42. visualAreas.add(area);
  43. }
  44. }
  45. return visualAreas;
  46. }
  47. @override
  48. VidUs2DVisual get visualData => super.visualData as VidUs2DVisual;
  49. }