Mercurial > hg > orthanc
comparison OrthancServer/OrthancRestApi/OrthancRestResources.cpp @ 782:a60040857ce6
reorganization
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 02 May 2014 12:59:05 +0200 |
parents | 5197fd35333c |
children | d466b3606aca |
comparison
equal
deleted
inserted
replaced
780:e7eb70772fbe | 782:a60040857ce6 |
---|---|
539 call.GetOutput().AnswerBuffer("{}", "application/json"); | 539 call.GetOutput().AnswerBuffer("{}", "application/json"); |
540 } | 540 } |
541 } | 541 } |
542 | 542 |
543 | 543 |
544 // Raw access to the DICOM tags of an instance ------------------------------ | |
545 | |
546 static void GetRawContent(RestApi::GetCall& call) | |
547 { | |
548 std::string id = call.GetUriComponent("id", ""); | |
549 | |
550 ServerContext::DicomCacheLocker locker(OrthancRestApi::GetContext(call), id); | |
551 | |
552 locker.GetDicom().SendPathValue(call.GetOutput(), call.GetTrailingUri()); | |
553 } | |
554 | |
544 | 555 |
545 | 556 |
546 void OrthancRestApi::RegisterResources() | 557 void OrthancRestApi::RegisterResources() |
547 { | 558 { |
548 Register("/instances", ListResources<ResourceType_Instance>); | 559 Register("/instances", ListResources<ResourceType_Instance>); |
596 Register("/{resourceType}/{id}/attachments/{name}/data", GetAttachmentData<1>); | 607 Register("/{resourceType}/{id}/attachments/{name}/data", GetAttachmentData<1>); |
597 Register("/{resourceType}/{id}/attachments/{name}/md5", GetAttachmentMD5); | 608 Register("/{resourceType}/{id}/attachments/{name}/md5", GetAttachmentMD5); |
598 Register("/{resourceType}/{id}/attachments/{name}/size", GetAttachmentSize); | 609 Register("/{resourceType}/{id}/attachments/{name}/size", GetAttachmentSize); |
599 Register("/{resourceType}/{id}/attachments/{name}/verify-md5", VerifyAttachment); | 610 Register("/{resourceType}/{id}/attachments/{name}/verify-md5", VerifyAttachment); |
600 Register("/{resourceType}/{id}/attachments/{name}", UploadAttachment); | 611 Register("/{resourceType}/{id}/attachments/{name}", UploadAttachment); |
612 | |
613 Register("/instances/{id}/content/*", GetRawContent); | |
601 } | 614 } |
602 } | 615 } |