Mercurial > hg > orthanc
comparison OrthancServer/OrthancRestApi/OrthancRestResources.cpp @ 2209:e3fd5bc429a2
URI to reconstruct the main DICOM tags, the JSON summary and the metadata
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 09 Dec 2016 17:20:21 +0100 |
parents | aa4b8895cd23 |
children | a3a65de1840f |
comparison
equal
deleted
inserted
replaced
2208:90ea60bee5ff | 2209:e3fd5bc429a2 |
---|---|
1379 | 1379 |
1380 call.GetOutput().AnswerBuffer("", "text/plain"); | 1380 call.GetOutput().AnswerBuffer("", "text/plain"); |
1381 } | 1381 } |
1382 | 1382 |
1383 | 1383 |
1384 template <enum ResourceType type> | |
1385 static void ReconstructResource(RestApiPostCall& call) | |
1386 { | |
1387 ServerContext& context = OrthancRestApi::GetContext(call); | |
1388 ServerToolbox::ReconstructResource(context, call.GetUriComponent("id", "")); | |
1389 call.GetOutput().AnswerBuffer("", "text/plain"); | |
1390 } | |
1391 | |
1392 | |
1384 void OrthancRestApi::RegisterResources() | 1393 void OrthancRestApi::RegisterResources() |
1385 { | 1394 { |
1386 Register("/instances", ListResources<ResourceType_Instance>); | 1395 Register("/instances", ListResources<ResourceType_Instance>); |
1387 Register("/patients", ListResources<ResourceType_Patient>); | 1396 Register("/patients", ListResources<ResourceType_Patient>); |
1388 Register("/series", ListResources<ResourceType_Series>); | 1397 Register("/series", ListResources<ResourceType_Series>); |
1478 Register("/series/{id}/instances-tags", GetChildInstancesTags); | 1487 Register("/series/{id}/instances-tags", GetChildInstancesTags); |
1479 | 1488 |
1480 Register("/instances/{id}/content/*", GetRawContent); | 1489 Register("/instances/{id}/content/*", GetRawContent); |
1481 | 1490 |
1482 Register("/series/{id}/ordered-slices", OrderSlices); | 1491 Register("/series/{id}/ordered-slices", OrderSlices); |
1492 | |
1493 Register("/patients/{id}/reconstruct", ReconstructResource<ResourceType_Patient>); | |
1494 Register("/studies/{id}/reconstruct", ReconstructResource<ResourceType_Study>); | |
1495 Register("/series/{id}/reconstruct", ReconstructResource<ResourceType_Series>); | |
1496 Register("/instances/{id}/reconstruct", ReconstructResource<ResourceType_Instance>); | |
1483 } | 1497 } |
1484 } | 1498 } |