Update ScreenChestCT.

This commit is contained in:
sdk-team
2021-05-14 07:53:01 +00:00
parent 4833822295
commit 643f70f732
6 changed files with 90 additions and 70 deletions

View File

@@ -1,3 +1,6 @@
2021-05-14 Version: 1.36.735
- Update ScreenChestCT.
2021-05-14 Version: 1.36.734
- Support Private RDS management through OpenAPI.
- ManagePrivateRds to do RDS information query and some management.

View File

@@ -1 +1 @@
1.36.734
1.36.735

View File

@@ -42,6 +42,8 @@ namespace AlibabaCloud
std::string getOrgName()const;
void setOrgName(const std::string& orgName);
long getMask()const;
void setMask(long mask);
std::string getDataFormat()const;
void setDataFormat(const std::string& dataFormat);
std::vector<URLList> getURLList()const;
@@ -53,6 +55,7 @@ namespace AlibabaCloud
private:
std::string orgName_;
long mask_;
std::string dataFormat_;
std::vector<URLList> uRLList_;
std::string orgId_;

View File

@@ -34,19 +34,6 @@ namespace AlibabaCloud
public:
struct Data
{
struct Covid
{
std::string newProbability;
std::string otherProbability;
std::string normalProbability;
std::string mask;
std::string lesionRatio;
};
struct CACS
{
std::string score;
std::string resultUrl;
};
struct LungNodule
{
struct Serie
@@ -55,13 +42,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;
@@ -76,27 +63,41 @@ namespace AlibabaCloud
};
std::vector<Serie> series;
};
struct CACS
{
std::string score;
std::string resultUrl;
};
struct Covid
{
std::string newProbability;
std::string otherProbability;
std::string normalProbability;
std::string mask;
std::string lesionRatio;
};
struct DetectRibFracture
{
struct DetectionsItem
{
long fractureCategory;
float fractureConfidence;
long fractureCategory;
std::vector<std::string> coordinateImage;
std::vector<std::string> coordinates;
std::string fractureLocation;
long fractureSegment;
long fractureId;
};
std::vector<std::string> origin1;
std::vector<std::string> spacing2;
std::vector<std::string> origin2;
std::vector<std::string> spacing1;
std::vector<DetectionsItem> detections;
std::string resultURL;
};
Covid covid;
CACS cACS;
LungNodule lungNodule;
CACS cACS;
Covid covid;
DetectRibFracture detectRibFracture;
std::string errorMessage;
};

View File

