comparison OrthancServer/OrthancRestApi/OrthancRestArchive.cpp @ 2446:a894adc8bb03

/tools/create-media-extended to include type-3 tags in DICOMDIR
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 14 Dec 2017 16:30:30 +0100
parents b340f0a9022c
children 878b59270859
comparison
equal deleted inserted replaced
2445:6e5bc5c6d1a4 2446:a894adc8bb03
714 archive, 714 archive,
715 "Archive.zip"); 715 "Archive.zip");
716 } 716 }
717 } 717 }
718 718
719 719
720 template <bool Extended>
720 static void CreateBatchMedia(RestApiPostCall& call) 721 static void CreateBatchMedia(RestApiPostCall& call)
721 { 722 {
722 ArchiveIndex archive(ResourceType_Patient); // root 723 ArchiveIndex archive(ResourceType_Patient); // root
723 724
724 if (AddResourcesOfInterest(archive, call)) 725 if (AddResourcesOfInterest(archive, call))
725 { 726 {
726 MediaWriterVisitor::Apply(call.GetOutput(), 727 MediaWriterVisitor::Apply(call.GetOutput(),
727 OrthancRestApi::GetContext(call), 728 OrthancRestApi::GetContext(call),
728 archive, 729 archive,
729 "Archive.zip", 730 "Archive.zip",
730 false); 731 Extended);
731 } 732 }
732 } 733 }
733 734
734 735
735 static void CreateArchive(RestApiGetCall& call) 736 static void CreateArchive(RestApiGetCall& call)
776 Register("/patients/{id}/media", CreateMedia); 777 Register("/patients/{id}/media", CreateMedia);
777 Register("/studies/{id}/media", CreateMedia); 778 Register("/studies/{id}/media", CreateMedia);
778 Register("/series/{id}/media", CreateMedia); 779 Register("/series/{id}/media", CreateMedia);
779 780
780 Register("/tools/create-archive", CreateBatchArchive); 781 Register("/tools/create-archive", CreateBatchArchive);
781 Register("/tools/create-media", CreateBatchMedia); 782 Register("/tools/create-media", CreateBatchMedia<false>);
783 Register("/tools/create-media-extended", CreateBatchMedia<true>);
782 } 784 }
783 } 785 }