comparison Core/DicomParsing/DicomDirWriter.cpp @ 2421:d0fe5ec7eb05

playing with dicomdir
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 08 Oct 2017 11:13:56 +0200
parents 7284093111b0
children b340f0a9022c
comparison
equal deleted inserted replaced
2420:481cbda54e21 2421:d0fe5ec7eb05
209 } 209 }
210 210
211 std::string value; 211 std::string value;
212 bool found = GetUtf8TagValue(value, source, encoding, key); 212 bool found = GetUtf8TagValue(value, source, encoding, key);
213 213
214 if (!found)
215 {
216 // We don't raise an exception if "!optional", even if this
217 // results in an invalid DICOM file
218 value.clear();
219 }
220
214 SetTagValue(target, key, value); 221 SetTagValue(target, key, value);
215 return found; 222 return found;
216 } 223 }
217 224
218 225
236 DcmDataset& source, 243 DcmDataset& source,
237 Encoding encoding, 244 Encoding encoding,
238 const DcmTagKey& key) 245 const DcmTagKey& key)
239 { 246 {
240 CopyString(target, source, encoding, key, false, true); 247 CopyString(target, source, encoding, key, false, true);
248 }
249
250 static void CopyStringType3(DcmDirectoryRecord& target,
251 DcmDataset& source,
252 Encoding encoding,
253 const DcmTagKey& key)
254 {
255 CopyString(target, source, encoding, key, true, true);
241 } 256 }
242 257
243 258
244 public: 259 public:
245 PImpl() : fileSetId_("ORTHANC_MEDIA") 260 PImpl() : fileSetId_("ORTHANC_MEDIA")