comparison Core/DicomFormat/DicomMap.cpp @ 1749:99f4a05f39fa db-changes

various types of constraints
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 27 Oct 2015 10:54:51 +0100
parents ec66a16aa398
children 39c37a994b2f
comparison
equal deleted inserted replaced
1748:92203f713205 1749:99f4a05f39fa
98 DICOM_TAG_SOP_INSTANCE_UID, 98 DICOM_TAG_SOP_INSTANCE_UID,
99 DICOM_TAG_IMAGE_POSITION_PATIENT // New in db v6 99 DICOM_TAG_IMAGE_POSITION_PATIENT // New in db v6
100 }; 100 };
101 101
102 102
103 void DicomMap::LoadMainDicomTags(const DicomTag*& tags,
104 size_t& size,
105 ResourceType level)
106 {
107 switch (level)
108 {
109 case ResourceType_Patient:
110 tags = patientTags;
111 size = sizeof(patientTags) / sizeof(DicomTag);
112 break;
113
114 case ResourceType_Study:
115 tags = studyTags;
116 size = sizeof(studyTags) / sizeof(DicomTag);
117 break;
118
119 case ResourceType_Series:
120 tags = seriesTags;
121 size = sizeof(seriesTags) / sizeof(DicomTag);
122 break;
123
124 case ResourceType_Instance:
125 tags = instanceTags;
126 size = sizeof(instanceTags) / sizeof(DicomTag);
127 break;
128
129 default:
130 throw OrthancException(ErrorCode_ParameterOutOfRange);
131 }
132 }
103 133
104 134
105 void DicomMap::SetValue(uint16_t group, 135 void DicomMap::SetValue(uint16_t group,
106 uint16_t element, 136 uint16_t element,
107 DicomValue* value) 137 DicomValue* value)