comparison OrthancServer/OrthancRestApi/OrthancRestResources.cpp @ 1555:d6a93e12b1c1

Creation of DICOM files with encapsulated PDF
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 20 Aug 2015 15:18:13 +0200
parents 0586ed8897f1
children b8dc2f855a83
comparison
equal deleted inserted replaced
1554:89ab71a68fcf 1555:d6a93e12b1c1
954 { 954 {
955 index.GetChildren(c, *it); 955 index.GetChildren(c, *it);
956 b.splice(b.begin(), c); 956 b.splice(b.begin(), c);
957 } 957 }
958 958
959 switch (type) 959 type = GetChildResourceType(type);
960 {
961 case ResourceType_Patient:
962 type = ResourceType_Study;
963 break;
964
965 case ResourceType_Study:
966 type = ResourceType_Series;
967 break;
968
969 case ResourceType_Series:
970 type = ResourceType_Instance;
971 break;
972
973 default:
974 throw OrthancException(ErrorCode_InternalError);
975 }
976 960
977 a.clear(); 961 a.clear();
978 a.splice(a.begin(), b); 962 a.splice(a.begin(), b);
979 } 963 }
980 964
1051 // another concurrent call 1035 // another concurrent call
1052 return; 1036 return;
1053 } 1037 }
1054 1038
1055 current = parent; 1039 current = parent;
1056 switch (currentType) 1040 currentType = GetParentResourceType(currentType);
1057 {
1058 case ResourceType_Instance: currentType = ResourceType_Series; break;
1059 case ResourceType_Series: currentType = ResourceType_Study; break;
1060 case ResourceType_Study: currentType = ResourceType_Patient; break;
1061 default: throw OrthancException(ErrorCode_InternalError);
1062 }
1063 } 1041 }
1064 1042
1065 assert(currentType == end); 1043 assert(currentType == end);
1066 1044
1067 Json::Value result; 1045 Json::Value result;