From 5f059c9a5febdd08bc360421311319fd9a806b75 Mon Sep 17 00:00:00 2001 From: jpr Date: Tue, 22 Jun 2004 14:37:04 +0000 Subject: [PATCH] ENH : method gdcmValEntry::Write doesn't need the filetype parameter (onlu PrintCommonPart does) --- src/gdcmElementSet.cxx | 30 +++++++++++++++--------------- src/gdcmSQItem.cxx | 6 +++--- src/gdcmValEntry.cxx | 6 +++--- src/gdcmValEntry.h | 6 +++--- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/gdcmElementSet.cxx b/src/gdcmElementSet.cxx index a31ca8d2..95cea960 100644 --- a/src/gdcmElementSet.cxx +++ b/src/gdcmElementSet.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmElementSet.cxx,v $ Language: C++ - Date: $Date: 2004/06/22 14:03:30 $ - Version: $Revision: 1.10 $ + Date: $Date: 2004/06/22 14:37:04 $ + 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 @@ -81,26 +81,26 @@ void gdcmElementSet::Write(FILE *fp, FileType filetype) { gdcmDocEntry *e; for (TagDocEntryHT::iterator i = tagHT.begin(); i != tagHT.end(); ++i) { - e=i->second; - e->WriteCommonPart(fp, filetype); - std::cout<GetKey() << " " << std::hex << e->GetVR() << " " - << e->GetName() - << std::endl; - -// e->Write(fp,filetype); // This will be the right way to proceed ! - + e=i->second; + e->WriteCommonPart(fp, filetype); + std::cout<GetKey() << " " << std::hex << e->GetVR() << " " + << e->GetName() + << std::endl; + +// e->Write(fp,filetype); // This will be the right way to proceed ! + if (gdcmBinEntry* BinEntry = dynamic_cast< gdcmBinEntry* >(e) ) { BinEntry->Write(fp,filetype); - continue; + continue; } - if (gdcmValEntry* ValEntry = dynamic_cast< gdcmValEntry* >(e) ) { - ValEntry->Write(fp,filetype); - continue; + if (gdcmValEntry* ValEntry = dynamic_cast< gdcmValEntry* >(e) ) { + ValEntry->Write(fp); + continue; } if (gdcmSeqEntry* SeqEntry = dynamic_cast< gdcmSeqEntry* >(e) ) { SeqEntry->Write(fp,filetype); - continue; + continue; } } } diff --git a/src/gdcmSQItem.cxx b/src/gdcmSQItem.cxx index 5e4812f2..603bb256 100644 --- a/src/gdcmSQItem.cxx +++ b/src/gdcmSQItem.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSQItem.cxx,v $ Language: C++ - Date: $Date: 2004/06/22 14:16:45 $ - Version: $Revision: 1.12 $ + Date: $Date: 2004/06/22 14:37:04 $ + Version: $Revision: 1.13 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -94,7 +94,7 @@ gdcmSQItem::~gdcmSQItem() return; } if (gdcmValEntry* ValEntry = dynamic_cast< gdcmValEntry* >(Entry) ) { - ValEntry->Write(fp,filetype); + ValEntry->Write(fp); return; } if (gdcmSeqEntry* SeqEntry = dynamic_cast< gdcmSeqEntry* >(Entry) ) { diff --git a/src/gdcmValEntry.cxx b/src/gdcmValEntry.cxx index ee0b42b8..b5575cfe 100644 --- a/src/gdcmValEntry.cxx +++ b/src/gdcmValEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmValEntry.cxx,v $ Language: C++ - Date: $Date: 2004/06/22 14:03:30 $ - Version: $Revision: 1.11 $ + Date: $Date: 2004/06/22 14:37:04 $ + 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 @@ -137,7 +137,7 @@ void gdcmValEntry::Print(std::ostream & os) /* * \brief canonical Writer */ -void gdcmValEntry::Write(FILE *fp, FileType filetype) { +void gdcmValEntry::Write(FILE *fp) { std::string vr=GetVR(); int lgr=GetLength(); if (vr == "US" || vr == "SS") { diff --git a/src/gdcmValEntry.h b/src/gdcmValEntry.h index e08a18fb..eeecd5d5 100644 --- a/src/gdcmValEntry.h +++ b/src/gdcmValEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmValEntry.h,v $ Language: C++ - Date: $Date: 2004/06/22 13:47:33 $ - Version: $Revision: 1.13 $ + Date: $Date: 2004/06/22 14:37:04 $ + Version: $Revision: 1.14 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -48,7 +48,7 @@ public: inline void SetValue(std::string val) { value = val; }; virtual void Print(std::ostream &os = std::cout); - virtual void gdcmValEntry::Write(FILE *fp, FileType filetype); + virtual void gdcmValEntry::Write(FILE *fp); protected: /// \brief for 'non string' values. Will be move to gdcmBinEntry, later -- 2.48.1