|
@@ -42,19 +42,24 @@ class TissueConvexDepthCal extends Calculator<Location, double> {
|
|
|
// TODO:xxx
|
|
|
final viewport = ref.feature!.hostVisualArea!.viewport!;
|
|
|
final physical = viewport.physical! as ConvexTissuePhysicalCoordinate;
|
|
|
- final point = ref.feature!.innerPoints.first;
|
|
|
+ final point = ref.feature!.point;
|
|
|
+
|
|
|
final physicalPoint = viewport.convert(point);
|
|
|
- final convertedPoint = physical.convert(physicalPoint);
|
|
|
- final zeroPoint = DPoint(viewport.region.width / 2, physical.zeroY);
|
|
|
- final depth = (convertedPoint - zeroPoint).length;
|
|
|
+ final physicalZeroPoint = DPoint(viewport.region.width / 2, physical.zeroY);
|
|
|
+ final distance = (physicalPoint - physicalZeroPoint).length;
|
|
|
+ final depth = distance - physical.zeroRadius;
|
|
|
|
|
|
+ final valueDesc =
|
|
|
+ depth < 0 ? '' : '${roundDouble(depth)}${VidUsUnit.cm.name}';
|
|
|
+ final description = "${ref.description}: $valueDesc";
|
|
|
+
|
|
|
+ final double outputValue = depth < 0 ? 0 : depth;
|
|
|
final outputItem = OutputItem(
|
|
|
- value: depth,
|
|
|
+ value: outputValue,
|
|
|
name: MeasureTerms.Depth,
|
|
|
unit: VidUsUnit.cm,
|
|
|
);
|
|
|
- final description =
|
|
|
- "${ref.description}: ${roundDouble(depth)}${VidUsUnit.cm.name}";
|
|
|
+
|
|
|
outputItem.updateDescription(description: description);
|
|
|
output = outputItem;
|
|
|
}
|