From d0c74eb3436bebe88f7d7f38cba865037749d933 Mon Sep 17 00:00:00 2001 From: jpr Date: Thu, 8 Nov 2007 10:40:39 +0000 Subject: [PATCH] Anonymization more effcient when single patient Dicomdir --- Example/AnonymizeDicomDir.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Example/AnonymizeDicomDir.cxx b/Example/AnonymizeDicomDir.cxx index 27aa9944..33cca00a 100644 --- a/Example/AnonymizeDicomDir.cxx +++ b/Example/AnonymizeDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: AnonymizeDicomDir.cxx,v $ Language: C++ - Date: $Date: 2007/05/23 14:18:04 $ - Version: $Revision: 1.11 $ + Date: $Date: 2007/11/08 10:40:39 $ + Version: $Revision: 1.12 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -142,6 +142,7 @@ int main(int argc, char *argv[]) std::string v; int patientNumber = 0; + std::ostringstream oss; GDCM_NAME_SPACE::SQItem *tmpSI=s->GetFirstSQItem(); // For all the SQItems @@ -165,7 +166,7 @@ int main(int argc, char *argv[]) continue; } - oss << patientNumber; + oss << "P^" << patientNumber; // Overwrite the sensitive Entries @@ -174,7 +175,7 @@ int main(int argc, char *argv[]) // Patient's ID AnoNoLoad(tmpSI, fp, 0x0010, 0x0020, oss.str()); // Patient's Birth Date - AnoNoLoad(tmpSI, fp, 0x0010, 0x0030, oss.str()); + AnoNoLoad(tmpSI, fp, 0x0010, 0x0030, "11111111"); // Telephone AnoNoLoad(tmpSI, fp, 0x0010, 0x2154, oss.str()); -- 2.45.1