<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000066">
<font size="-1"><font face="Helvetica, Arial, sans-serif">I'm
attempting to anonymize a file using gdcm::File::AnonymizeNoLoad(). I
use the following code, but the file is not anonymized, the file date
is not changed either.<br>
What might be happening?<br>
Thanks,<br>
Greg<br>
<br>
/* open dicom file */<br>
f = new gdcm::File();<br>
f->SetLoadMode(gdcm::LD_ALL);<br>
f->SetFileName(filelist.Item(i).c_str());<br>
/* determine which fields to anonymize */<br>
if (chkPatientName->GetValue())<br>
f->AddAnonymizeElement( 0x0010, 0x0010,
txtPatientName->GetValue().c_str());<br>
if (chkPatientBirthdate->GetValue())<br>
f->AddAnonymizeElement( 0x0010, 0x0030,
txtPatientBirthdate->GetValue().c_str());<br>
if (chkStudyDate->GetValue())<br>
f->AddAnonymizeElement( 0x0008, 0x0020,
txtStudyDate->GetValue().c_str());<br>
if (chkSeriesDate->GetValue())<br>
f->AddAnonymizeElement( 0x0008, 0x0021,
txtSeriesDate->GetValue().c_str());<br>
<br>
/* close the file */<br>
f->AnonymizeNoLoad();<br>
f->ClearAnonymizeList();<br>
delete f;<br>
<br>
</font></font>
</body>
</html>