Mercurial > hg > orthanc
changeset 4408:d2bfadc2948b
cont openapi
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 24 Dec 2020 17:53:12 +0100 |
parents | 2412601cd24b |
children | 5784a9eaf502 |
files | OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp |
diffstat | 1 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Thu Dec 24 17:44:52 2020 +0100 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Thu Dec 24 17:53:12 2020 +0100 @@ -1201,6 +1201,28 @@ template <bool GzipCompression> static void GetRawFrame(RestApiGetCall& call) { + if (call.IsDocumentation()) + { + call.GetDocumentation() + .SetTag("Instances") + .SetSummary("Access raw frame" + std::string(GzipCompression ? " (compressed)" : "")) + .SetDescription("Access the raw content of one individual frame of the DICOM instance of interest, " + "bypassing image decoding. This is notably useful to access the source files " + "in compressed transfer syntaxes." + + std::string(GzipCompression ? " The image is compressed using gzip" : "")) + .SetUriArgument("frame", RestApiCallDocumentation::Type_Number, "Index of the frame (starts at `0`)"); + + if (GzipCompression) + { + call.GetDocumentation().AddAnswerType(MimeType_Gzip, "The raw frame, compressed using gzip"); + } + else + { + call.GetDocumentation().AddAnswerType(MimeType_Binary, "The raw frame"); + } + return; + } + std::string frameId = call.GetUriComponent("frame", "0"); unsigned int frame;