Browse Source

Update ScreenChestCT.

sdk-team 4 years ago
parent
commit
dc86ae9f73

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+2022-06-09 Version: 1.36.1144
+- Update ScreenChestCT.
+
 2022-06-08 Version: 1.36.1143
 - Support GetDataCorrectOrderDetail API to return execMode type.
 - Support CreateDataCorrectOrder, CreateFreeLockCorrectOrder API submit with execMode type.

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1143
+1.36.1144

+ 3 - 0
imageprocess/include/alibabacloud/imageprocess/model/ScreenChestCTRequest.h

@@ -43,6 +43,8 @@ public:
 	void setURLList(const std::vector<URLList> &uRLList);
 	std::string getOrgId() const;
 	void setOrgId(const std::string &orgId);
+	long getVerbose() const;
+	void setVerbose(long verbose);
 	bool getAsync() const;
 	void setAsync(bool async);
 
@@ -52,6 +54,7 @@ private:
 	std::string dataFormat_;
 	std::vector<URLList> uRLList_;
 	std::string orgId_;
+	long verbose_;
 	bool async_;
 };
 } // namespace Model

+ 0 - 99
imageprocess/include/alibabacloud/imageprocess/model/ScreenChestCTResult.h

@@ -32,114 +32,15 @@ namespace AlibabaCloud
 			class ALIBABACLOUD_IMAGEPROCESS_EXPORT ScreenChestCTResult : public ServiceResult
 			{
 			public:
-				struct Data
-				{
-					struct LungNodule
-					{
-						struct Serie
-						{
-							struct Element
-							{
-								float imageZ;
-								float imageY;
-								std::string lobe;
-								float imageX;
-								std::string category;
-								std::string lung;
-								float meanValue;
-								float confidence;
-								float volume;
-								float x;
-								float y;
-								float z;
-								std::string sOPInstanceUID;
-								float diameter;
-							};
-							std::vector<std::string> origin;
-							std::string report;
-							std::vector<std::string> spacing;
-							std::vector<Serie::Element> elements;
-							std::string seriesInstanceUid;
-						};
-						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
-						{
-							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> origin2;
-						std::vector<std::string> spacing1;
-						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;
-				};
 
 
 				ScreenChestCTResult();
 				explicit ScreenChestCTResult(const std::string &payload);
 				~ScreenChestCTResult();
-				std::string getMessage()const;
-				Data getData()const;
-				std::string getCode()const;
 
 			protected:
 				void parse(const std::string &payload);
 			private:
-				std::string message_;
-				Data data_;
-				std::string code_;
 
 			};
 		}

+ 9 - 0
imageprocess/src/model/ScreenChestCTRequest.cc

@@ -74,6 +74,15 @@ void ScreenChestCTRequest::setOrgId(const std::string &orgId) {
   setBodyParameter(std::string("OrgId"), orgId);
 }
 
+long ScreenChestCTRequest::getVerbose() const {
+  return verbose_;
+}
+
+void ScreenChestCTRequest::setVerbose(long verbose) {
+  verbose_ = verbose;
+  setBodyParameter(std::string("Verbose"), std::to_string(verbose));
+}
+
 bool ScreenChestCTRequest::getAsync() const {
   return async_;
 }

+ 0 - 155
imageprocess/src/model/ScreenChestCTResult.cc

@@ -39,161 +39,6 @@ void ScreenChestCTResult::parse(const std::string &payload)
 	Json::Value value;
 	reader.parse(payload, value);
 	setRequestId(value["RequestId"].asString());
-	auto dataNode = value["Data"];
-	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["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["Lobe"].isNull())
-				elementsObject.lobe = lungNoduleNodeSeriesSerieElementsElement["Lobe"].asString();
-			if(!lungNoduleNodeSeriesSerieElementsElement["MeanValue"].isNull())
-				elementsObject.meanValue = std::stof(lungNoduleNodeSeriesSerieElementsElement["MeanValue"].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["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"];
-		for (auto value : allOrigin)
-			serieObject.origin.push_back(value.asString());
-		auto allSpacing = value["Spacing"]["Spacing"];
-		for (auto value : allSpacing)
-			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();
-	auto allDetectionsNode = detectRibFractureNode["Detections"]["DetectionsItem"];
-	for (auto detectRibFractureNodeDetectionsDetectionsItem : allDetectionsNode)
-	{
-		Data::DetectRibFracture::DetectionsItem detectionsItemObject;
-		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());
-		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 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());
-	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())
-		message_ = value["Message"].asString();
 
 }
 
-std::string ScreenChestCTResult::getMessage()const
-{
-	return message_;
-}
-
-ScreenChestCTResult::Data ScreenChestCTResult::getData()const
-{
-	return data_;
-}
-
-std::string ScreenChestCTResult::getCode()const
-{
-	return code_;
-}
-