@@ -38,6 +38,17 @@ void ScreenChestCTRequest::setOrgName(const std::string& orgName)
setBodyParameter("OrgName", orgName);
}
long ScreenChestCTRequest::getMask()const
{
return mask_;
}
void ScreenChestCTRequest::setMask(long mask)
{
mask_ = mask;
setBodyParameter("Mask", std::to_string(mask));
}
std::string ScreenChestCTRequest::getDataFormat()const
{
return dataFormat_;

View File

@@ -40,63 +40,49 @@ void ScreenChestCTResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto covidNode = dataNode["Covid"];
if(!covidNode["NewProbability"].isNull())
data_.covid.newProbability = covidNode["NewProbability"].asString();
if(!covidNode["OtherProbability"].isNull())
data_.covid.otherProbability = covidNode["OtherProbability"].asString();
if(!covidNode["NormalProbability"].isNull())
data_.covid.normalProbability = covidNode["NormalProbability"].asString();
if(!covidNode["Mask"].isNull())
data_.covid.mask = covidNode["Mask"].asString();
if(!covidNode["LesionRatio"].isNull())
data_.covid.lesionRatio = covidNode["LesionRatio"].asString();
auto cACSNode = dataNode["CACS"];
if(!cACSNode["Score"].isNull())
data_.cACS.score = cACSNode["Score"].asString();
if(!cACSNode["ResultUrl"].isNull())
data_.cACS.resultUrl = cACSNode["ResultUrl"].asString();
if(!dataNode["ErrorMessage"].isNull())
data_.errorMessage = dataNode["ErrorMessage"].asString();
auto lungNoduleNode = dataNode["LungNodule"];
auto allSeriesNode = lungNoduleNode["Series"]["Serie"];
for (auto lungNoduleNodeSeriesSerie : allSeriesNode)
{
Data::LungNodule::Serie serieObject;
if(!lungNoduleNodeSeriesSerie["Report"].isNull())
serieObject.report = lungNoduleNodeSeriesSerie["Report"].asString();
if(!lungNoduleNodeSeriesSerie["SeriesInstanceUid"].isNull())
serieObject.seriesInstanceUid = lungNoduleNodeSeriesSerie["SeriesInstanceUid"].asString();
if(!lungNoduleNodeSeriesSerie["Report"].isNull())
serieObject.report = lungNoduleNodeSeriesSerie["Report"].asString();
auto allElementsNode = lungNoduleNodeSeriesSerie["Elements"]["Element"];
for (auto lungNoduleNodeSeriesSerieElementsElement : allElementsNode)
{
Data::LungNodule::Serie::Element elementsObject;
if(!lungNoduleNodeSeriesSerieElementsElement["ImageZ"].isNull())
elementsObject.imageZ = std::stof(lungNoduleNodeSeriesSerieElementsElement["ImageZ"].asString());
if(!lungNoduleNodeSeriesSerieElementsElement["ImageY"].isNull())
elementsObject.imageY = std::stof(lungNoduleNodeSeriesSerieElementsElement["ImageY"].asString());
if(!lungNoduleNodeSeriesSerieElementsElement["ImageX"].isNull())
elementsObject.imageX = std::stof(lungNoduleNodeSeriesSerieElementsElement["ImageX"].asString());
if(!lungNoduleNodeSeriesSerieElementsElement["Lobe"].isNull())
elementsObject.lobe = lungNoduleNodeSeriesSerieElementsElement["Lobe"].asString();
if(!lungNoduleNodeSeriesSerieElementsElement["Category"].isNull())
elementsObject.category = lungNoduleNodeSeriesSerieElementsElement["Category"].asString();
if(!lungNoduleNodeSeriesSerieElementsElement["Lung"].isNull())
elementsObject.lung = lungNoduleNodeSeriesSerieElementsElement["Lung"].asString();
if(!lungNoduleNodeSeriesSerieElementsElement["MeanValue"].isNull())
elementsObject.meanValue = std::stof(lungNoduleNodeSeriesSerieElementsElement["MeanValue"].asString());
if(!lungNoduleNodeSeriesSerieElementsElement["Volume"].isNull())
elementsObject.volume = std::stof(lungNoduleNodeSeriesSerieElementsElement["Volume"].asString());
if(!lungNoduleNodeSeriesSerieElementsElement["Lung"].isNull())
elementsObject.lung = lungNoduleNodeSeriesSerieElementsElement["Lung"].asString();
if(!lungNoduleNodeSeriesSerieElementsElement["Confidence"].isNull())
elementsObject.confidence = std::stof(lungNoduleNodeSeriesSerieElementsElement["Confidence"].asString());
if(!lungNoduleNodeSeriesSerieElementsElement["SOPInstanceUID"].isNull())
elementsObject.sOPInstanceUID = lungNoduleNodeSeriesSerieElementsElement["SOPInstanceUID"].asString();
if(!lungNoduleNodeSeriesSerieElementsElement["Category"].isNull())
elementsObject.category = lungNoduleNodeSeriesSerieElementsElement["Category"].asString();
if(!lungNoduleNodeSeriesSerieElementsElement["Volume"].isNull())
elementsObject.volume = std::stof(lungNoduleNodeSeriesSerieElementsElement["Volume"].asString());
if(!lungNoduleNodeSeriesSerieElementsElement["Diameter"].isNull())
elementsObject.diameter = std::stof(lungNoduleNodeSeriesSerieElementsElement["Diameter"].asString());
if(!lungNoduleNodeSeriesSerieElementsElement["X"].isNull())
elementsObject.x = std::stof(lungNoduleNodeSeriesSerieElementsElement["X"].asString());
if(!lungNoduleNodeSeriesSerieElementsElement["Y"].isNull())
elementsObject.y = std::stof(lungNoduleNodeSeriesSerieElementsElement["Y"].asString());
if(!lungNoduleNodeSeriesSerieElementsElement["Z"].isNull())
elementsObject.z = std::stof(lungNoduleNodeSeriesSerieElementsElement["Z"].asString());
if(!lungNoduleNodeSeriesSerieElementsElement["SOPInstanceUID"].isNull())
elementsObject.sOPInstanceUID = lungNoduleNodeSeriesSerieElementsElement["SOPInstanceUID"].asString();
if(!lungNoduleNodeSeriesSerieElementsElement["Diameter"].isNull())
elementsObject.diameter = std::stof(lungNoduleNodeSeriesSerieElementsElement["Diameter"].asString());
if(!lungNoduleNodeSeriesSerieElementsElement["ImageX"].isNull())
elementsObject.imageX = std::stof(lungNoduleNodeSeriesSerieElementsElement["ImageX"].asString());
if(!lungNoduleNodeSeriesSerieElementsElement["ImageY"].isNull())
elementsObject.imageY = std::stof(lungNoduleNodeSeriesSerieElementsElement["ImageY"].asString());
if(!lungNoduleNodeSeriesSerieElementsElement["ImageZ"].isNull())
elementsObject.imageZ = std::stof(lungNoduleNodeSeriesSerieElementsElement["ImageZ"].asString());
serieObject.elements.push_back(elementsObject);
}
auto allOrigin = value["Origin"]["Origin"];
@@ -107,6 +93,22 @@ void ScreenChestCTResult::parse(const std::string &payload)
serieObject.spacing.push_back(value.asString());
data_.lungNodule.series.push_back(serieObject);
}
auto cACSNode = dataNode["CACS"];
if(!cACSNode["ResultUrl"].isNull())
data_.cACS.resultUrl = cACSNode["ResultUrl"].asString();
if(!cACSNode["Score"].isNull())
data_.cACS.score = cACSNode["Score"].asString();
auto covidNode = dataNode["Covid"];
if(!covidNode["NormalProbability"].isNull())
data_.covid.normalProbability = covidNode["NormalProbability"].asString();
if(!covidNode["NewProbability"].isNull())
data_.covid.newProbability = covidNode["NewProbability"].asString();
if(!covidNode["LesionRatio"].isNull())
data_.covid.lesionRatio = covidNode["LesionRatio"].asString();
if(!covidNode["OtherProbability"].isNull())
data_.covid.otherProbability = covidNode["OtherProbability"].asString();
if(!covidNode["Mask"].isNull())
data_.covid.mask = covidNode["Mask"].asString();
auto detectRibFractureNode = dataNode["DetectRibFracture"];
if(!detectRibFractureNode["ResultURL"].isNull())
data_.detectRibFracture.resultURL = detectRibFractureNode["ResultURL"].asString();
@@ -114,34 +116,34 @@ void ScreenChestCTResult::parse(const std::string &payload)
for (auto detectRibFractureNodeDetectionsDetectionsItem : allDetectionsNode)
{
Data::DetectRibFracture::DetectionsItem detectionsItemObject;
if(!detectRibFractureNodeDetectionsDetectionsItem["FractureCategory"].isNull())
detectionsItemObject.fractureCategory = std::stol(detectRibFractureNodeDetectionsDetectionsItem["FractureCategory"].asString());
if(!detectRibFractureNodeDetectionsDetectionsItem["FractureId"].isNull())
detectionsItemObject.fractureId = std::stol(detectRibFractureNodeDetectionsDetectionsItem["FractureId"].asString());
if(!detectRibFractureNodeDetectionsDetectionsItem["FractureConfidence"].isNull())
detectionsItemObject.fractureConfidence = std::stof(detectRibFractureNodeDetectionsDetectionsItem["FractureConfidence"].asString());
if(!detectRibFractureNodeDetectionsDetectionsItem["FractureCategory"].isNull())
detectionsItemObject.fractureCategory = std::stol(detectRibFractureNodeDetectionsDetectionsItem["FractureCategory"].asString());
if(!detectRibFractureNodeDetectionsDetectionsItem["FractureLocation"].isNull())
detectionsItemObject.fractureLocation = detectRibFractureNodeDetectionsDetectionsItem["FractureLocation"].asString();
if(!detectRibFractureNodeDetectionsDetectionsItem["FractureSegment"].isNull())
detectionsItemObject.fractureSegment = std::stol(detectRibFractureNodeDetectionsDetectionsItem["FractureSegment"].asString());
if(!detectRibFractureNodeDetectionsDetectionsItem["FractureId"].isNull())
detectionsItemObject.fractureId = std::stol(detectRibFractureNodeDetectionsDetectionsItem["FractureId"].asString());
auto allCoordinateImage = value["CoordinateImage"]["CoordinateImage"];
for (auto value : allCoordinateImage)
detectionsItemObject.coordinateImage.push_back(value.asString());
auto allCoordinates = value["Coordinates"]["Coordinates"];
for (auto value : allCoordinates)
detectionsItemObject.coordinates.push_back(value.asString());
auto allCoordinateImage = value["CoordinateImage"]["CoordinateImage"];
for (auto value : allCoordinateImage)
detectionsItemObject.coordinateImage.push_back(value.asString());
data_.detectRibFracture.detections.push_back(detectionsItemObject);
}
auto allOrigin1 = detectRibFractureNode["Origin"]["Origin"];
for (auto value : allOrigin1)
data_.detectRibFracture.origin1.push_back(value.asString());
auto allSpacing2 = detectRibFractureNode["Spacing"]["Spacing"];
for (auto value : allSpacing2)
data_.detectRibFracture.spacing2.push_back(value.asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
auto allSpacing1 = detectRibFractureNode["Spacing"]["Spacing"];
for (auto value : allSpacing1)
data_.detectRibFracture.spacing1.push_back(value.asString());
auto allOrigin2 = detectRibFractureNode["Origin"]["Origin"];
for (auto value : allOrigin2)
data_.detectRibFracture.origin2.push_back(value.asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}