From 168f87689bd515754f61991a24766bad8499545d Mon Sep 17 00:00:00 2001 From: sdk-team Date: Fri, 27 May 2022 10:21:31 +0000 Subject: [PATCH] Release DetectLymph DetectPanc. --- CHANGELOG | 3 + VERSION | 2 +- imageprocess/CMakeLists.txt | 12 ++ .../imageprocess/ImageprocessClient.h | 24 ++++ .../imageprocess/model/CalcCACSResult.h | 12 ++ .../imageprocess/model/DetectLymphRequest.h | 51 +++++++++ .../imageprocess/model/DetectLymphResult.h | 49 ++++++++ .../imageprocess/model/DetectPancRequest.h | 51 +++++++++ .../imageprocess/model/DetectPancResult.h | 67 +++++++++++ .../model/FeedbackSessionRequest.h | 45 ++++++++ .../model/FeedbackSessionResult.h | 59 ++++++++++ imageprocess/src/ImageprocessClient.cc | 108 ++++++++++++++++++ imageprocess/src/model/CalcCACSResult.cc | 28 +++++ imageprocess/src/model/DetectLymphRequest.cc | 58 ++++++++++ imageprocess/src/model/DetectLymphResult.cc | 44 +++++++ imageprocess/src/model/DetectPancRequest.cc | 58 ++++++++++ imageprocess/src/model/DetectPancResult.cc | 76 ++++++++++++ .../src/model/FeedbackSessionRequest.cc | 45 ++++++++ .../src/model/FeedbackSessionResult.cc | 66 +++++++++++ 19 files changed, 857 insertions(+), 1 deletion(-) create mode 100644 imageprocess/include/alibabacloud/imageprocess/model/DetectLymphRequest.h create mode 100644 imageprocess/include/alibabacloud/imageprocess/model/DetectLymphResult.h create mode 100644 imageprocess/include/alibabacloud/imageprocess/model/DetectPancRequest.h create mode 100644 imageprocess/include/alibabacloud/imageprocess/model/DetectPancResult.h create mode 100644 imageprocess/include/alibabacloud/imageprocess/model/FeedbackSessionRequest.h create mode 100644 imageprocess/include/alibabacloud/imageprocess/model/FeedbackSessionResult.h create mode 100644 imageprocess/src/model/DetectLymphRequest.cc create mode 100644 imageprocess/src/model/DetectLymphResult.cc create mode 100644 imageprocess/src/model/DetectPancRequest.cc create mode 100644 imageprocess/src/model/DetectPancResult.cc create mode 100644 imageprocess/src/model/FeedbackSessionRequest.cc create mode 100644 imageprocess/src/model/FeedbackSessionResult.cc diff --git a/CHANGELOG b/CHANGELOG index f8271c1e5..d96e2075e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2022-05-27 Version: 1.36.1137 +- Release DetectLymph DetectPanc. + 2022-05-25 Version: 1.36.1136 - Release RecognizeTurkeyIdentityCard RecognizeMalaysiaIdentityCard RecognizeRussiaIdentityCard RecognizeIndonesiaIdentityCard RecognizeIndonesiaIdentityCard. diff --git a/VERSION b/VERSION index f68700395..73b24ba22 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1136 \ No newline at end of file +1.36.1137 \ No newline at end of file diff --git a/imageprocess/CMakeLists.txt b/imageprocess/CMakeLists.txt index c96a069ae..7ff38c24a 100644 --- a/imageprocess/CMakeLists.txt +++ b/imageprocess/CMakeLists.txt @@ -37,12 +37,18 @@ set(imageprocess_public_header_model include/alibabacloud/imageprocess/model/DetectKneeXRayResult.h include/alibabacloud/imageprocess/model/DetectLungNoduleRequest.h include/alibabacloud/imageprocess/model/DetectLungNoduleResult.h + include/alibabacloud/imageprocess/model/DetectLymphRequest.h + include/alibabacloud/imageprocess/model/DetectLymphResult.h + include/alibabacloud/imageprocess/model/DetectPancRequest.h + include/alibabacloud/imageprocess/model/DetectPancResult.h include/alibabacloud/imageprocess/model/DetectRibFractureRequest.h include/alibabacloud/imageprocess/model/DetectRibFractureResult.h include/alibabacloud/imageprocess/model/DetectSkinDiseaseRequest.h include/alibabacloud/imageprocess/model/DetectSkinDiseaseResult.h include/alibabacloud/imageprocess/model/DetectSpineMRIRequest.h include/alibabacloud/imageprocess/model/DetectSpineMRIResult.h + include/alibabacloud/imageprocess/model/FeedbackSessionRequest.h + include/alibabacloud/imageprocess/model/FeedbackSessionResult.h include/alibabacloud/imageprocess/model/GetAsyncJobResultRequest.h include/alibabacloud/imageprocess/model/GetAsyncJobResultResult.h include/alibabacloud/imageprocess/model/RunCTRegistrationRequest.h @@ -72,12 +78,18 @@ set(imageprocess_src src/model/DetectKneeXRayResult.cc src/model/DetectLungNoduleRequest.cc src/model/DetectLungNoduleResult.cc + src/model/DetectLymphRequest.cc + src/model/DetectLymphResult.cc + src/model/DetectPancRequest.cc + src/model/DetectPancResult.cc src/model/DetectRibFractureRequest.cc src/model/DetectRibFractureResult.cc src/model/DetectSkinDiseaseRequest.cc src/model/DetectSkinDiseaseResult.cc src/model/DetectSpineMRIRequest.cc src/model/DetectSpineMRIResult.cc + src/model/FeedbackSessionRequest.cc + src/model/FeedbackSessionResult.cc src/model/GetAsyncJobResultRequest.cc src/model/GetAsyncJobResultResult.cc src/model/RunCTRegistrationRequest.cc diff --git a/imageprocess/include/alibabacloud/imageprocess/ImageprocessClient.h b/imageprocess/include/alibabacloud/imageprocess/ImageprocessClient.h index 197b529b4..19111ae3d 100644 --- a/imageprocess/include/alibabacloud/imageprocess/ImageprocessClient.h +++ b/imageprocess/include/alibabacloud/imageprocess/ImageprocessClient.h @@ -38,12 +38,18 @@ #include "model/DetectKneeXRayResult.h" #include "model/DetectLungNoduleRequest.h" #include "model/DetectLungNoduleResult.h" +#include "model/DetectLymphRequest.h" +#include "model/DetectLymphResult.h" +#include "model/DetectPancRequest.h" +#include "model/DetectPancResult.h" #include "model/DetectRibFractureRequest.h" #include "model/DetectRibFractureResult.h" #include "model/DetectSkinDiseaseRequest.h" #include "model/DetectSkinDiseaseResult.h" #include "model/DetectSpineMRIRequest.h" #include "model/DetectSpineMRIResult.h" +#include "model/FeedbackSessionRequest.h" +#include "model/FeedbackSessionResult.h" #include "model/GetAsyncJobResultRequest.h" #include "model/GetAsyncJobResultResult.h" #include "model/RunCTRegistrationRequest.h" @@ -87,6 +93,12 @@ namespace AlibabaCloud typedef Outcome DetectLungNoduleOutcome; typedef std::future DetectLungNoduleOutcomeCallable; typedef std::function&)> DetectLungNoduleAsyncHandler; + typedef Outcome DetectLymphOutcome; + typedef std::future DetectLymphOutcomeCallable; + typedef std::function&)> DetectLymphAsyncHandler; + typedef Outcome DetectPancOutcome; + typedef std::future DetectPancOutcomeCallable; + typedef std::function&)> DetectPancAsyncHandler; typedef Outcome DetectRibFractureOutcome; typedef std::future DetectRibFractureOutcomeCallable; typedef std::function&)> DetectRibFractureAsyncHandler; @@ -96,6 +108,9 @@ namespace AlibabaCloud typedef Outcome DetectSpineMRIOutcome; typedef std::future DetectSpineMRIOutcomeCallable; typedef std::function&)> DetectSpineMRIAsyncHandler; + typedef Outcome FeedbackSessionOutcome; + typedef std::future FeedbackSessionOutcomeCallable; + typedef std::function&)> FeedbackSessionAsyncHandler; typedef Outcome GetAsyncJobResultOutcome; typedef std::future GetAsyncJobResultOutcomeCallable; typedef std::function&)> GetAsyncJobResultAsyncHandler; @@ -140,6 +155,12 @@ namespace AlibabaCloud DetectLungNoduleOutcome detectLungNodule(const Model::DetectLungNoduleRequest &request)const; void detectLungNoduleAsync(const Model::DetectLungNoduleRequest& request, const DetectLungNoduleAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DetectLungNoduleOutcomeCallable detectLungNoduleCallable(const Model::DetectLungNoduleRequest& request) const; + DetectLymphOutcome detectLymph(const Model::DetectLymphRequest &request)const; + void detectLymphAsync(const Model::DetectLymphRequest& request, const DetectLymphAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DetectLymphOutcomeCallable detectLymphCallable(const Model::DetectLymphRequest& request) const; + DetectPancOutcome detectPanc(const Model::DetectPancRequest &request)const; + void detectPancAsync(const Model::DetectPancRequest& request, const DetectPancAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DetectPancOutcomeCallable detectPancCallable(const Model::DetectPancRequest& request) const; DetectRibFractureOutcome detectRibFracture(const Model::DetectRibFractureRequest &request)const; void detectRibFractureAsync(const Model::DetectRibFractureRequest& request, const DetectRibFractureAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DetectRibFractureOutcomeCallable detectRibFractureCallable(const Model::DetectRibFractureRequest& request) const; @@ -149,6 +170,9 @@ namespace AlibabaCloud DetectSpineMRIOutcome detectSpineMRI(const Model::DetectSpineMRIRequest &request)const; void detectSpineMRIAsync(const Model::DetectSpineMRIRequest& request, const DetectSpineMRIAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DetectSpineMRIOutcomeCallable detectSpineMRICallable(const Model::DetectSpineMRIRequest& request) const; + FeedbackSessionOutcome feedbackSession(const Model::FeedbackSessionRequest &request)const; + void feedbackSessionAsync(const Model::FeedbackSessionRequest& request, const FeedbackSessionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + FeedbackSessionOutcomeCallable feedbackSessionCallable(const Model::FeedbackSessionRequest& request) const; GetAsyncJobResultOutcome getAsyncJobResult(const Model::GetAsyncJobResultRequest &request)const; void getAsyncJobResultAsync(const Model::GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetAsyncJobResultOutcomeCallable getAsyncJobResultCallable(const Model::GetAsyncJobResultRequest& request) const; diff --git a/imageprocess/include/alibabacloud/imageprocess/model/CalcCACSResult.h b/imageprocess/include/alibabacloud/imageprocess/model/CalcCACSResult.h index 98a7626c9..9d3b14bd9 100644 --- a/imageprocess/include/alibabacloud/imageprocess/model/CalcCACSResult.h +++ b/imageprocess/include/alibabacloud/imageprocess/model/CalcCACSResult.h @@ -34,7 +34,15 @@ namespace AlibabaCloud public: struct Data { + struct DetectionsItem + { + float calciumVolume; + float calciumScore; + long calciumId; + }; std::string score; + std::vector detections; + std::string volumeScore; std::string resultUrl; }; @@ -42,12 +50,16 @@ namespace AlibabaCloud CalcCACSResult(); explicit CalcCACSResult(const std::string &payload); ~CalcCACSResult(); + 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_; }; } diff --git a/imageprocess/include/alibabacloud/imageprocess/model/DetectLymphRequest.h b/imageprocess/include/alibabacloud/imageprocess/model/DetectLymphRequest.h new file mode 100644 index 000000000..52a276d72 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/DetectLymphRequest.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTLYMPHREQUEST_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTLYMPHREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Imageprocess { +namespace Model { +class ALIBABACLOUD_IMAGEPROCESS_EXPORT DetectLymphRequest : public RpcServiceRequest { +public: + struct URLList { + std::string uRL; + }; + DetectLymphRequest(); + ~DetectLymphRequest(); + std::string getDataSourceType() const; + void setDataSourceType(const std::string &dataSourceType); + std::vector getURLList() const; + void setURLList(const std::vector &uRLList); + bool getAsync() const; + void setAsync(bool async); + +private: + std::string dataSourceType_; + std::vector uRLList_; + bool async_; +}; +} // namespace Model +} // namespace Imageprocess +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTLYMPHREQUEST_H_ diff --git a/imageprocess/include/alibabacloud/imageprocess/model/DetectLymphResult.h b/imageprocess/include/alibabacloud/imageprocess/model/DetectLymphResult.h new file mode 100644 index 000000000..2ae807a39 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/DetectLymphResult.h @@ -0,0 +1,49 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTLYMPHRESULT_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTLYMPHRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT DetectLymphResult : public ServiceResult + { + public: + + + DetectLymphResult(); + explicit DetectLymphResult(const std::string &payload); + ~DetectLymphResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTLYMPHRESULT_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/DetectPancRequest.h b/imageprocess/include/alibabacloud/imageprocess/model/DetectPancRequest.h new file mode 100644 index 000000000..41581aa71 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/DetectPancRequest.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTPANCREQUEST_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTPANCREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Imageprocess { +namespace Model { +class ALIBABACLOUD_IMAGEPROCESS_EXPORT DetectPancRequest : public RpcServiceRequest { +public: + struct URLList { + std::string uRL; + }; + DetectPancRequest(); + ~DetectPancRequest(); + std::string getDataSourceType() const; + void setDataSourceType(const std::string &dataSourceType); + std::vector getURLList() const; + void setURLList(const std::vector &uRLList); + bool getAsync() const; + void setAsync(bool async); + +private: + std::string dataSourceType_; + std::vector uRLList_; + bool async_; +}; +} // namespace Model +} // namespace Imageprocess +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTPANCREQUEST_H_ diff --git a/imageprocess/include/alibabacloud/imageprocess/model/DetectPancResult.h b/imageprocess/include/alibabacloud/imageprocess/model/DetectPancResult.h new file mode 100644 index 000000000..57b3afb44 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/DetectPancResult.h @@ -0,0 +1,67 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTPANCRESULT_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTPANCRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT DetectPancResult : public ServiceResult + { + public: + struct Data + { + struct Lesion + { + std::string pdacVol; + std::string pancVol; + std::string mask; + std::string nonPdacVol; + std::vector possibilities; + }; + Lesion lesion; + }; + + + DetectPancResult(); + explicit DetectPancResult(const std::string &payload); + ~DetectPancResult(); + 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_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTPANCRESULT_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/FeedbackSessionRequest.h b/imageprocess/include/alibabacloud/imageprocess/model/FeedbackSessionRequest.h new file mode 100644 index 000000000..e09471cc3 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/FeedbackSessionRequest.h @@ -0,0 +1,45 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IMAGEPROCESS_MODEL_FEEDBACKSESSIONREQUEST_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_FEEDBACKSESSIONREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Imageprocess { +namespace Model { +class ALIBABACLOUD_IMAGEPROCESS_EXPORT FeedbackSessionRequest : public RpcServiceRequest { +public: + FeedbackSessionRequest(); + ~FeedbackSessionRequest(); + std::string getSessionId() const; + void setSessionId(const std::string &sessionId); + std::string getFeedback() const; + void setFeedback(const std::string &feedback); + +private: + std::string sessionId_; + std::string feedback_; +}; +} // namespace Model +} // namespace Imageprocess +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_FEEDBACKSESSIONREQUEST_H_ diff --git a/imageprocess/include/alibabacloud/imageprocess/model/FeedbackSessionResult.h b/imageprocess/include/alibabacloud/imageprocess/model/FeedbackSessionResult.h new file mode 100644 index 000000000..bb202f734 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/FeedbackSessionResult.h @@ -0,0 +1,59 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IMAGEPROCESS_MODEL_FEEDBACKSESSIONRESULT_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_FEEDBACKSESSIONRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT FeedbackSessionResult : public ServiceResult + { + public: + struct Data + { + std::string data; + }; + + + FeedbackSessionResult(); + explicit FeedbackSessionResult(const std::string &payload); + ~FeedbackSessionResult(); + 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_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_FEEDBACKSESSIONRESULT_H_ \ No newline at end of file diff --git a/imageprocess/src/ImageprocessClient.cc b/imageprocess/src/ImageprocessClient.cc index 8fa1060fd..6b59fe65e 100644 --- a/imageprocess/src/ImageprocessClient.cc +++ b/imageprocess/src/ImageprocessClient.cc @@ -339,6 +339,78 @@ ImageprocessClient::DetectLungNoduleOutcomeCallable ImageprocessClient::detectLu return task->get_future(); } +ImageprocessClient::DetectLymphOutcome ImageprocessClient::detectLymph(const DetectLymphRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DetectLymphOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DetectLymphOutcome(DetectLymphResult(outcome.result())); + else + return DetectLymphOutcome(outcome.error()); +} + +void ImageprocessClient::detectLymphAsync(const DetectLymphRequest& request, const DetectLymphAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, detectLymph(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ImageprocessClient::DetectLymphOutcomeCallable ImageprocessClient::detectLymphCallable(const DetectLymphRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->detectLymph(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ImageprocessClient::DetectPancOutcome ImageprocessClient::detectPanc(const DetectPancRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DetectPancOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DetectPancOutcome(DetectPancResult(outcome.result())); + else + return DetectPancOutcome(outcome.error()); +} + +void ImageprocessClient::detectPancAsync(const DetectPancRequest& request, const DetectPancAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, detectPanc(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ImageprocessClient::DetectPancOutcomeCallable ImageprocessClient::detectPancCallable(const DetectPancRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->detectPanc(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ImageprocessClient::DetectRibFractureOutcome ImageprocessClient::detectRibFracture(const DetectRibFractureRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -447,6 +519,42 @@ ImageprocessClient::DetectSpineMRIOutcomeCallable ImageprocessClient::detectSpin return task->get_future(); } +ImageprocessClient::FeedbackSessionOutcome ImageprocessClient::feedbackSession(const FeedbackSessionRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return FeedbackSessionOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return FeedbackSessionOutcome(FeedbackSessionResult(outcome.result())); + else + return FeedbackSessionOutcome(outcome.error()); +} + +void ImageprocessClient::feedbackSessionAsync(const FeedbackSessionRequest& request, const FeedbackSessionAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, feedbackSession(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ImageprocessClient::FeedbackSessionOutcomeCallable ImageprocessClient::feedbackSessionCallable(const FeedbackSessionRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->feedbackSession(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ImageprocessClient::GetAsyncJobResultOutcome ImageprocessClient::getAsyncJobResult(const GetAsyncJobResultRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/imageprocess/src/model/CalcCACSResult.cc b/imageprocess/src/model/CalcCACSResult.cc index 3c263cdce..580688df5 100644 --- a/imageprocess/src/model/CalcCACSResult.cc +++ b/imageprocess/src/model/CalcCACSResult.cc @@ -44,11 +44,39 @@ void CalcCACSResult::parse(const std::string &payload) data_.resultUrl = dataNode["ResultUrl"].asString(); if(!dataNode["Score"].isNull()) data_.score = dataNode["Score"].asString(); + if(!dataNode["VolumeScore"].isNull()) + data_.volumeScore = dataNode["VolumeScore"].asString(); + auto allDetectionsNode = dataNode["Detections"]["detectionsItem"]; + for (auto dataNodeDetectionsdetectionsItem : allDetectionsNode) + { + Data::DetectionsItem detectionsItemObject; + if(!dataNodeDetectionsdetectionsItem["CalciumId"].isNull()) + detectionsItemObject.calciumId = std::stol(dataNodeDetectionsdetectionsItem["CalciumId"].asString()); + if(!dataNodeDetectionsdetectionsItem["CalciumScore"].isNull()) + detectionsItemObject.calciumScore = std::stof(dataNodeDetectionsdetectionsItem["CalciumScore"].asString()); + if(!dataNodeDetectionsdetectionsItem["CalciumVolume"].isNull()) + detectionsItemObject.calciumVolume = std::stof(dataNodeDetectionsdetectionsItem["CalciumVolume"].asString()); + data_.detections.push_back(detectionsItemObject); + } + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); } +std::string CalcCACSResult::getMessage()const +{ + return message_; +} + CalcCACSResult::Data CalcCACSResult::getData()const { return data_; } +std::string CalcCACSResult::getCode()const +{ + return code_; +} + diff --git a/imageprocess/src/model/DetectLymphRequest.cc b/imageprocess/src/model/DetectLymphRequest.cc new file mode 100644 index 000000000..23ff5df06 --- /dev/null +++ b/imageprocess/src/model/DetectLymphRequest.cc @@ -0,0 +1,58 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Imageprocess::Model::DetectLymphRequest; + +DetectLymphRequest::DetectLymphRequest() + : RpcServiceRequest("imageprocess", "2020-03-20", "DetectLymph") { + setMethod(HttpRequest::Method::Post); +} + +DetectLymphRequest::~DetectLymphRequest() {} + +std::string DetectLymphRequest::getDataSourceType() const { + return dataSourceType_; +} + +void DetectLymphRequest::setDataSourceType(const std::string &dataSourceType) { + dataSourceType_ = dataSourceType; + setBodyParameter(std::string("DataSourceType"), dataSourceType); +} + +std::vector DetectLymphRequest::getURLList() const { + return uRLList_; +} + +void DetectLymphRequest::setURLList(const std::vector &uRLList) { + uRLList_ = uRLList; + for(int dep1 = 0; dep1 != uRLList.size(); dep1++) { + auto uRLListObj = uRLList.at(dep1); + std::string uRLListObjStr = std::string("URLList") + "." + std::to_string(dep1 + 1); + setBodyParameter(uRLListObjStr + ".URL", uRLListObj.uRL); + } +} + +bool DetectLymphRequest::getAsync() const { + return async_; +} + +void DetectLymphRequest::setAsync(bool async) { + async_ = async; + setBodyParameter(std::string("Async"), async ? "true" : "false"); +} + diff --git a/imageprocess/src/model/DetectLymphResult.cc b/imageprocess/src/model/DetectLymphResult.cc new file mode 100644 index 000000000..d83d6ab97 --- /dev/null +++ b/imageprocess/src/model/DetectLymphResult.cc @@ -0,0 +1,44 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Imageprocess; +using namespace AlibabaCloud::Imageprocess::Model; + +DetectLymphResult::DetectLymphResult() : + ServiceResult() +{} + +DetectLymphResult::DetectLymphResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DetectLymphResult::~DetectLymphResult() +{} + +void DetectLymphResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/imageprocess/src/model/DetectPancRequest.cc b/imageprocess/src/model/DetectPancRequest.cc new file mode 100644 index 000000000..44f95348a --- /dev/null +++ b/imageprocess/src/model/DetectPancRequest.cc @@ -0,0 +1,58 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Imageprocess::Model::DetectPancRequest; + +DetectPancRequest::DetectPancRequest() + : RpcServiceRequest("imageprocess", "2020-03-20", "DetectPanc") { + setMethod(HttpRequest::Method::Post); +} + +DetectPancRequest::~DetectPancRequest() {} + +std::string DetectPancRequest::getDataSourceType() const { + return dataSourceType_; +} + +void DetectPancRequest::setDataSourceType(const std::string &dataSourceType) { + dataSourceType_ = dataSourceType; + setBodyParameter(std::string("DataSourceType"), dataSourceType); +} + +std::vector DetectPancRequest::getURLList() const { + return uRLList_; +} + +void DetectPancRequest::setURLList(const std::vector &uRLList) { + uRLList_ = uRLList; + for(int dep1 = 0; dep1 != uRLList.size(); dep1++) { + auto uRLListObj = uRLList.at(dep1); + std::string uRLListObjStr = std::string("URLList") + "." + std::to_string(dep1 + 1); + setBodyParameter(uRLListObjStr + ".URL", uRLListObj.uRL); + } +} + +bool DetectPancRequest::getAsync() const { + return async_; +} + +void DetectPancRequest::setAsync(bool async) { + async_ = async; + setBodyParameter(std::string("Async"), async ? "true" : "false"); +} + diff --git a/imageprocess/src/model/DetectPancResult.cc b/imageprocess/src/model/DetectPancResult.cc new file mode 100644 index 000000000..057dbab77 --- /dev/null +++ b/imageprocess/src/model/DetectPancResult.cc @@ -0,0 +1,76 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Imageprocess; +using namespace AlibabaCloud::Imageprocess::Model; + +DetectPancResult::DetectPancResult() : + ServiceResult() +{} + +DetectPancResult::DetectPancResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DetectPancResult::~DetectPancResult() +{} + +void DetectPancResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + auto lesionNode = dataNode["Lesion"]; + if(!lesionNode["PancVol"].isNull()) + data_.lesion.pancVol = lesionNode["PancVol"].asString(); + if(!lesionNode["PdacVol"].isNull()) + data_.lesion.pdacVol = lesionNode["PdacVol"].asString(); + if(!lesionNode["NonPdacVol"].isNull()) + data_.lesion.nonPdacVol = lesionNode["NonPdacVol"].asString(); + if(!lesionNode["Mask"].isNull()) + data_.lesion.mask = lesionNode["Mask"].asString(); + auto allPossibilities = lesionNode["Possibilities"]["possibilities"]; + for (auto value : allPossibilities) + data_.lesion.possibilities.push_back(value.asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string DetectPancResult::getMessage()const +{ + return message_; +} + +DetectPancResult::Data DetectPancResult::getData()const +{ + return data_; +} + +std::string DetectPancResult::getCode()const +{ + return code_; +} + diff --git a/imageprocess/src/model/FeedbackSessionRequest.cc b/imageprocess/src/model/FeedbackSessionRequest.cc new file mode 100644 index 000000000..22e8adea1 --- /dev/null +++ b/imageprocess/src/model/FeedbackSessionRequest.cc @@ -0,0 +1,45 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Imageprocess::Model::FeedbackSessionRequest; + +FeedbackSessionRequest::FeedbackSessionRequest() + : RpcServiceRequest("imageprocess", "2020-03-20", "FeedbackSession") { + setMethod(HttpRequest::Method::Post); +} + +FeedbackSessionRequest::~FeedbackSessionRequest() {} + +std::string FeedbackSessionRequest::getSessionId() const { + return sessionId_; +} + +void FeedbackSessionRequest::setSessionId(const std::string &sessionId) { + sessionId_ = sessionId; + setBodyParameter(std::string("SessionId"), sessionId); +} + +std::string FeedbackSessionRequest::getFeedback() const { + return feedback_; +} + +void FeedbackSessionRequest::setFeedback(const std::string &feedback) { + feedback_ = feedback; + setBodyParameter(std::string("Feedback"), feedback); +} + diff --git a/imageprocess/src/model/FeedbackSessionResult.cc b/imageprocess/src/model/FeedbackSessionResult.cc new file mode 100644 index 000000000..6d5abd3a5 --- /dev/null +++ b/imageprocess/src/model/FeedbackSessionResult.cc @@ -0,0 +1,66 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Imageprocess; +using namespace AlibabaCloud::Imageprocess::Model; + +FeedbackSessionResult::FeedbackSessionResult() : + ServiceResult() +{} + +FeedbackSessionResult::FeedbackSessionResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +FeedbackSessionResult::~FeedbackSessionResult() +{} + +void FeedbackSessionResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + if(!dataNode["Data"].isNull()) + data_.data = dataNode["Data"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string FeedbackSessionResult::getMessage()const +{ + return message_; +} + +FeedbackSessionResult::Data FeedbackSessionResult::getData()const +{ + return data_; +} + +std::string FeedbackSessionResult::getCode()const +{ + return code_; +} +