|
@@ -97,11 +97,12 @@ class URMRectCal extends Calculator<URMRect, double> {
|
|
|
feature.updateFloatValue(output, result.output, output.unit);
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ throw Exception("URM Measure API error");
|
|
|
}
|
|
|
} catch (e) {
|
|
|
description = " ";
|
|
|
updateStringValue(description);
|
|
|
-
|
|
|
return;
|
|
|
}
|
|
|
ref.application.updateRenderReady.emit(this, null);
|
|
@@ -123,6 +124,8 @@ class URMRectCal extends Calculator<URMRect, double> {
|
|
|
feature.updateFloatValue(output, result.output, output.unit);
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ throw Exception("URM Measure API error");
|
|
|
}
|
|
|
} catch (e) {
|
|
|
description = " ";
|
|
@@ -149,6 +152,8 @@ class URMRectCal extends Calculator<URMRect, double> {
|
|
|
feature.updateFloatValue(output, result.output, output.unit);
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ throw Exception("URM Measure API error");
|
|
|
}
|
|
|
} catch (e) {
|
|
|
description = " ";
|
|
@@ -196,6 +201,8 @@ class URMRectCal extends Calculator<URMRect, double> {
|
|
|
feature.updateFloatValue(output, result.roiArea, VidUsUnit.cm2);
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ throw Exception("URM Measure API error");
|
|
|
}
|
|
|
} catch (e) {
|
|
|
description = " ";
|
|
@@ -253,6 +260,8 @@ class URMLocationCal extends Calculator<Location, double> {
|
|
|
feature.updateFloatValue(output, result.output, output.unit);
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ throw Exception("URM Measure API error");
|
|
|
}
|
|
|
} catch (e) {
|
|
|
description = " ";
|
|
@@ -337,6 +346,8 @@ class URMStraightLineCal extends Calculator<StraightLine, double> {
|
|
|
feature.updateFloatValue(output, result.curvature, output.unit);
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ throw Exception("URM Measure API error");
|
|
|
}
|
|
|
} catch (e) {
|
|
|
description = " ";
|
|
@@ -392,6 +403,8 @@ class URMStraightLineCal extends Calculator<StraightLine, double> {
|
|
|
feature.updateFloatValue(output, result.roiArea, VidUsUnit.cm2);
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ throw Exception("URM Measure API error");
|
|
|
}
|
|
|
} catch (e) {
|
|
|
description = " ";
|
|
@@ -462,6 +475,8 @@ class URMStraightLineCal extends Calculator<StraightLine, double> {
|
|
|
output, sqrt(result.varianceVessDiameter), VidUsUnit.mm);
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ throw Exception("URM Measure API error");
|
|
|
}
|
|
|
} catch (e) {
|
|
|
description = " ";
|
|
@@ -539,6 +554,8 @@ class URMTraceCal extends Calculator<AreaItemAbstract, double> {
|
|
|
feature.updateFloatValue(output, result.output, output.unit);
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ throw Exception("URM Measure API error");
|
|
|
}
|
|
|
} catch (e) {
|
|
|
description = " ";
|
|
@@ -565,6 +582,8 @@ class URMTraceCal extends Calculator<AreaItemAbstract, double> {
|
|
|
feature.updateFloatValue(output, result.output, output.unit);
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ throw Exception("URM Measure API error");
|
|
|
}
|
|
|
} catch (e) {
|
|
|
description = " ";
|
|
@@ -615,8 +634,8 @@ class URMVelCal extends Calculator<URMVelAbstract, double> {
|
|
|
} else if (item.feature != null) {
|
|
|
value = item.feature!.value;
|
|
|
}
|
|
|
- if (value != null) {
|
|
|
- return (value as FloatValue).value ?? 0;
|
|
|
+ if (value != null && value is FloatValue) {
|
|
|
+ return (value).value ?? 0;
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
@@ -653,8 +672,8 @@ class URMDenCal extends Calculator<URMDenAbstract, double> {
|
|
|
} else if (item.feature != null) {
|
|
|
value = item.feature!.value;
|
|
|
}
|
|
|
- if (value != null) {
|
|
|
- return (value as FloatValue).value ?? 0;
|
|
|
+ if (value != null && value is FloatValue) {
|
|
|
+ return (value).value ?? 0;
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
@@ -691,8 +710,8 @@ class URMSrDensityCal extends Calculator<URMTwoSRRoiRectAbstract, double> {
|
|
|
} else if (item.feature != null) {
|
|
|
value = item.feature!.value;
|
|
|
}
|
|
|
- if (value != null) {
|
|
|
- return (value as FloatValue).value ?? 0;
|
|
|
+ if (value != null && value is FloatValue) {
|
|
|
+ return (value).value ?? 0;
|
|
|
}
|
|
|
return null;
|
|
|
}
|