|
@@ -0,0 +1,51 @@
|
|
|
+import 'package:fis_measure/interfaces/process/items/item.dart';
|
|
|
+import 'package:fis_measure/interfaces/process/items/item_metas.dart';
|
|
|
+import 'package:fis_measure/interfaces/process/items/terms.dart';
|
|
|
+import 'package:fis_measure/interfaces/process/items/types.dart';
|
|
|
+import 'package:fis_measure/process/calcuators/lv_mass.dart';
|
|
|
+import 'package:fis_measure/process/items/top_item.dart';
|
|
|
+import 'package:fis_measure/process/items/top_item_feature.dart';
|
|
|
+import 'package:fis_measure/process/primitives/straightline.dart';
|
|
|
+import 'package:fis_measure/process/primitives/trace.dart';
|
|
|
+
|
|
|
+class LVMass extends TopMeasureItem<LVMassFeature> {
|
|
|
+ static const String _lvdEpiLKey = MeasureTerms.EpiLVAd;
|
|
|
+ static const String _lvdEndoKey = MeasureTerms.EndoVLAd;
|
|
|
+ static const String _lvldKey = MeasureTerms.LVLd;
|
|
|
+
|
|
|
+ late final Trace epi;
|
|
|
+ late final Trace endo;
|
|
|
+ late final StraightLine l;
|
|
|
+
|
|
|
+ LVMass(ItemMeta meta) : super(meta) {
|
|
|
+ final metaEpi = meta.getChildByName(_lvdEpiLKey)!;
|
|
|
+ final metaEndo = meta.getChildByName(_lvdEndoKey)!;
|
|
|
+ final metaL = meta.getChildByName(_lvldKey)!;
|
|
|
+ epi = Trace.createAreaPerimeter(metaEpi, this);
|
|
|
+ endo = Trace.createAreaPerimeter(metaEndo, this);
|
|
|
+ l = StraightLine.createDistance(metaL, this);
|
|
|
+ childItems.add(epi);
|
|
|
+ childItems.add(endo);
|
|
|
+ childItems.add(l);
|
|
|
+ }
|
|
|
+
|
|
|
+ @override
|
|
|
+ bool get finishAfterUnactive => true;
|
|
|
+
|
|
|
+ @override
|
|
|
+ LVMassFeature buildFeature() => LVMassFeature(this);
|
|
|
+
|
|
|
+ static LVMass createLVdMass(ItemMeta meta, [IMeasureItem? parent]) {
|
|
|
+ if (meta.measureType != MeasureTypes.LVdMass) {
|
|
|
+ throw ArgumentError();
|
|
|
+ }
|
|
|
+ var ins = LVMass(meta);
|
|
|
+ ins.calculator = LvdMassALCal(ins);
|
|
|
+
|
|
|
+ return ins;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class LVMassFeature extends TopMeasureItemFeature {
|
|
|
+ LVMassFeature(super.refItem);
|
|
|
+}
|