Mercurial > hg > orthanc
comparison OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp @ 4408:d2bfadc2948b
cont openapi
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 24 Dec 2020 17:53:12 +0100 |
parents | 2412601cd24b |
children | 5784a9eaf502 |
comparison
equal
deleted
inserted
replaced
4407:2412601cd24b | 4408:d2bfadc2948b |
---|---|
1199 | 1199 |
1200 | 1200 |
1201 template <bool GzipCompression> | 1201 template <bool GzipCompression> |
1202 static void GetRawFrame(RestApiGetCall& call) | 1202 static void GetRawFrame(RestApiGetCall& call) |
1203 { | 1203 { |
1204 if (call.IsDocumentation()) | |
1205 { | |
1206 call.GetDocumentation() | |
1207 .SetTag("Instances") | |
1208 .SetSummary("Access raw frame" + std::string(GzipCompression ? " (compressed)" : "")) | |
1209 .SetDescription("Access the raw content of one individual frame of the DICOM instance of interest, " | |
1210 "bypassing image decoding. This is notably useful to access the source files " | |
1211 "in compressed transfer syntaxes." + | |
1212 std::string(GzipCompression ? " The image is compressed using gzip" : "")) | |
1213 .SetUriArgument("frame", RestApiCallDocumentation::Type_Number, "Index of the frame (starts at `0`)"); | |
1214 | |
1215 if (GzipCompression) | |
1216 { | |
1217 call.GetDocumentation().AddAnswerType(MimeType_Gzip, "The raw frame, compressed using gzip"); | |
1218 } | |
1219 else | |
1220 { | |
1221 call.GetDocumentation().AddAnswerType(MimeType_Binary, "The raw frame"); | |
1222 } | |
1223 return; | |
1224 } | |
1225 | |
1204 std::string frameId = call.GetUriComponent("frame", "0"); | 1226 std::string frameId = call.GetUriComponent("frame", "0"); |
1205 | 1227 |
1206 unsigned int frame; | 1228 unsigned int frame; |
1207 try | 1229 try |
1208 { | 1230 { |