|
@@ -7,7 +7,6 @@ import 'package:fis_measure/utils/js_utils.dart'
|
|
|
if (dart.library.io) 'package:fis_measure/utils/js_utils4native.dart'
|
|
|
if (dart.library.html) 'package:fis_measure/utils/js_utils.dart';
|
|
|
import 'package:fis_measure/utils/prompt_box.dart';
|
|
|
-import 'package:vid/us/vid_us_unit.dart';
|
|
|
|
|
|
import 'calculator.dart';
|
|
|
|
|
@@ -58,8 +57,8 @@ class CarotidDetectionCal extends Calculator<CarotidDetection, double> {
|
|
|
[
|
|
|
(result) {
|
|
|
if (result == 'error') {
|
|
|
- // description = "$type failed";
|
|
|
- PromptBox.toast("$type failed");
|
|
|
+ // description = "$type.detect Failed";
|
|
|
+ PromptBox.toast("$type.detect Failed");
|
|
|
// updateStringValue(description);
|
|
|
// ref.application.updateRenderReady.emit(this, null);
|
|
|
return;
|
|
@@ -70,36 +69,37 @@ class CarotidDetectionCal extends Calculator<CarotidDetection, double> {
|
|
|
if (res.length > 0) {
|
|
|
if (type == 'Plaque Detection') {
|
|
|
description =
|
|
|
- "$type\n Area: ${res[0]['PlaqueArea'].toStringAsFixed(2)}mm²";
|
|
|
+ "\n Area: ${res[0]['PlaqueArea'].toStringAsFixed(2)}mm²";
|
|
|
feature.offsetsList
|
|
|
.add(getPointsFromStrList(res[0]['PlaqueEdgePoints']));
|
|
|
} else {
|
|
|
- if (res['LowerIntimaResult']['ErrorCode'].toString() ==
|
|
|
+ description = "";
|
|
|
+ if (res['UpperIntimaResult']['ErrorCode'].toString() ==
|
|
|
"1000") {
|
|
|
- description =
|
|
|
- "$type\n Ant Max: ${res['LowerIntimaResult']['MaxThickness'].toStringAsFixed(2)}mm\n Ant.Min: ${res['LowerIntimaResult']['MinThickness'].toStringAsFixed(2)}mm\n Ant.Avg: ${res['LowerIntimaResult']['AverageThickness'].toStringAsFixed(2)}mm\n Ant.SD: ${res['LowerIntimaResult']['SdThickness'].toStringAsFixed(2)}mm\n";
|
|
|
+ description +=
|
|
|
+ "\n Ant.Max: ${res['UpperIntimaResult']['MaxThickness'].toStringAsFixed(2)}mm\n Ant.Min: ${res['UpperIntimaResult']['MinThickness'].toStringAsFixed(2)}mm\n Ant.Avg: ${res['UpperIntimaResult']['AverageThickness'].toStringAsFixed(2)}mm\n Ant.SD: ${res['UpperIntimaResult']['SdThickness'].toStringAsFixed(2)}mm";
|
|
|
feature.offsetsList.add(getPointsFromStrList(
|
|
|
- res['LowerIntimaResult']['PointLower']));
|
|
|
+ res['UpperIntimaResult']['PointLower']));
|
|
|
feature.offsetsList.add(getPointsFromStrList(
|
|
|
- res['LowerIntimaResult']['PointUpper']));
|
|
|
+ res['UpperIntimaResult']['PointUpper']));
|
|
|
} else {
|
|
|
- description = "$type\n Ant failed\n";
|
|
|
+ description += "\n Ant.detect Failed";
|
|
|
}
|
|
|
- if (res['UpperIntimaResult']['ErrorCode'].toString() ==
|
|
|
+ if (res['LowerIntimaResult']['ErrorCode'].toString() ==
|
|
|
"1000") {
|
|
|
description +=
|
|
|
- " Post Max: ${res['UpperIntimaResult']['MaxThickness'].toStringAsFixed(2)}mm\n Post.Min: ${res['UpperIntimaResult']['MinThickness'].toStringAsFixed(2)}mm\n Post.Avg: ${res['UpperIntimaResult']['AverageThickness'].toStringAsFixed(2)}mm\n Post.SD: ${res['UpperIntimaResult']['SdThickness'].toStringAsFixed(2)}mm\n";
|
|
|
+ "\n Post.Max: ${res['LowerIntimaResult']['MaxThickness'].toStringAsFixed(2)}mm\n Post.Min: ${res['LowerIntimaResult']['MinThickness'].toStringAsFixed(2)}mm\n Post.Avg: ${res['LowerIntimaResult']['AverageThickness'].toStringAsFixed(2)}mm\n Post.SD: ${res['LowerIntimaResult']['SdThickness'].toStringAsFixed(2)}mm";
|
|
|
feature.offsetsList.add(getPointsFromStrList(
|
|
|
- res['UpperIntimaResult']['PointLower']));
|
|
|
+ res['LowerIntimaResult']['PointLower']));
|
|
|
feature.offsetsList.add(getPointsFromStrList(
|
|
|
- res['UpperIntimaResult']['PointUpper']));
|
|
|
+ res['LowerIntimaResult']['PointUpper']));
|
|
|
} else {
|
|
|
- description += " Post failed";
|
|
|
+ description += "\n Post.detect Failed";
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- description = "$type failed";
|
|
|
- PromptBox.toast("$type failed");
|
|
|
+ description = "$type.detect Failed";
|
|
|
+ PromptBox.toast("$type.detect Failed");
|
|
|
}
|
|
|
updateStringValue(description);
|
|
|
|
|
@@ -109,8 +109,8 @@ class CarotidDetectionCal extends Calculator<CarotidDetection, double> {
|
|
|
],
|
|
|
);
|
|
|
} catch (e) {
|
|
|
- updateStringValue("$type failed");
|
|
|
- PromptBox.toast("$type failed");
|
|
|
+ updateStringValue("$type.detect Failed");
|
|
|
+ PromptBox.toast("$type.detect Failed");
|
|
|
|
|
|
//
|
|
|
}
|