diff --git a/CHANGELOG b/CHANGELOG index b893eda70..d793beee8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-08-13 Version: 1.36.577 +- Release DetectKneeXRay DetectSpineMRI TranslateMed. + 2020-08-13 Version: 1.36.576 - GetImageTranslate add column orc. diff --git a/VERSION b/VERSION index f6ef721d1..8200d2ac8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.576 \ No newline at end of file +1.36.577 \ No newline at end of file diff --git a/imageprocess/CMakeLists.txt b/imageprocess/CMakeLists.txt new file mode 100644 index 000000000..e404b83e7 --- /dev/null +++ b/imageprocess/CMakeLists.txt @@ -0,0 +1,106 @@ +# +# 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. +# + +set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include) + +set(imageprocess_public_header + include/alibabacloud/imageprocess/ImageprocessClient.h + include/alibabacloud/imageprocess/ImageprocessExport.h ) + +set(imageprocess_public_header_model + include/alibabacloud/imageprocess/model/DetectCovid19CadRequest.h + include/alibabacloud/imageprocess/model/DetectCovid19CadResult.h + include/alibabacloud/imageprocess/model/DetectKneeXRayRequest.h + include/alibabacloud/imageprocess/model/DetectKneeXRayResult.h + include/alibabacloud/imageprocess/model/DetectLungNoduleRequest.h + include/alibabacloud/imageprocess/model/DetectLungNoduleResult.h + include/alibabacloud/imageprocess/model/DetectSpineMRIRequest.h + include/alibabacloud/imageprocess/model/DetectSpineMRIResult.h + include/alibabacloud/imageprocess/model/GetAsyncJobResultRequest.h + include/alibabacloud/imageprocess/model/GetAsyncJobResultResult.h + include/alibabacloud/imageprocess/model/TranslateMedRequest.h + include/alibabacloud/imageprocess/model/TranslateMedResult.h ) + +set(imageprocess_src + src/ImageprocessClient.cc + src/model/DetectCovid19CadRequest.cc + src/model/DetectCovid19CadResult.cc + src/model/DetectKneeXRayRequest.cc + src/model/DetectKneeXRayResult.cc + src/model/DetectLungNoduleRequest.cc + src/model/DetectLungNoduleResult.cc + src/model/DetectSpineMRIRequest.cc + src/model/DetectSpineMRIResult.cc + src/model/GetAsyncJobResultRequest.cc + src/model/GetAsyncJobResultResult.cc + src/model/TranslateMedRequest.cc + src/model/TranslateMedResult.cc ) + +add_library(imageprocess ${LIB_TYPE} + ${imageprocess_public_header} + ${imageprocess_public_header_model} + ${imageprocess_src}) + +set_target_properties(imageprocess + PROPERTIES + LINKER_LANGUAGE CXX + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin + OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}imageprocess + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(imageprocess + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_IMAGEPROCESS_LIBRARY) +endif() + +target_include_directories(imageprocess + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(imageprocess + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(imageprocess + jsoncpp) + target_include_directories(imageprocess + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(imageprocess + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(imageprocess + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(imageprocess + PRIVATE /usr/include/jsoncpp) + target_link_libraries(imageprocess + jsoncpp) +endif() + +install(FILES ${imageprocess_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/imageprocess) +install(FILES ${imageprocess_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/imageprocess/model) +install(TARGETS imageprocess + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/ImageprocessClient.h b/imageprocess/include/alibabacloud/imageprocess/ImageprocessClient.h new file mode 100644 index 000000000..bb7e795cf --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/ImageprocessClient.h @@ -0,0 +1,94 @@ +/* + * 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_IMAGEPROCESSCLIENT_H_ +#define ALIBABACLOUD_IMAGEPROCESS_IMAGEPROCESSCLIENT_H_ + +#include +#include +#include +#include +#include "ImageprocessExport.h" +#include "model/DetectCovid19CadRequest.h" +#include "model/DetectCovid19CadResult.h" +#include "model/DetectKneeXRayRequest.h" +#include "model/DetectKneeXRayResult.h" +#include "model/DetectLungNoduleRequest.h" +#include "model/DetectLungNoduleResult.h" +#include "model/DetectSpineMRIRequest.h" +#include "model/DetectSpineMRIResult.h" +#include "model/GetAsyncJobResultRequest.h" +#include "model/GetAsyncJobResultResult.h" +#include "model/TranslateMedRequest.h" +#include "model/TranslateMedResult.h" + + +namespace AlibabaCloud +{ + namespace Imageprocess + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT ImageprocessClient : public RpcServiceClient + { + public: + typedef Outcome DetectCovid19CadOutcome; + typedef std::future DetectCovid19CadOutcomeCallable; + typedef std::function&)> DetectCovid19CadAsyncHandler; + typedef Outcome DetectKneeXRayOutcome; + typedef std::future DetectKneeXRayOutcomeCallable; + typedef std::function&)> DetectKneeXRayAsyncHandler; + typedef Outcome DetectLungNoduleOutcome; + typedef std::future DetectLungNoduleOutcomeCallable; + typedef std::function&)> DetectLungNoduleAsyncHandler; + typedef Outcome DetectSpineMRIOutcome; + typedef std::future DetectSpineMRIOutcomeCallable; + typedef std::function&)> DetectSpineMRIAsyncHandler; + typedef Outcome GetAsyncJobResultOutcome; + typedef std::future GetAsyncJobResultOutcomeCallable; + typedef std::function&)> GetAsyncJobResultAsyncHandler; + typedef Outcome TranslateMedOutcome; + typedef std::future TranslateMedOutcomeCallable; + typedef std::function&)> TranslateMedAsyncHandler; + + ImageprocessClient(const Credentials &credentials, const ClientConfiguration &configuration); + ImageprocessClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + ImageprocessClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~ImageprocessClient(); + DetectCovid19CadOutcome detectCovid19Cad(const Model::DetectCovid19CadRequest &request)const; + void detectCovid19CadAsync(const Model::DetectCovid19CadRequest& request, const DetectCovid19CadAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DetectCovid19CadOutcomeCallable detectCovid19CadCallable(const Model::DetectCovid19CadRequest& request) const; + DetectKneeXRayOutcome detectKneeXRay(const Model::DetectKneeXRayRequest &request)const; + void detectKneeXRayAsync(const Model::DetectKneeXRayRequest& request, const DetectKneeXRayAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DetectKneeXRayOutcomeCallable detectKneeXRayCallable(const Model::DetectKneeXRayRequest& request) const; + 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; + 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; + 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; + TranslateMedOutcome translateMed(const Model::TranslateMedRequest &request)const; + void translateMedAsync(const Model::TranslateMedRequest& request, const TranslateMedAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + TranslateMedOutcomeCallable translateMedCallable(const Model::TranslateMedRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_IMAGEPROCESS_IMAGEPROCESSCLIENT_H_ diff --git a/imageprocess/include/alibabacloud/imageprocess/ImageprocessExport.h b/imageprocess/include/alibabacloud/imageprocess/ImageprocessExport.h new file mode 100644 index 000000000..24851dabe --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/ImageprocessExport.h @@ -0,0 +1,32 @@ +/* + * 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_IMAGEPROCESSEXPORT_H_ +#define ALIBABACLOUD_IMAGEPROCESS_IMAGEPROCESSEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_IMAGEPROCESS_LIBRARY) +# define ALIBABACLOUD_IMAGEPROCESS_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_IMAGEPROCESS_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_IMAGEPROCESS_EXPORT +#endif + +#endif // !ALIBABACLOUD_IMAGEPROCESS_IMAGEPROCESSEXPORT_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/DetectCovid19CadRequest.h b/imageprocess/include/alibabacloud/imageprocess/model/DetectCovid19CadRequest.h new file mode 100644 index 000000000..8cf1063b2 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/DetectCovid19CadRequest.h @@ -0,0 +1,56 @@ +/* + * 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_DETECTCOVID19CADREQUEST_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTCOVID19CADREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT DetectCovid19CadRequest : public RpcServiceRequest + { + public: + struct URLList + { + std::string uRL; + }; + + public: + DetectCovid19CadRequest(); + ~DetectCovid19CadRequest(); + + std::vector getURLList()const; + void setURLList(const std::vector& uRLList); + bool getAsync()const; + void setAsync(bool async); + + private: + std::vector uRLList_; + bool async_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTCOVID19CADREQUEST_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/DetectCovid19CadResult.h b/imageprocess/include/alibabacloud/imageprocess/model/DetectCovid19CadResult.h new file mode 100644 index 000000000..0a59cbffc --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/DetectCovid19CadResult.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_DETECTCOVID19CADRESULT_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTCOVID19CADRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT DetectCovid19CadResult : public ServiceResult + { + public: + struct Data + { + std::string newProbability; + std::string otherProbability; + std::string normalProbability; + std::string mask; + std::string lesionRatio; + }; + + + DetectCovid19CadResult(); + explicit DetectCovid19CadResult(const std::string &payload); + ~DetectCovid19CadResult(); + Data getData()const; + + protected: + void parse(const std::string &payload); + private: + Data data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTCOVID19CADRESULT_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/DetectKneeXRayRequest.h b/imageprocess/include/alibabacloud/imageprocess/model/DetectKneeXRayRequest.h new file mode 100644 index 000000000..8bcfe64d8 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/DetectKneeXRayRequest.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_DETECTKNEEXRAYREQUEST_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTKNEEXRAYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT DetectKneeXRayRequest : public RpcServiceRequest + { + + public: + DetectKneeXRayRequest(); + ~DetectKneeXRayRequest(); + + std::string getDataFormat()const; + void setDataFormat(const std::string& dataFormat); + std::string getUrl()const; + void setUrl(const std::string& url); + + private: + std::string dataFormat_; + std::string url_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTKNEEXRAYREQUEST_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/DetectKneeXRayResult.h b/imageprocess/include/alibabacloud/imageprocess/model/DetectKneeXRayResult.h new file mode 100644 index 000000000..637adae63 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/DetectKneeXRayResult.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_DETECTKNEEXRAYRESULT_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTKNEEXRAYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT DetectKneeXRayResult : public ServiceResult + { + public: + struct Data + { + struct KLDetectionsItem + { + std::vector detections; + }; + std::vector kLDetections; + }; + + + DetectKneeXRayResult(); + explicit DetectKneeXRayResult(const std::string &payload); + ~DetectKneeXRayResult(); + Data getData()const; + + protected: + void parse(const std::string &payload); + private: + Data data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTKNEEXRAYRESULT_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/DetectLungNoduleRequest.h b/imageprocess/include/alibabacloud/imageprocess/model/DetectLungNoduleRequest.h new file mode 100644 index 000000000..c6a5db806 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/DetectLungNoduleRequest.h @@ -0,0 +1,56 @@ +/* + * 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_DETECTLUNGNODULEREQUEST_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTLUNGNODULEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT DetectLungNoduleRequest : public RpcServiceRequest + { + public: + struct URLList + { + std::string uRL; + }; + + public: + DetectLungNoduleRequest(); + ~DetectLungNoduleRequest(); + + std::vector getURLList()const; + void setURLList(const std::vector& uRLList); + bool getAsync()const; + void setAsync(bool async); + + private: + std::vector uRLList_; + bool async_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTLUNGNODULEREQUEST_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/DetectLungNoduleResult.h b/imageprocess/include/alibabacloud/imageprocess/model/DetectLungNoduleResult.h new file mode 100644 index 000000000..efd59baf6 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/DetectLungNoduleResult.h @@ -0,0 +1,71 @@ +/* + * 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_DETECTLUNGNODULERESULT_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTLUNGNODULERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT DetectLungNoduleResult : public ServiceResult + { + public: + struct Data + { + struct Serie + { + struct Element + { + std::string lobe; + std::string category; + float confidence; + std::string lung; + float x; + float y; + float z; + float diameter; + }; + std::vector elements; + std::string seriesInstanceUid; + }; + std::vector series; + }; + + + DetectLungNoduleResult(); + explicit DetectLungNoduleResult(const std::string &payload); + ~DetectLungNoduleResult(); + Data getData()const; + + protected: + void parse(const std::string &payload); + private: + Data data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTLUNGNODULERESULT_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/DetectSpineMRIRequest.h b/imageprocess/include/alibabacloud/imageprocess/model/DetectSpineMRIRequest.h new file mode 100644 index 000000000..44fa5e3bc --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/DetectSpineMRIRequest.h @@ -0,0 +1,53 @@ +/* + * 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_DETECTSPINEMRIREQUEST_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTSPINEMRIREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT DetectSpineMRIRequest : public RpcServiceRequest + { + public: + struct URLList + { + std::string uRL; + }; + + public: + DetectSpineMRIRequest(); + ~DetectSpineMRIRequest(); + + std::vector getURLList()const; + void setURLList(const std::vector& uRLList); + + private: + std::vector uRLList_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTSPINEMRIREQUEST_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/DetectSpineMRIResult.h b/imageprocess/include/alibabacloud/imageprocess/model/DetectSpineMRIResult.h new file mode 100644 index 000000000..ff74c2574 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/DetectSpineMRIResult.h @@ -0,0 +1,68 @@ +/* + * 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_DETECTSPINEMRIRESULT_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTSPINEMRIRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT DetectSpineMRIResult : public ServiceResult + { + public: + struct Data + { + struct Disc + { + std::string disease; + std::string identification; + std::vector location; + }; + struct Vertebra + { + std::string disease; + std::string identification; + std::vector location1; + }; + std::vector discs; + std::vector vertebras; + }; + + + DetectSpineMRIResult(); + explicit DetectSpineMRIResult(const std::string &payload); + ~DetectSpineMRIResult(); + Data getData()const; + + protected: + void parse(const std::string &payload); + private: + Data data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_DETECTSPINEMRIRESULT_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/GetAsyncJobResultRequest.h b/imageprocess/include/alibabacloud/imageprocess/model/GetAsyncJobResultRequest.h new file mode 100644 index 000000000..8b0f56d50 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/GetAsyncJobResultRequest.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_GETASYNCJOBRESULTREQUEST_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_GETASYNCJOBRESULTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT GetAsyncJobResultRequest : public RpcServiceRequest + { + + public: + GetAsyncJobResultRequest(); + ~GetAsyncJobResultRequest(); + + bool getAsync()const; + void setAsync(bool async); + std::string getJobId()const; + void setJobId(const std::string& jobId); + + private: + bool async_; + std::string jobId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_GETASYNCJOBRESULTREQUEST_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/GetAsyncJobResultResult.h b/imageprocess/include/alibabacloud/imageprocess/model/GetAsyncJobResultResult.h new file mode 100644 index 000000000..34f92652a --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/GetAsyncJobResultResult.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_GETASYNCJOBRESULTRESULT_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_GETASYNCJOBRESULTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT GetAsyncJobResultResult : public ServiceResult + { + public: + struct Data + { + std::string status; + std::string errorCode; + std::string errorMessage; + std::string jobId; + std::string result; + }; + + + GetAsyncJobResultResult(); + explicit GetAsyncJobResultResult(const std::string &payload); + ~GetAsyncJobResultResult(); + Data getData()const; + + protected: + void parse(const std::string &payload); + private: + Data data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_GETASYNCJOBRESULTRESULT_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/TranslateMedRequest.h b/imageprocess/include/alibabacloud/imageprocess/model/TranslateMedRequest.h new file mode 100644 index 000000000..13a850845 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/TranslateMedRequest.h @@ -0,0 +1,54 @@ +/* + * 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_TRANSLATEMEDREQUEST_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_TRANSLATEMEDREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT TranslateMedRequest : public RpcServiceRequest + { + + public: + TranslateMedRequest(); + ~TranslateMedRequest(); + + std::string getFromLanguage()const; + void setFromLanguage(const std::string& fromLanguage); + std::string getToLanguage()const; + void setToLanguage(const std::string& toLanguage); + std::string getText()const; + void setText(const std::string& text); + + private: + std::string fromLanguage_; + std::string toLanguage_; + std::string text_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_TRANSLATEMEDREQUEST_H_ \ No newline at end of file diff --git a/imageprocess/include/alibabacloud/imageprocess/model/TranslateMedResult.h b/imageprocess/include/alibabacloud/imageprocess/model/TranslateMedResult.h new file mode 100644 index 000000000..251343649 --- /dev/null +++ b/imageprocess/include/alibabacloud/imageprocess/model/TranslateMedResult.h @@ -0,0 +1,56 @@ +/* + * 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_TRANSLATEMEDRESULT_H_ +#define ALIBABACLOUD_IMAGEPROCESS_MODEL_TRANSLATEMEDRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Imageprocess + { + namespace Model + { + class ALIBABACLOUD_IMAGEPROCESS_EXPORT TranslateMedResult : public ServiceResult + { + public: + struct Data + { + long words; + std::string text; + }; + + + TranslateMedResult(); + explicit TranslateMedResult(const std::string &payload); + ~TranslateMedResult(); + Data getData()const; + + protected: + void parse(const std::string &payload); + private: + Data data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_TRANSLATEMEDRESULT_H_ \ No newline at end of file diff --git a/imageprocess/src/ImageprocessClient.cc b/imageprocess/src/ImageprocessClient.cc new file mode 100644 index 000000000..c48872aa9 --- /dev/null +++ b/imageprocess/src/ImageprocessClient.cc @@ -0,0 +1,269 @@ +/* + * 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; +using namespace AlibabaCloud::Location; +using namespace AlibabaCloud::Imageprocess; +using namespace AlibabaCloud::Imageprocess::Model; + +namespace +{ + const std::string SERVICE_NAME = "imageprocess"; +} + +ImageprocessClient::ImageprocessClient(const Credentials &credentials, const ClientConfiguration &configuration) : + RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) +{ + auto locationClient = std::make_shared(credentials, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "imageprocess"); +} + +ImageprocessClient::ImageprocessClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : + RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) +{ + auto locationClient = std::make_shared(credentialsProvider, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "imageprocess"); +} + +ImageprocessClient::ImageprocessClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : + RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) +{ + auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "imageprocess"); +} + +ImageprocessClient::~ImageprocessClient() +{} + +ImageprocessClient::DetectCovid19CadOutcome ImageprocessClient::detectCovid19Cad(const DetectCovid19CadRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DetectCovid19CadOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DetectCovid19CadOutcome(DetectCovid19CadResult(outcome.result())); + else + return DetectCovid19CadOutcome(outcome.error()); +} + +void ImageprocessClient::detectCovid19CadAsync(const DetectCovid19CadRequest& request, const DetectCovid19CadAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, detectCovid19Cad(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ImageprocessClient::DetectCovid19CadOutcomeCallable ImageprocessClient::detectCovid19CadCallable(const DetectCovid19CadRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->detectCovid19Cad(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ImageprocessClient::DetectKneeXRayOutcome ImageprocessClient::detectKneeXRay(const DetectKneeXRayRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DetectKneeXRayOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DetectKneeXRayOutcome(DetectKneeXRayResult(outcome.result())); + else + return DetectKneeXRayOutcome(outcome.error()); +} + +void ImageprocessClient::detectKneeXRayAsync(const DetectKneeXRayRequest& request, const DetectKneeXRayAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, detectKneeXRay(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ImageprocessClient::DetectKneeXRayOutcomeCallable ImageprocessClient::detectKneeXRayCallable(const DetectKneeXRayRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->detectKneeXRay(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ImageprocessClient::DetectLungNoduleOutcome ImageprocessClient::detectLungNodule(const DetectLungNoduleRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DetectLungNoduleOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DetectLungNoduleOutcome(DetectLungNoduleResult(outcome.result())); + else + return DetectLungNoduleOutcome(outcome.error()); +} + +void ImageprocessClient::detectLungNoduleAsync(const DetectLungNoduleRequest& request, const DetectLungNoduleAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, detectLungNodule(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ImageprocessClient::DetectLungNoduleOutcomeCallable ImageprocessClient::detectLungNoduleCallable(const DetectLungNoduleRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->detectLungNodule(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ImageprocessClient::DetectSpineMRIOutcome ImageprocessClient::detectSpineMRI(const DetectSpineMRIRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DetectSpineMRIOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DetectSpineMRIOutcome(DetectSpineMRIResult(outcome.result())); + else + return DetectSpineMRIOutcome(outcome.error()); +} + +void ImageprocessClient::detectSpineMRIAsync(const DetectSpineMRIRequest& request, const DetectSpineMRIAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, detectSpineMRI(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ImageprocessClient::DetectSpineMRIOutcomeCallable ImageprocessClient::detectSpineMRICallable(const DetectSpineMRIRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->detectSpineMRI(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ImageprocessClient::GetAsyncJobResultOutcome ImageprocessClient::getAsyncJobResult(const GetAsyncJobResultRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetAsyncJobResultOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetAsyncJobResultOutcome(GetAsyncJobResultResult(outcome.result())); + else + return GetAsyncJobResultOutcome(outcome.error()); +} + +void ImageprocessClient::getAsyncJobResultAsync(const GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getAsyncJobResult(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ImageprocessClient::GetAsyncJobResultOutcomeCallable ImageprocessClient::getAsyncJobResultCallable(const GetAsyncJobResultRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getAsyncJobResult(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ImageprocessClient::TranslateMedOutcome ImageprocessClient::translateMed(const TranslateMedRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return TranslateMedOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return TranslateMedOutcome(TranslateMedResult(outcome.result())); + else + return TranslateMedOutcome(outcome.error()); +} + +void ImageprocessClient::translateMedAsync(const TranslateMedRequest& request, const TranslateMedAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, translateMed(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ImageprocessClient::TranslateMedOutcomeCallable ImageprocessClient::translateMedCallable(const TranslateMedRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->translateMed(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/imageprocess/src/model/DetectCovid19CadRequest.cc b/imageprocess/src/model/DetectCovid19CadRequest.cc new file mode 100644 index 000000000..7391f35da --- /dev/null +++ b/imageprocess/src/model/DetectCovid19CadRequest.cc @@ -0,0 +1,55 @@ +/* + * 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::DetectCovid19CadRequest; + +DetectCovid19CadRequest::DetectCovid19CadRequest() : + RpcServiceRequest("imageprocess", "2020-03-20", "DetectCovid19Cad") +{ + setMethod(HttpRequest::Method::Post); +} + +DetectCovid19CadRequest::~DetectCovid19CadRequest() +{} + +std::vector DetectCovid19CadRequest::getURLList()const +{ + return uRLList_; +} + +void DetectCovid19CadRequest::setURLList(const std::vector& uRLList) +{ + uRLList_ = uRLList; + for(int dep1 = 0; dep1!= uRLList.size(); dep1++) { + auto uRLListObj = uRLList.at(dep1); + std::string uRLListObjStr = "URLList." + std::to_string(dep1 + 1); + setParameter(uRLListObjStr + ".URL", uRLListObj.uRL); + } +} + +bool DetectCovid19CadRequest::getAsync()const +{ + return async_; +} + +void DetectCovid19CadRequest::setAsync(bool async) +{ + async_ = async; + setBodyParameter("Async", async ? "true" : "false"); +} + diff --git a/imageprocess/src/model/DetectCovid19CadResult.cc b/imageprocess/src/model/DetectCovid19CadResult.cc new file mode 100644 index 000000000..ccfc64695 --- /dev/null +++ b/imageprocess/src/model/DetectCovid19CadResult.cc @@ -0,0 +1,60 @@ +/* + * 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; + +DetectCovid19CadResult::DetectCovid19CadResult() : + ServiceResult() +{} + +DetectCovid19CadResult::DetectCovid19CadResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DetectCovid19CadResult::~DetectCovid19CadResult() +{} + +void DetectCovid19CadResult::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["NewProbability"].isNull()) + data_.newProbability = dataNode["NewProbability"].asString(); + if(!dataNode["NormalProbability"].isNull()) + data_.normalProbability = dataNode["NormalProbability"].asString(); + if(!dataNode["OtherProbability"].isNull()) + data_.otherProbability = dataNode["OtherProbability"].asString(); + if(!dataNode["LesionRatio"].isNull()) + data_.lesionRatio = dataNode["LesionRatio"].asString(); + if(!dataNode["Mask"].isNull()) + data_.mask = dataNode["Mask"].asString(); + +} + +DetectCovid19CadResult::Data DetectCovid19CadResult::getData()const +{ + return data_; +} + diff --git a/imageprocess/src/model/DetectKneeXRayRequest.cc b/imageprocess/src/model/DetectKneeXRayRequest.cc new file mode 100644 index 000000000..712f078f4 --- /dev/null +++ b/imageprocess/src/model/DetectKneeXRayRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Imageprocess::Model::DetectKneeXRayRequest; + +DetectKneeXRayRequest::DetectKneeXRayRequest() : + RpcServiceRequest("imageprocess", "2020-03-20", "DetectKneeXRay") +{ + setMethod(HttpRequest::Method::Post); +} + +DetectKneeXRayRequest::~DetectKneeXRayRequest() +{} + +std::string DetectKneeXRayRequest::getDataFormat()const +{ + return dataFormat_; +} + +void DetectKneeXRayRequest::setDataFormat(const std::string& dataFormat) +{ + dataFormat_ = dataFormat; + setBodyParameter("DataFormat", dataFormat); +} + +std::string DetectKneeXRayRequest::getUrl()const +{ + return url_; +} + +void DetectKneeXRayRequest::setUrl(const std::string& url) +{ + url_ = url; + setBodyParameter("Url", url); +} + diff --git a/imageprocess/src/model/DetectKneeXRayResult.cc b/imageprocess/src/model/DetectKneeXRayResult.cc new file mode 100644 index 000000000..70e3c1020 --- /dev/null +++ b/imageprocess/src/model/DetectKneeXRayResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Imageprocess; +using namespace AlibabaCloud::Imageprocess::Model; + +DetectKneeXRayResult::DetectKneeXRayResult() : + ServiceResult() +{} + +DetectKneeXRayResult::DetectKneeXRayResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DetectKneeXRayResult::~DetectKneeXRayResult() +{} + +void DetectKneeXRayResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + auto allKLDetectionsNode = dataNode["KLDetections"]["KLDetectionsItem"]; + for (auto dataNodeKLDetectionsKLDetectionsItem : allKLDetectionsNode) + { + Data::KLDetectionsItem kLDetectionsItemObject; + auto allDetections = value["Detections"]["Detections"]; + for (auto value : allDetections) + kLDetectionsItemObject.detections.push_back(value.asString()); + data_.kLDetections.push_back(kLDetectionsItemObject); + } + +} + +DetectKneeXRayResult::Data DetectKneeXRayResult::getData()const +{ + return data_; +} + diff --git a/imageprocess/src/model/DetectLungNoduleRequest.cc b/imageprocess/src/model/DetectLungNoduleRequest.cc new file mode 100644 index 000000000..64741db73 --- /dev/null +++ b/imageprocess/src/model/DetectLungNoduleRequest.cc @@ -0,0 +1,55 @@ +/* + * 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::DetectLungNoduleRequest; + +DetectLungNoduleRequest::DetectLungNoduleRequest() : + RpcServiceRequest("imageprocess", "2020-03-20", "DetectLungNodule") +{ + setMethod(HttpRequest::Method::Post); +} + +DetectLungNoduleRequest::~DetectLungNoduleRequest() +{} + +std::vector DetectLungNoduleRequest::getURLList()const +{ + return uRLList_; +} + +void DetectLungNoduleRequest::setURLList(const std::vector& uRLList) +{ + uRLList_ = uRLList; + for(int dep1 = 0; dep1!= uRLList.size(); dep1++) { + auto uRLListObj = uRLList.at(dep1); + std::string uRLListObjStr = "URLList." + std::to_string(dep1 + 1); + setParameter(uRLListObjStr + ".URL", uRLListObj.uRL); + } +} + +bool DetectLungNoduleRequest::getAsync()const +{ + return async_; +} + +void DetectLungNoduleRequest::setAsync(bool async) +{ + async_ = async; + setBodyParameter("Async", async ? "true" : "false"); +} + diff --git a/imageprocess/src/model/DetectLungNoduleResult.cc b/imageprocess/src/model/DetectLungNoduleResult.cc new file mode 100644 index 000000000..44a57600a --- /dev/null +++ b/imageprocess/src/model/DetectLungNoduleResult.cc @@ -0,0 +1,80 @@ +/* + * 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; + +DetectLungNoduleResult::DetectLungNoduleResult() : + ServiceResult() +{} + +DetectLungNoduleResult::DetectLungNoduleResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DetectLungNoduleResult::~DetectLungNoduleResult() +{} + +void DetectLungNoduleResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + auto allSeriesNode = dataNode["Series"]["Serie"]; + for (auto dataNodeSeriesSerie : allSeriesNode) + { + Data::Serie serieObject; + if(!dataNodeSeriesSerie["SeriesInstanceUid"].isNull()) + serieObject.seriesInstanceUid = dataNodeSeriesSerie["SeriesInstanceUid"].asString(); + auto allElementsNode = allSeriesNode["Elements"]["Element"]; + for (auto allSeriesNodeElementsElement : allElementsNode) + { + Data::Serie::Element elementsObject; + if(!allSeriesNodeElementsElement["Category"].isNull()) + elementsObject.category = allSeriesNodeElementsElement["Category"].asString(); + if(!allSeriesNodeElementsElement["Confidence"].isNull()) + elementsObject.confidence = std::stof(allSeriesNodeElementsElement["Confidence"].asString()); + if(!allSeriesNodeElementsElement["Diameter"].isNull()) + elementsObject.diameter = std::stof(allSeriesNodeElementsElement["Diameter"].asString()); + if(!allSeriesNodeElementsElement["Lobe"].isNull()) + elementsObject.lobe = allSeriesNodeElementsElement["Lobe"].asString(); + if(!allSeriesNodeElementsElement["Lung"].isNull()) + elementsObject.lung = allSeriesNodeElementsElement["Lung"].asString(); + if(!allSeriesNodeElementsElement["X"].isNull()) + elementsObject.x = std::stof(allSeriesNodeElementsElement["X"].asString()); + if(!allSeriesNodeElementsElement["Z"].isNull()) + elementsObject.z = std::stof(allSeriesNodeElementsElement["Z"].asString()); + if(!allSeriesNodeElementsElement["Y"].isNull()) + elementsObject.y = std::stof(allSeriesNodeElementsElement["Y"].asString()); + serieObject.elements.push_back(elementsObject); + } + data_.series.push_back(serieObject); + } + +} + +DetectLungNoduleResult::Data DetectLungNoduleResult::getData()const +{ + return data_; +} + diff --git a/imageprocess/src/model/DetectSpineMRIRequest.cc b/imageprocess/src/model/DetectSpineMRIRequest.cc new file mode 100644 index 000000000..44d5bbc21 --- /dev/null +++ b/imageprocess/src/model/DetectSpineMRIRequest.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 + +using AlibabaCloud::Imageprocess::Model::DetectSpineMRIRequest; + +DetectSpineMRIRequest::DetectSpineMRIRequest() : + RpcServiceRequest("imageprocess", "2020-03-20", "DetectSpineMRI") +{ + setMethod(HttpRequest::Method::Post); +} + +DetectSpineMRIRequest::~DetectSpineMRIRequest() +{} + +std::vector DetectSpineMRIRequest::getURLList()const +{ + return uRLList_; +} + +void DetectSpineMRIRequest::setURLList(const std::vector& uRLList) +{ + uRLList_ = uRLList; + for(int dep1 = 0; dep1!= uRLList.size(); dep1++) { + auto uRLListObj = uRLList.at(dep1); + std::string uRLListObjStr = "URLList." + std::to_string(dep1 + 1); + setParameter(uRLListObjStr + ".URL", uRLListObj.uRL); + } +} + diff --git a/imageprocess/src/model/DetectSpineMRIResult.cc b/imageprocess/src/model/DetectSpineMRIResult.cc new file mode 100644 index 000000000..a4bde71b1 --- /dev/null +++ b/imageprocess/src/model/DetectSpineMRIResult.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; + +DetectSpineMRIResult::DetectSpineMRIResult() : + ServiceResult() +{} + +DetectSpineMRIResult::DetectSpineMRIResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DetectSpineMRIResult::~DetectSpineMRIResult() +{} + +void DetectSpineMRIResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + auto allDiscsNode = dataNode["Discs"]["Disc"]; + for (auto dataNodeDiscsDisc : allDiscsNode) + { + Data::Disc discObject; + if(!dataNodeDiscsDisc["Disease"].isNull()) + discObject.disease = dataNodeDiscsDisc["Disease"].asString(); + if(!dataNodeDiscsDisc["Identification"].isNull()) + discObject.identification = dataNodeDiscsDisc["Identification"].asString(); + auto allLocation = value["Location"]["Location"]; + for (auto value : allLocation) + discObject.location.push_back(value.asString()); + data_.discs.push_back(discObject); + } + auto allVertebrasNode = dataNode["Vertebras"]["Vertebra"]; + for (auto dataNodeVertebrasVertebra : allVertebrasNode) + { + Data::Vertebra vertebraObject; + if(!dataNodeVertebrasVertebra["Disease"].isNull()) + vertebraObject.disease = dataNodeVertebrasVertebra["Disease"].asString(); + if(!dataNodeVertebrasVertebra["Identification"].isNull()) + vertebraObject.identification = dataNodeVertebrasVertebra["Identification"].asString(); + auto allLocation1 = value["Location"]["Location"]; + for (auto value : allLocation1) + vertebraObject.location1.push_back(value.asString()); + data_.vertebras.push_back(vertebraObject); + } + +} + +DetectSpineMRIResult::Data DetectSpineMRIResult::getData()const +{ + return data_; +} + diff --git a/imageprocess/src/model/GetAsyncJobResultRequest.cc b/imageprocess/src/model/GetAsyncJobResultRequest.cc new file mode 100644 index 000000000..19b3c325f --- /dev/null +++ b/imageprocess/src/model/GetAsyncJobResultRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Imageprocess::Model::GetAsyncJobResultRequest; + +GetAsyncJobResultRequest::GetAsyncJobResultRequest() : + RpcServiceRequest("imageprocess", "2020-03-20", "GetAsyncJobResult") +{ + setMethod(HttpRequest::Method::Post); +} + +GetAsyncJobResultRequest::~GetAsyncJobResultRequest() +{} + +bool GetAsyncJobResultRequest::getAsync()const +{ + return async_; +} + +void GetAsyncJobResultRequest::setAsync(bool async) +{ + async_ = async; + setBodyParameter("Async", async ? "true" : "false"); +} + +std::string GetAsyncJobResultRequest::getJobId()const +{ + return jobId_; +} + +void GetAsyncJobResultRequest::setJobId(const std::string& jobId) +{ + jobId_ = jobId; + setBodyParameter("JobId", jobId); +} + diff --git a/imageprocess/src/model/GetAsyncJobResultResult.cc b/imageprocess/src/model/GetAsyncJobResultResult.cc new file mode 100644 index 000000000..7b6387ebf --- /dev/null +++ b/imageprocess/src/model/GetAsyncJobResultResult.cc @@ -0,0 +1,60 @@ +/* + * 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; + +GetAsyncJobResultResult::GetAsyncJobResultResult() : + ServiceResult() +{} + +GetAsyncJobResultResult::GetAsyncJobResultResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetAsyncJobResultResult::~GetAsyncJobResultResult() +{} + +void GetAsyncJobResultResult::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["JobId"].isNull()) + data_.jobId = dataNode["JobId"].asString(); + if(!dataNode["Status"].isNull()) + data_.status = dataNode["Status"].asString(); + if(!dataNode["Result"].isNull()) + data_.result = dataNode["Result"].asString(); + if(!dataNode["ErrorCode"].isNull()) + data_.errorCode = dataNode["ErrorCode"].asString(); + if(!dataNode["ErrorMessage"].isNull()) + data_.errorMessage = dataNode["ErrorMessage"].asString(); + +} + +GetAsyncJobResultResult::Data GetAsyncJobResultResult::getData()const +{ + return data_; +} + diff --git a/imageprocess/src/model/TranslateMedRequest.cc b/imageprocess/src/model/TranslateMedRequest.cc new file mode 100644 index 000000000..6a60a8417 --- /dev/null +++ b/imageprocess/src/model/TranslateMedRequest.cc @@ -0,0 +1,62 @@ +/* + * 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::TranslateMedRequest; + +TranslateMedRequest::TranslateMedRequest() : + RpcServiceRequest("imageprocess", "2020-03-20", "TranslateMed") +{ + setMethod(HttpRequest::Method::Post); +} + +TranslateMedRequest::~TranslateMedRequest() +{} + +std::string TranslateMedRequest::getFromLanguage()const +{ + return fromLanguage_; +} + +void TranslateMedRequest::setFromLanguage(const std::string& fromLanguage) +{ + fromLanguage_ = fromLanguage; + setBodyParameter("FromLanguage", fromLanguage); +} + +std::string TranslateMedRequest::getToLanguage()const +{ + return toLanguage_; +} + +void TranslateMedRequest::setToLanguage(const std::string& toLanguage) +{ + toLanguage_ = toLanguage; + setBodyParameter("ToLanguage", toLanguage); +} + +std::string TranslateMedRequest::getText()const +{ + return text_; +} + +void TranslateMedRequest::setText(const std::string& text) +{ + text_ = text; + setBodyParameter("Text", text); +} + diff --git a/imageprocess/src/model/TranslateMedResult.cc b/imageprocess/src/model/TranslateMedResult.cc new file mode 100644 index 000000000..85e629b91 --- /dev/null +++ b/imageprocess/src/model/TranslateMedResult.cc @@ -0,0 +1,54 @@ +/* + * 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; + +TranslateMedResult::TranslateMedResult() : + ServiceResult() +{} + +TranslateMedResult::TranslateMedResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +TranslateMedResult::~TranslateMedResult() +{} + +void TranslateMedResult::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["Text"].isNull()) + data_.text = dataNode["Text"].asString(); + if(!dataNode["Words"].isNull()) + data_.words = std::stol(dataNode["Words"].asString()); + +} + +TranslateMedResult::Data TranslateMedResult::getData()const +{ + return data_; +} +