Mercurial > hg > orthanc
comparison PalantirServer/PalantirRestApi.cpp @ 34:96e57b863dd9
option to disallow remote access
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 30 Aug 2012 11:22:21 +0200 |
parents | 3a584803783e |
children | f6d12037f886 |
comparison
equal
deleted
inserted
replaced
32:0c3e317f35e8 | 34:96e57b863dd9 |
---|---|
47 { | 47 { |
48 is.setBuffer(&postData[0], postData.size()); | 48 is.setBuffer(&postData[0], postData.size()); |
49 } | 49 } |
50 is.setEos(); | 50 is.setEos(); |
51 | 51 |
52 printf("[%d]\n", postData.size()); | 52 //printf("[%d]\n", postData.size()); |
53 | 53 |
54 DcmFileFormat dicomFile; | 54 DcmFileFormat dicomFile; |
55 if (dicomFile.read(is).good()) | 55 if (dicomFile.read(is).good()) |
56 { | 56 { |
57 DicomMap dicomSummary; | 57 DicomMap dicomSummary; |
465 // Get the DICOM or the JSON file of one instance --------------------------- | 465 // Get the DICOM or the JSON file of one instance --------------------------- |
466 | 466 |
467 else if (uri.size() == 3 && | 467 else if (uri.size() == 3 && |
468 uri[0] == "instances" && | 468 uri[0] == "instances" && |
469 (uri[2] == "file" || | 469 (uri[2] == "file" || |
470 uri[2] == "all-tags")) | 470 uri[2] == "tags" || |
471 uri[2] == "named-tags")) | |
471 { | 472 { |
472 std::string fileUuid, contentType; | 473 std::string fileUuid, contentType; |
473 if (uri[2] == "file") | 474 if (uri[2] == "file") |
474 { | 475 { |
475 existingResource = index_.GetDicomFile(fileUuid, uri[1]); | 476 existingResource = index_.GetDicomFile(fileUuid, uri[1]); |
476 contentType = "application/dicom"; | 477 contentType = "application/dicom"; |
477 } | 478 } |
478 else | 479 else if (uri[2] == "tags" || |
480 uri[2] == "named-tags") | |
479 { | 481 { |
480 existingResource = index_.GetJsonFile(fileUuid, uri[1]); | 482 existingResource = index_.GetJsonFile(fileUuid, uri[1]); |
481 contentType = "application/json"; | 483 contentType = "application/json"; |
482 } | 484 } |
483 | 485 |