comparison OrthancServer/Sources/OrthancRestApi/OrthancRestAnonymizeModify.cpp @ 4422:48303e493135

cont openapi
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 29 Dec 2020 16:05:07 +0100
parents 05b8fd21089c
children 83371ccdfe80
comparison
equal deleted inserted replaced
4421:a7d72378e1cb 4422:48303e493135
698 } 698 }
699 699
700 700
701 static void CreateDicom(RestApiPostCall& call) 701 static void CreateDicom(RestApiPostCall& call)
702 { 702 {
703 if (call.IsDocumentation())
704 {
705 call.GetDocumentation()
706 .SetTag("System")
707 .SetSummary("Create one DICOM instance")
708 .SetDescription("Create one DICOM instance, and store it into Orthanc")
709 .SetRequestField("Tags", RestApiCallDocumentation::Type_JsonObject,
710 "Associative array containing the tags of the new instance to be created", true)
711 .SetRequestField("Content", RestApiCallDocumentation::Type_String,
712 "This field can be used to embed an image (pixel data) or a PDF inside the created DICOM instance. "
713 "The PNG image, the JPEG image or the PDF file must be provided using their "
714 "[data URI scheme encoding](https://en.wikipedia.org/wiki/Data_URI_scheme). "
715 "This field can possibly contain a JSON array, in which case a DICOM series is created "
716 "containing one DICOM instance for each item in the `Content` field.", false)
717 .SetRequestField("Parent", RestApiCallDocumentation::Type_String,
718 "If present, the newly created instance will be attached to the parent DICOM resource "
719 "whose Orthanc identifier is contained in this field. The DICOM tags of the parent "
720 "modules in the DICOM hierarchy will be automatically copied to the newly created instance.", false)
721 .SetRequestField("InterpretBinaryTags", RestApiCallDocumentation::Type_Boolean,
722 "If some value in the `Tags` associative array is formatted according to some "
723 "[data URI scheme encoding](https://en.wikipedia.org/wiki/Data_URI_scheme), "
724 "whether this value is decoded to a binary value or kept as such (`true` by default)", false)
725 .SetRequestField("PrivateCreator", RestApiCallDocumentation::Type_String,
726 "The private creator to be used for private tags in `Tags`", false)
727 .SetAnswerField("ID", RestApiCallDocumentation::Type_String, "Orthanc identifier of the newly created instance")
728 .SetAnswerField("Path", RestApiCallDocumentation::Type_String, "Path to access the instance in the REST API");
729 return;
730 }
731
703 Json::Value request; 732 Json::Value request;
704 if (!call.ParseJsonRequest(request) || 733 if (!call.ParseJsonRequest(request) ||
705 !request.isObject()) 734 !request.isObject())
706 { 735 {
707 throw OrthancException(ErrorCode_BadRequest); 736 throw OrthancException(ErrorCode_BadRequest);