X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FAnonymize.cxx;h=8a2cf32c1da585219500d2a7653bd1533386dcfe;hb=d3f296cee65d3eb391ef46a7c55bf2781f0cabbd;hp=0c9190a88f264a0b8945a82a33c2154943ab7f93;hpb=0e88aff6bcac1c201b50acb285ba079f3a6b1a6c;p=gdcm.git diff --git a/Example/Anonymize.cxx b/Example/Anonymize.cxx index 0c9190a8..8a2cf32c 100644 --- a/Example/Anonymize.cxx +++ b/Example/Anonymize.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: Anonymize.cxx,v $ Language: C++ - Date: $Date: 2006/02/02 11:26:02 $ - Version: $Revision: 1.9 $ + Date: $Date: 2006/03/17 14:36:37 $ + Version: $Revision: 1.11 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,13 +24,18 @@ #include + +/// \todo : AnonymizeDirectory +/// That should split the images : Patient/Study/Serie +/// and keeps coherent the StudyInstanceUID, SeriesInstanceUID +/// (Now, a new one is generated fore each image :-( ) int main(int argc, char *argv[]) { START_USAGE(usage) " \n Anonymize :\n ", " Anonymize a full gdcm-readable Dicom image ", " Warning : probably segfaults if pixels are not gdcm readable. ", - " Use AnonymizeNoLoad instead. ", + " Use AnonymizeNoLoad instead. ", " usage: Anonymize filein=inputFileName fileout=anonymizedFileName[debug] ", " debug : user wants to run the program in 'debug mode' ", FINISH_USAGE @@ -138,8 +143,10 @@ int main(int argc, char *argv[]) // Since we just Anonymized the file, we know no modification // was performed on the pixels. - // We don't want this image appears as a 'Secondary Captured image' - fh->SetKeepMediaStorageSOPClassUID(true); + // The written image will not appear as a 'Secondary Captured image' + // nor as a DERIVED one + + fh->SetContentType(gdcm::UNMODIFIED_PIXELS_IMAGE); fh->WriteDcmExplVR(outputFileName); std::cout <<"End Anonymize" << std::cout;