Mercurial > hg > orthanc
comparison OrthancCppClient/Instance.cpp @ 496:7f7a2d174acb laaw
preparing Laaw packaging
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 17 Jul 2013 17:07:12 +0200 |
parents | 0cd977e94479 |
children | ec19da4a1fe7 |
comparison
equal
deleted
inserted
replaced
494:012b63028085 | 496:7f7a2d174acb |
---|---|
65 default: | 65 default: |
66 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); | 66 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); |
67 } | 67 } |
68 | 68 |
69 Orthanc::HttpClient client(connection_.GetHttpClient()); | 69 Orthanc::HttpClient client(connection_.GetHttpClient()); |
70 client.SetUrl(connection_.GetOrthancUrl() + "/instances/" + id_ + "/" + suffix); | 70 client.SetUrl(std::string(connection_.GetOrthancUrl()) + "/instances/" + id_ + "/" + suffix); |
71 std::string png; | 71 std::string png; |
72 | 72 |
73 if (!client.Apply(png)) | 73 if (!client.Apply(png)) |
74 { | 74 { |
75 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); | 75 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); |
79 reader_->ReadFromMemory(png); | 79 reader_->ReadFromMemory(png); |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 Instance::Instance(const OrthancConnection& connection, | 83 Instance::Instance(const OrthancConnection& connection, |
84 const std::string& id) : | 84 const char* id) : |
85 connection_(connection), | 85 connection_(connection), |
86 id_(id), | 86 id_(id), |
87 mode_(Orthanc::ImageExtractionMode_Int16) | 87 mode_(Orthanc::ImageExtractionMode_Int16) |
88 { | 88 { |
89 Orthanc::HttpClient client(connection_.GetHttpClient()); | 89 Orthanc::HttpClient client(connection_.GetHttpClient()); |
90 | 90 |
91 client.SetUrl(connection_.GetOrthancUrl() + "/instances/" + id_ + "/simplified-tags"); | 91 client.SetUrl(std::string(connection_.GetOrthancUrl()) + "/instances/" + id_ + "/simplified-tags"); |
92 Json::Value v; | 92 Json::Value v; |
93 if (!client.Apply(tags_)) | 93 if (!client.Apply(tags_)) |
94 { | 94 { |
95 throw Orthanc::OrthancException(Orthanc::ErrorCode_NetworkProtocol); | 95 throw Orthanc::OrthancException(Orthanc::ErrorCode_NetworkProtocol); |
96 } | 96 } |