Update ScreenChestCT.

This commit is contained in:
sdk-team
2021-07-19 02:35:59 +00:00
parent cc4070bba3
commit 9013d93d95
6 changed files with 92 additions and 28 deletions

View File

@@ -1,3 +1,6 @@
2021-07-19 Version: 1.36.819
- Update ScreenChestCT.
2021-07-15 Version: 1.36.818
- Support Alb Open API.

View File

@@ -1 +1 @@
1.36.818
1.36.819

View File

@@ -40,13 +40,13 @@ namespace AlibabaCloud
{
float imageZ;
float imageY;
float imageX;
std::string lobe;
float imageX;
std::string category;
std::string lung;
float meanValue;
float volume;
float confidence;
float volume;
float x;
float y;
float z;

View File

@@ -93,9 +93,35 @@ namespace AlibabaCloud
std::vector<DetectionsItem> detections;
std::string resultURL;
};
struct AnalyzeChestVessel
{
struct AortaInfo
{
float maxArea;
std::vector<std::string> area;
float maxDiameter;
long labelValue;
std::vector<std::string> coordinates3;
long maxAreaIndex;
};
struct PulmonaryInfo
{
float maxArea;
std::vector<std::string> area5;
float maxDiameter;
long labelValue;
std::vector<std::string> coordinates4;
long maxAreaIndex;
float nearestAortaArea;
};
PulmonaryInfo pulmonaryInfo;
AortaInfo aortaInfo;
std::string resultURL;
};
LungNodule lungNodule;
CACS cACS;
Covid covid;
AnalyzeChestVessel analyzeChestVessel;
DetectRibFracture detectRibFracture;
std::string errorMessage;
};

View File

