Mercurial > hg > orthanc
comparison UnitTestsSources/DicomMapTests.cpp @ 1848:e39716f71d67
new main dicom tags
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 01 Dec 2015 13:26:23 +0100 |
parents | ec66a16aa398 |
children | 6394a2f8f1e1 |
comparison
equal
deleted
inserted
replaced
1847:559956d5ceb2 | 1848:e39716f71d67 |
---|---|
149 | 149 |
150 | 150 |
151 static void TestModule(ResourceType level, | 151 static void TestModule(ResourceType level, |
152 DicomModule module) | 152 DicomModule module) |
153 { | 153 { |
154 // REFERENCE: DICOM PS3.3 2015c - Information Object Definitions | |
155 // http://dicom.nema.org/medical/dicom/current/output/html/part03.html | |
156 | |
154 std::set<DicomTag> moduleTags, main; | 157 std::set<DicomTag> moduleTags, main; |
155 DicomTag::AddTagsForModule(moduleTags, module); | 158 DicomTag::AddTagsForModule(moduleTags, module); |
156 DicomMap::GetMainDicomTags(main, level); | 159 DicomMap::GetMainDicomTags(main, level); |
157 | 160 |
158 // The main dicom tags are a subset of the module | 161 // The main dicom tags are a subset of the module |
159 for (std::set<DicomTag>::const_iterator it = main.begin(); it != main.end(); ++it) | 162 for (std::set<DicomTag>::const_iterator it = main.begin(); it != main.end(); ++it) |
160 { | 163 { |
161 bool ok = moduleTags.find(*it) != moduleTags.end(); | 164 bool ok = moduleTags.find(*it) != moduleTags.end(); |
162 | 165 |
163 // Exceptions for the Series level | 166 // Exceptions for the Study level |
164 /*if ((// | 167 if (level == ResourceType_Study && |
165 *it == DicomTag(0x, 0x) && | 168 (*it == DicomTag(0x0008, 0x0080) || /* InstitutionName, from Visit identification module, related to Visit */ |
166 level == ResourceType_Series)) | 169 *it == DicomTag(0x0032, 0x1032) || /* RequestingPhysician, from Imaging Service Request module, related to Study */ |
170 *it == DicomTag(0x0032, 0x1060))) /* RequestedProcedureDescription, from Requested Procedure module, related to Study */ | |
167 { | 171 { |
168 ok = true; | 172 ok = true; |
169 }*/ | 173 } |
170 | 174 |
171 // Exceptions for the Instance level | 175 // Exceptions for the Instance level |
172 if (level == ResourceType_Instance && | 176 if (level == ResourceType_Instance && |
173 (*it == DicomTag(0x0020, 0x0012) || /* Accession number, from Image module */ | 177 (*it == DicomTag(0x0020, 0x0012) || /* AccessionNumber, from General Image module */ |
174 *it == DicomTag(0x0054, 0x1330) || /* Image Index, from PET Image module */ | 178 *it == DicomTag(0x0054, 0x1330) || /* ImageIndex, from PET Image module */ |
175 *it == DicomTag(0x0020, 0x0100) || /* Temporal Position Identifier, from MR Image module */ | 179 *it == DicomTag(0x0020, 0x0100) || /* TemporalPositionIdentifier, from MR Image module */ |
176 *it == DicomTag(0x0028, 0x0008) || /* Number of Frames, from Multi-frame module attributes, related to Image IOD */ | 180 *it == DicomTag(0x0028, 0x0008) || /* NumberOfFrames, from Multi-frame module attributes, related to Image */ |
177 *it == DICOM_TAG_IMAGE_POSITION_PATIENT)) | 181 *it == DicomTag(0x0020, 0x0032) || /* ImagePositionPatient, from Image Plan module, related to Image */ |
182 *it == DicomTag(0x0020, 0x4000))) /* ImageComments, from General Image module */ | |
178 { | 183 { |
179 ok = true; | 184 ok = true; |
180 } | 185 } |
181 | 186 |
182 if (!ok) | 187 if (!ok) |