X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDir.cxx;h=9d44e72ffd059bf0158c9edb68b418f52b86796d;hb=56ad78cdf3b5de32f0a94a38cd32ddc9f403ffc3;hp=a6aa0ad963254fe898e44a6ed0472e8ead5b14fc;hpb=66c8b2ef6c096d675afb963778604ed7ae72a78c;p=gdcm.git diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index a6aa0ad9..9d44e72f 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.cxx,v $ Language: C++ - Date: $Date: 2007/07/26 08:36:49 $ - Version: $Revision: 1.194 $ + Date: $Date: 2008/02/13 18:53:33 $ + Version: $Revision: 1.197 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -480,7 +480,7 @@ bool DicomDir::Write(std::string const &fileName) std::ofstream *fp = new std::ofstream(fileName.c_str(), std::ios::out | std::ios::binary); - if ( !fp ) + if ( !fp ) { gdcmWarningMacro("Failed to open(write) File: " << fileName.c_str()); return false; @@ -492,7 +492,7 @@ bool DicomDir::Write(std::string const &fileName) binary_write( *fp, "DICM"); DicomDirMeta *ptrMeta = GetMeta(); - ptrMeta->WriteContent(fp, ExplicitVR, true); + ptrMeta->WriteContent(fp, ExplicitVR, true, false); // force writing 0004|1220 [SQ ], that CANNOT exist within DicomDirMeta for(i=0;i<6;++i) @@ -504,7 +504,7 @@ bool DicomDir::Write(std::string const &fileName) cc != Patients.end(); ++cc ) { - (*cc)->WriteContent( fp, ExplicitVR, false ); + (*cc)->WriteContent( fp, ExplicitVR, false, true ); } // force writing Sequence Delimitation Item @@ -764,7 +764,7 @@ void DicomDir::CreateDicomDir() gdcmErrorMacro( "Add PatientToEnd failed"); } } - /// \to do : deal with PRIVATE (not so easy, since PRIVATE appears + /// \todo : deal with PRIVATE (not so easy, since PRIVATE appears /// at different levels ?!? ) else if ( v == "PRIVATE " ) // for SIEMENS 'CSA Non Image'