Release SegmentLymphNode.
This commit is contained in:
@@ -59,6 +59,8 @@ set(imageprocess_public_header_model
|
||||
include/alibabacloud/imageprocess/model/ScreenChestCTResult.h
|
||||
include/alibabacloud/imageprocess/model/ScreenECRequest.h
|
||||
include/alibabacloud/imageprocess/model/ScreenECResult.h
|
||||
include/alibabacloud/imageprocess/model/SegmentLymphNodeRequest.h
|
||||
include/alibabacloud/imageprocess/model/SegmentLymphNodeResult.h
|
||||
include/alibabacloud/imageprocess/model/SegmentOARRequest.h
|
||||
include/alibabacloud/imageprocess/model/SegmentOARResult.h
|
||||
include/alibabacloud/imageprocess/model/TargetVolumeSegmentRequest.h
|
||||
@@ -106,6 +108,8 @@ set(imageprocess_src
|
||||
src/model/ScreenChestCTResult.cc
|
||||
src/model/ScreenECRequest.cc
|
||||
src/model/ScreenECResult.cc
|
||||
src/model/SegmentLymphNodeRequest.cc
|
||||
src/model/SegmentLymphNodeResult.cc
|
||||
src/model/SegmentOARRequest.cc
|
||||
src/model/SegmentOARResult.cc
|
||||
src/model/TargetVolumeSegmentRequest.cc
|
||||
|
||||
@@ -60,6 +60,8 @@
|
||||
#include "model/ScreenChestCTResult.h"
|
||||
#include "model/ScreenECRequest.h"
|
||||
#include "model/ScreenECResult.h"
|
||||
#include "model/SegmentLymphNodeRequest.h"
|
||||
#include "model/SegmentLymphNodeResult.h"
|
||||
#include "model/SegmentOARRequest.h"
|
||||
#include "model/SegmentOARResult.h"
|
||||
#include "model/TargetVolumeSegmentRequest.h"
|
||||
@@ -132,6 +134,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ScreenECResult> ScreenECOutcome;
|
||||
typedef std::future<ScreenECOutcome> ScreenECOutcomeCallable;
|
||||
typedef std::function<void(const ImageprocessClient*, const Model::ScreenECRequest&, const ScreenECOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ScreenECAsyncHandler;
|
||||
typedef Outcome<Error, Model::SegmentLymphNodeResult> SegmentLymphNodeOutcome;
|
||||
typedef std::future<SegmentLymphNodeOutcome> SegmentLymphNodeOutcomeCallable;
|
||||
typedef std::function<void(const ImageprocessClient*, const Model::SegmentLymphNodeRequest&, const SegmentLymphNodeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SegmentLymphNodeAsyncHandler;
|
||||
typedef Outcome<Error, Model::SegmentOARResult> SegmentOAROutcome;
|
||||
typedef std::future<SegmentOAROutcome> SegmentOAROutcomeCallable;
|
||||
typedef std::function<void(const ImageprocessClient*, const Model::SegmentOARRequest&, const SegmentOAROutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SegmentOARAsyncHandler;
|
||||
@@ -203,6 +208,9 @@ namespace AlibabaCloud
|
||||
ScreenECOutcome screenEC(const Model::ScreenECRequest &request)const;
|
||||
void screenECAsync(const Model::ScreenECRequest& request, const ScreenECAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ScreenECOutcomeCallable screenECCallable(const Model::ScreenECRequest& request) const;
|
||||
SegmentLymphNodeOutcome segmentLymphNode(const Model::SegmentLymphNodeRequest &request)const;
|
||||
void segmentLymphNodeAsync(const Model::SegmentLymphNodeRequest& request, const SegmentLymphNodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SegmentLymphNodeOutcomeCallable segmentLymphNodeCallable(const Model::SegmentLymphNodeRequest& request) const;
|
||||
SegmentOAROutcome segmentOAR(const Model::SegmentOARRequest &request)const;
|
||||
void segmentOARAsync(const Model::SegmentOARRequest& request, const SegmentOARAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SegmentOAROutcomeCallable segmentOARCallable(const Model::SegmentOARRequest& request) const;
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_IMAGEPROCESS_MODEL_SEGMENTLYMPHNODEREQUEST_H_
|
||||
#define ALIBABACLOUD_IMAGEPROCESS_MODEL_SEGMENTLYMPHNODEREQUEST_H_
|
||||
|
||||
#include <alibabacloud/imageprocess/ImageprocessExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Imageprocess {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_IMAGEPROCESS_EXPORT SegmentLymphNodeRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct URLList {
|
||||
std::string uRL;
|
||||
};
|
||||
SegmentLymphNodeRequest();
|
||||
~SegmentLymphNodeRequest();
|
||||
std::string getOrgName() const;
|
||||
void setOrgName(const std::string &orgName);
|
||||
std::string getBodyPart() const;
|
||||
void setBodyPart(const std::string &bodyPart);
|
||||
std::string getDataFormat() const;
|
||||
void setDataFormat(const std::string &dataFormat);
|
||||
std::vector<URLList> getURLList() const;
|
||||
void setURLList(const std::vector<URLList> &uRLList);
|
||||
std::string getOrgId() const;
|
||||
void setOrgId(const std::string &orgId);
|
||||
bool getAsync() const;
|
||||
void setAsync(bool async);
|
||||
|
||||
private:
|
||||
std::string orgName_;
|
||||
std::string bodyPart_;
|
||||
std::string dataFormat_;
|
||||
std::vector<URLList> uRLList_;
|
||||
std::string orgId_;
|
||||
bool async_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Imageprocess
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_IMAGEPROCESS_MODEL_SEGMENTLYMPHNODEREQUEST_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_SEGMENTLYMPHNODERESULT_H_
|
||||
#define ALIBABACLOUD_IMAGEPROCESS_MODEL_SEGMENTLYMPHNODERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/imageprocess/ImageprocessExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Imageprocess
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IMAGEPROCESS_EXPORT SegmentLymphNodeResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string resultURL;
|
||||
};
|
||||
|
||||
|
||||
SegmentLymphNodeResult();
|
||||
explicit SegmentLymphNodeResult(const std::string &payload);
|
||||
~SegmentLymphNodeResult();
|
||||
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_SEGMENTLYMPHNODERESULT_H_
|
||||
@@ -735,6 +735,42 @@ ImageprocessClient::ScreenECOutcomeCallable ImageprocessClient::screenECCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ImageprocessClient::SegmentLymphNodeOutcome ImageprocessClient::segmentLymphNode(const SegmentLymphNodeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SegmentLymphNodeOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SegmentLymphNodeOutcome(SegmentLymphNodeResult(outcome.result()));
|
||||
else
|
||||
return SegmentLymphNodeOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ImageprocessClient::segmentLymphNodeAsync(const SegmentLymphNodeRequest& request, const SegmentLymphNodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, segmentLymphNode(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ImageprocessClient::SegmentLymphNodeOutcomeCallable ImageprocessClient::segmentLymphNodeCallable(const SegmentLymphNodeRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SegmentLymphNodeOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->segmentLymphNode(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ImageprocessClient::SegmentOAROutcome ImageprocessClient::segmentOAR(const SegmentOARRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
85
imageprocess/src/model/SegmentLymphNodeRequest.cc
Normal file
85
imageprocess/src/model/SegmentLymphNodeRequest.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 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 <alibabacloud/imageprocess/model/SegmentLymphNodeRequest.h>
|
||||
|
||||
using AlibabaCloud::Imageprocess::Model::SegmentLymphNodeRequest;
|
||||
|
||||
SegmentLymphNodeRequest::SegmentLymphNodeRequest()
|
||||
: RpcServiceRequest("imageprocess", "2020-03-20", "SegmentLymphNode") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SegmentLymphNodeRequest::~SegmentLymphNodeRequest() {}
|
||||
|
||||
std::string SegmentLymphNodeRequest::getOrgName() const {
|
||||
return orgName_;
|
||||
}
|
||||
|
||||
void SegmentLymphNodeRequest::setOrgName(const std::string &orgName) {
|
||||
orgName_ = orgName;
|
||||
setBodyParameter(std::string("OrgName"), orgName);
|
||||
}
|
||||
|
||||
std::string SegmentLymphNodeRequest::getBodyPart() const {
|
||||
return bodyPart_;
|
||||
}
|
||||
|
||||
void SegmentLymphNodeRequest::setBodyPart(const std::string &bodyPart) {
|
||||
bodyPart_ = bodyPart;
|
||||
setBodyParameter(std::string("BodyPart"), bodyPart);
|
||||
}
|
||||
|
||||
std::string SegmentLymphNodeRequest::getDataFormat() const {
|
||||
return dataFormat_;
|
||||
}
|
||||
|
||||
void SegmentLymphNodeRequest::setDataFormat(const std::string &dataFormat) {
|
||||
dataFormat_ = dataFormat;
|
||||
setBodyParameter(std::string("DataFormat"), dataFormat);
|
||||
}
|
||||
|
||||
std::vector<SegmentLymphNodeRequest::URLList> SegmentLymphNodeRequest::getURLList() const {
|
||||
return uRLList_;
|
||||
}
|
||||
|
||||
void SegmentLymphNodeRequest::setURLList(const std::vector<SegmentLymphNodeRequest::URLList> &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);
|
||||
}
|
||||
}
|
||||
|
||||
std::string SegmentLymphNodeRequest::getOrgId() const {
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void SegmentLymphNodeRequest::setOrgId(const std::string &orgId) {
|
||||
orgId_ = orgId;
|
||||
setBodyParameter(std::string("OrgId"), orgId);
|
||||
}
|
||||
|
||||
bool SegmentLymphNodeRequest::getAsync() const {
|
||||
return async_;
|
||||
}
|
||||
|
||||
void SegmentLymphNodeRequest::setAsync(bool async) {
|
||||
async_ = async;
|
||||
setBodyParameter(std::string("Async"), async ? "true" : "false");
|
||||
}
|
||||
|
||||
66
imageprocess/src/model/SegmentLymphNodeResult.cc
Normal file
66
imageprocess/src/model/SegmentLymphNodeResult.cc
Normal file
@@ -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 <alibabacloud/imageprocess/model/SegmentLymphNodeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Imageprocess;
|
||||
using namespace AlibabaCloud::Imageprocess::Model;
|
||||
|
||||
SegmentLymphNodeResult::SegmentLymphNodeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SegmentLymphNodeResult::SegmentLymphNodeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SegmentLymphNodeResult::~SegmentLymphNodeResult()
|
||||
{}
|
||||
|
||||
void SegmentLymphNodeResult::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["ResultURL"].isNull())
|
||||
data_.resultURL = dataNode["ResultURL"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string SegmentLymphNodeResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
SegmentLymphNodeResult::Data SegmentLymphNodeResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string SegmentLymphNodeResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user