@@ -44,42 +44,42 @@ void DetectLungNoduleResult::parse(const std::string &payload)
for (auto dataNodeSeriesSerie : allSeriesNode)
{
Data::Serie serieObject;
if(!dataNodeSeriesSerie["Report"].isNull())
serieObject.report = dataNodeSeriesSerie["Report"].asString();
if(!dataNodeSeriesSerie["SeriesInstanceUid"].isNull())
serieObject.seriesInstanceUid = dataNodeSeriesSerie["SeriesInstanceUid"].asString();
if(!dataNodeSeriesSerie["Report"].isNull())
serieObject.report = dataNodeSeriesSerie["Report"].asString();
auto allElementsNode = dataNodeSeriesSerie["Elements"]["Element"];
for (auto dataNodeSeriesSerieElementsElement : allElementsNode)
{
Data::Serie::Element elementsObject;
if(!dataNodeSeriesSerieElementsElement["ImageZ"].isNull())
elementsObject.imageZ = std::stof(dataNodeSeriesSerieElementsElement["ImageZ"].asString());
if(!dataNodeSeriesSerieElementsElement["ImageY"].isNull())
elementsObject.imageY = std::stof(dataNodeSeriesSerieElementsElement["ImageY"].asString());
if(!dataNodeSeriesSerieElementsElement["ImageX"].isNull())
elementsObject.imageX = std::stof(dataNodeSeriesSerieElementsElement["ImageX"].asString());
if(!dataNodeSeriesSerieElementsElement["Lobe"].isNull())
elementsObject.lobe = dataNodeSeriesSerieElementsElement["Lobe"].asString();
if(!dataNodeSeriesSerieElementsElement["Category"].isNull())
elementsObject.category = dataNodeSeriesSerieElementsElement["Category"].asString();
if(!dataNodeSeriesSerieElementsElement["Lung"].isNull())
elementsObject.lung = dataNodeSeriesSerieElementsElement["Lung"].asString();
if(!dataNodeSeriesSerieElementsElement["MeanValue"].isNull())
elementsObject.meanValue = std::stof(dataNodeSeriesSerieElementsElement["MeanValue"].asString());
if(!dataNodeSeriesSerieElementsElement["Volume"].isNull())
elementsObject.volume = std::stof(dataNodeSeriesSerieElementsElement["Volume"].asString());
if(!dataNodeSeriesSerieElementsElement["Confidence"].isNull())
elementsObject.confidence = std::stof(dataNodeSeriesSerieElementsElement["Confidence"].asString());
if(!dataNodeSeriesSerieElementsElement["X"].isNull())
elementsObject.x = std::stof(dataNodeSeriesSerieElementsElement["X"].asString());
if(!dataNodeSeriesSerieElementsElement["Y"].isNull())
elementsObject.y = std::stof(dataNodeSeriesSerieElementsElement["Y"].asString());
if(!dataNodeSeriesSerieElementsElement["Z"].isNull())
elementsObject.z = std::stof(dataNodeSeriesSerieElementsElement["Z"].asString());
if(!dataNodeSeriesSerieElementsElement["Lobe"].isNull())
elementsObject.lobe = dataNodeSeriesSerieElementsElement["Lobe"].asString();
if(!dataNodeSeriesSerieElementsElement["MeanValue"].isNull())
elementsObject.meanValue = std::stof(dataNodeSeriesSerieElementsElement["MeanValue"].asString());
if(!dataNodeSeriesSerieElementsElement["ImageZ"].isNull())
elementsObject.imageZ = std::stof(dataNodeSeriesSerieElementsElement["ImageZ"].asString());
if(!dataNodeSeriesSerieElementsElement["Lung"].isNull())
elementsObject.lung = dataNodeSeriesSerieElementsElement["Lung"].asString();
if(!dataNodeSeriesSerieElementsElement["Confidence"].isNull())
elementsObject.confidence = std::stof(dataNodeSeriesSerieElementsElement["Confidence"].asString());
if(!dataNodeSeriesSerieElementsElement["SOPInstanceUID"].isNull())
elementsObject.sOPInstanceUID = dataNodeSeriesSerieElementsElement["SOPInstanceUID"].asString();
if(!dataNodeSeriesSerieElementsElement["ImageX"].isNull())
elementsObject.imageX = std::stof(dataNodeSeriesSerieElementsElement["ImageX"].asString());
if(!dataNodeSeriesSerieElementsElement["Y"].isNull())
elementsObject.y = std::stof(dataNodeSeriesSerieElementsElement["Y"].asString());
if(!dataNodeSeriesSerieElementsElement["Category"].isNull())
elementsObject.category = dataNodeSeriesSerieElementsElement["Category"].asString();
if(!dataNodeSeriesSerieElementsElement["Volume"].isNull())
elementsObject.volume = std::stof(dataNodeSeriesSerieElementsElement["Volume"].asString());
if(!dataNodeSeriesSerieElementsElement["ImageY"].isNull())
elementsObject.imageY = std::stof(dataNodeSeriesSerieElementsElement["ImageY"].asString());
if(!dataNodeSeriesSerieElementsElement["Diameter"].isNull())
elementsObject.diameter = std::stof(dataNodeSeriesSerieElementsElement["Diameter"].asString());
if(!dataNodeSeriesSerieElementsElement["X"].isNull())
elementsObject.x = std::stof(dataNodeSeriesSerieElementsElement["X"].asString());
serieObject.elements.push_back(elementsObject);
}
auto allOrigin = value["Origin"]["Origin"];

View File

@@ -126,7 +126,7 @@ void ScreenChestCTResult::parse(const std::string &payload)
detectionsItemObject.fractureLocation = detectRibFractureNodeDetectionsDetectionsItem["FractureLocation"].asString();
if(!detectRibFractureNodeDetectionsDetectionsItem["FractureSegment"].isNull())
detectionsItemObject.fractureSegment = std::stol(detectRibFractureNodeDetectionsDetectionsItem["FractureSegment"].asString());
auto allCoordinates = value["Coordinates"]["Coordinates"];
auto allCoordinates = value["Coordinates"]["coordinates"];
for (auto value : allCoordinates)
detectionsItemObject.coordinates.push_back(value.asString());
auto allCoordinateImage = value["CoordinateImage"]["CoordinateImage"];
@@ -140,6 +140,41 @@ void ScreenChestCTResult::parse(const std::string &payload)
auto allOrigin2 = detectRibFractureNode["Origin"]["Origin"];
for (auto value : allOrigin2)
data_.detectRibFracture.origin2.push_back(value.asString());
auto analyzeChestVesselNode = dataNode["AnalyzeChestVessel"];
if(!analyzeChestVesselNode["ResultURL"].isNull())
data_.analyzeChestVessel.resultURL = analyzeChestVesselNode["ResultURL"].asString();
auto aortaInfoNode = analyzeChestVesselNode["AortaInfo"];
if(!aortaInfoNode["MaxAreaIndex"].isNull())
data_.analyzeChestVessel.aortaInfo.maxAreaIndex = std::stol(aortaInfoNode["MaxAreaIndex"].asString());
if(!aortaInfoNode["MaxArea"].isNull())
data_.analyzeChestVessel.aortaInfo.maxArea = std::stof(aortaInfoNode["MaxArea"].asString());
if(!aortaInfoNode["MaxDiameter"].isNull())
data_.analyzeChestVessel.aortaInfo.maxDiameter = std::stof(aortaInfoNode["MaxDiameter"].asString());
if(!aortaInfoNode["LabelValue"].isNull())
data_.analyzeChestVessel.aortaInfo.labelValue = std::stol(aortaInfoNode["LabelValue"].asString());
auto allCoordinates3 = aortaInfoNode["Coordinates"]["coordinates"];
for (auto value : allCoordinates3)
data_.analyzeChestVessel.aortaInfo.coordinates3.push_back(value.asString());
auto allArea = aortaInfoNode["Area"]["area"];
for (auto value : allArea)
data_.analyzeChestVessel.aortaInfo.area.push_back(value.asString());
auto pulmonaryInfoNode = analyzeChestVesselNode["PulmonaryInfo"];
if(!pulmonaryInfoNode["MaxAreaIndex"].isNull())
data_.analyzeChestVessel.pulmonaryInfo.maxAreaIndex = std::stol(pulmonaryInfoNode["MaxAreaIndex"].asString());
if(!pulmonaryInfoNode["MaxArea"].isNull())
data_.analyzeChestVessel.pulmonaryInfo.maxArea = std::stof(pulmonaryInfoNode["MaxArea"].asString());
if(!pulmonaryInfoNode["MaxDiameter"].isNull())
data_.analyzeChestVessel.pulmonaryInfo.maxDiameter = std::stof(pulmonaryInfoNode["MaxDiameter"].asString());
if(!pulmonaryInfoNode["LabelValue"].isNull())
data_.analyzeChestVessel.pulmonaryInfo.labelValue = std::stol(pulmonaryInfoNode["LabelValue"].asString());
if(!pulmonaryInfoNode["NearestAortaArea"].isNull())
data_.analyzeChestVessel.pulmonaryInfo.nearestAortaArea = std::stof(pulmonaryInfoNode["NearestAortaArea"].asString());
auto allCoordinates4 = pulmonaryInfoNode["Coordinates"]["coordinates"];
for (auto value : allCoordinates4)
data_.analyzeChestVessel.pulmonaryInfo.coordinates4.push_back(value.asString());
auto allArea5 = pulmonaryInfoNode["Area"]["area"];
for (auto value : allArea5)
data_.analyzeChestVessel.pulmonaryInfo.area5.push_back(value.asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())