diff OrthancServer/DicomProtocol/DicomUserConnection.cpp @ 2005:9e021b2b348b

Support of optional tags for counting resources in C-Find SCU
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 08 Jun 2016 12:36:21 +0200
parents 9b61701c35f2
children 6301bbcbcaed
line wrap: on
line diff
--- a/OrthancServer/DicomProtocol/DicomUserConnection.cpp	Wed Jun 08 10:40:40 2016 +0200
+++ b/OrthancServer/DicomProtocol/DicomUserConnection.cpp	Wed Jun 08 12:36:21 2016 +0200
@@ -436,9 +436,27 @@
         throw OrthancException(ErrorCode_InternalError);
     }
 
-    if (level == ResourceType_Study)
+    switch (level)
     {
-      allowedTags.insert(DICOM_TAG_MODALITIES_IN_STUDY);
+      case ResourceType_Patient:
+        allowedTags.insert(DICOM_TAG_NUMBER_OF_PATIENT_RELATED_STUDIES);
+        allowedTags.insert(DICOM_TAG_NUMBER_OF_PATIENT_RELATED_SERIES);
+        allowedTags.insert(DICOM_TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES);
+        break;
+
+      case ResourceType_Study:
+        allowedTags.insert(DICOM_TAG_MODALITIES_IN_STUDY);
+        allowedTags.insert(DICOM_TAG_NUMBER_OF_STUDY_RELATED_SERIES);
+        allowedTags.insert(DICOM_TAG_NUMBER_OF_STUDY_RELATED_INSTANCES);
+        allowedTags.insert(DICOM_TAG_SOP_CLASSES_IN_STUDY);
+        break;
+
+      case ResourceType_Series:
+        allowedTags.insert(DICOM_TAG_NUMBER_OF_SERIES_RELATED_INSTANCES);
+        break;
+
+      default:
+        break;
     }
 
     allowedTags.insert(DICOM_TAG_SPECIFIC_CHARACTER_SET);