comparison UnitTestsSources/FromDcmtk.cpp @ 785:7cbed653476f

path for windows
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 02 May 2014 15:12:09 +0200
parents efd0215736d9
children b6d6b65142e8
comparison
equal deleted inserted replaced
784:efd0215736d9 785:7cbed653476f
295 it != replacements_.end(); ++it) 295 it != replacements_.end(); ++it)
296 { 296 {
297 toModify.Replace(it->first, it->second, DicomReplaceMode_InsertIfAbsent); 297 toModify.Replace(it->first, it->second, DicomReplaceMode_InsertIfAbsent);
298 } 298 }
299 299
300 // Update the DICOM identifiers 300 // (4) Update the DICOM identifiers
301 if (level_ <= DicomRootLevel_Study) 301 if (level_ <= DicomRootLevel_Study)
302 { 302 {
303 MapDicomIdentifier(toModify, DicomRootLevel_Study); 303 MapDicomIdentifier(toModify, DicomRootLevel_Study);
304 } 304 }
305 305
325 //m.SetLevel(DicomRootLevel_Study); 325 //m.SetLevel(DicomRootLevel_Study);
326 //m.Replace(DICOM_TAG_PATIENT_ID, "coucou"); 326 //m.Replace(DICOM_TAG_PATIENT_ID, "coucou");
327 //m.Replace(DICOM_TAG_PATIENT_NAME, "coucou"); 327 //m.Replace(DICOM_TAG_PATIENT_NAME, "coucou");
328 328
329 ParsedDicomFile o; 329 ParsedDicomFile o;
330 o.SaveToFile("/tmp/tutu.dcm"); 330 o.SaveToFile("anon.dcm");
331 331
332 for (int i = 0; i < 10; i++) 332 for (int i = 0; i < 10; i++)
333 { 333 {
334 char b[1024]; 334 char b[1024];
335 sprintf(b, "/tmp/tutu%06d.dcm", i); 335 sprintf(b, "anon%06d.dcm", i);
336 std::auto_ptr<ParsedDicomFile> f(o.Clone()); 336 std::auto_ptr<ParsedDicomFile> f(o.Clone());
337 if (i > 4) 337 if (i > 4)
338 o.Replace(DICOM_TAG_SERIES_INSTANCE_UID, "coucou"); 338 o.Replace(DICOM_TAG_SERIES_INSTANCE_UID, "coucou");
339 m.Apply(*f); 339 m.Apply(*f);
340 f->SaveToFile(b); 340 f->SaveToFile(b);