From 4b4569ba7d0829cf3782ff6b5bbe5ae1009466e6 Mon Sep 17 00:00:00 2001 From: malaterre Date: Sun, 1 Aug 2004 02:39:09 +0000 Subject: [PATCH] ENH: Guess what ! Still some cosmetic cleanup --- src/gdcmDebug.cxx | 40 +++++++------ src/gdcmDebug.h | 17 +++--- src/gdcmDicomDir.cxx | 10 ++-- src/gdcmDicomDirElement.cxx | 50 +++++++++++------ src/gdcmDicomDirElement.h | 28 ++++----- src/gdcmDicomDirImage.cxx | 14 +++-- src/gdcmDicomDirImage.h | 9 +-- src/gdcmDicomDirMeta.cxx | 6 +- src/gdcmDicomDirMeta.h | 6 +- src/gdcmDicomDirPatient.cxx | 7 ++- src/gdcmDicomDirPatient.h | 8 +-- src/gdcmDicomDirSerie.h | 15 +++-- src/gdcmDicomDirStudy.cxx | 6 +- src/gdcmDicomDirStudy.h | 17 +++--- src/gdcmDict.cxx | 30 +++++----- src/gdcmDictSet.cxx | 109 +++++++++++++++++++++--------------- src/gdcmDictSet.h | 12 ++-- 17 files changed, 212 insertions(+), 172 deletions(-) diff --git a/src/gdcmDebug.cxx b/src/gdcmDebug.cxx index e9881105..fcd16cff 100644 --- a/src/gdcmDebug.cxx +++ b/src/gdcmDebug.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDebug.cxx,v $ Language: C++ - Date: $Date: 2004/07/19 11:51:26 $ - Version: $Revision: 1.3 $ + Date: $Date: 2004/08/01 02:39:09 $ + Version: $Revision: 1.4 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -47,11 +47,13 @@ void gdcmDebug::SetDebug(int level) * @param Msg1 first message part * @param Msg2 second message part */ -void gdcmDebug::Verbose(int Level, const char * Msg1, const char * Msg2) +void gdcmDebug::Verbose(int level, const char * msg1, const char * msg2) { - if (Level > DebugLevel) + if (level > DebugLevel) + { return ; - std::cerr << Msg1 << ' ' << Msg2 << std::endl; + } + std::cerr << msg1 << ' ' << msg2 << std::endl; } /** @@ -60,11 +62,13 @@ void gdcmDebug::Verbose(int Level, const char * Msg1, const char * Msg2) * @param Msg1 first message part * @param Msg2 second message part */ -void gdcmDebug::Error( bool Test, const char * Msg1, const char * Msg2) +void gdcmDebug::Error(bool test, const char * msg1, const char * msg2) { - if (!Test) + if (!test) + { return; - std::cerr << Msg1 << ' ' << Msg2 << std::endl; + } + std::cerr << msg1 << ' ' << msg2 << std::endl; Exit(1); } @@ -74,10 +78,10 @@ void gdcmDebug::Error( bool Test, const char * Msg1, const char * Msg2) * @param Msg2 second message part * @param Msg3 Third message part */ -void gdcmDebug::Error(const char* Msg1, const char* Msg2, - const char* Msg3) +void gdcmDebug::Error(const char* msg1, const char* msg2, + const char* msg3) { - std::cerr << Msg1 << ' ' << Msg2 << ' ' << Msg3 << std::endl; + std::cerr << msg1 << ' ' << msg2 << ' ' << msg3 << std::endl; Exit(1); } @@ -88,13 +92,17 @@ void gdcmDebug::Error(const char* Msg1, const char* Msg2, * @param Msg1 first message part * @param Msg2 second message part */ -void gdcmDebug::Assert(int Level, bool Test, - const char * Msg1, const char * Msg2) +void gdcmDebug::Assert(int level, bool test, const char * msg1, + const char * msg2) { - if (Level > DebugLevel) + if (level > DebugLevel) + { return ; - if (!Test) - std::cerr << Msg1 << ' ' << Msg2 << std::endl; + } + if (!test) + { + std::cerr << msg1 << ' ' << msg2 << std::endl; + } } /** diff --git a/src/gdcmDebug.h b/src/gdcmDebug.h index a689936f..ae3e013f 100644 --- a/src/gdcmDebug.h +++ b/src/gdcmDebug.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDebug.h,v $ Language: C++ - Date: $Date: 2004/07/19 11:51:26 $ - Version: $Revision: 1.4 $ + Date: $Date: 2004/08/01 02:39:09 $ + Version: $Revision: 1.5 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -37,17 +37,18 @@ * Shown only when the debug level is higher than the * message level. */ -class GDCM_EXPORT gdcmDebug { +class GDCM_EXPORT gdcmDebug +{ public: gdcmDebug(int level = -1); void SetDebug (int level); - void Verbose(int, const char*, const char* =""); - void Error(bool, const char*, const char* =""); - void Error(const char*, const char* ="", const char* =""); + void Verbose(int level, const char* msg1, const char* msg2 = "") ; + void Error (bool test, const char* msg1, const char* msg2 = ""); + void Error (const char* msg1, const char* msg2 = "", const char* msg3 = ""); - void Assert(int, bool, const char*, const char*); - void Exit(int); + void Assert(int level, bool test, const char * msg1, const char * msg2); + void Exit(int a); static gdcmDebug &GetReference(); diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index 3dcefe86..e0dd8a54 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.cxx,v $ Language: C++ - Date: $Date: 2004/07/30 16:09:27 $ - Version: $Revision: 1.61 $ + Date: $Date: 2004/08/01 02:39:09 $ + Version: $Revision: 1.62 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -218,7 +218,7 @@ void gdcmDicomDir::Initialize() progress = 0.0; abort = false; - metaElems = (gdcmDicomDirMeta *)0; + metaElems = 0; } @@ -345,9 +345,7 @@ void gdcmDicomDir::SetEndMethodArgDelete(gdcmMethod *method) bool gdcmDicomDir::Write(std::string const & fileName) { - FILE * fp1; - - fp1 = fopen(fileName.c_str(), "wb"); + FILE * fp1 = fopen(fileName.c_str(), "wb"); if( !fp1 ) { printf("Failed to open(write) File [%s] \n", fileName.c_str()); diff --git a/src/gdcmDicomDirElement.cxx b/src/gdcmDicomDirElement.cxx index e7a1fdb1..22530e7d 100644 --- a/src/gdcmDicomDirElement.cxx +++ b/src/gdcmDicomDirElement.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirElement.cxx,v $ Language: C++ - Date: $Date: 2004/06/23 03:36:24 $ - Version: $Revision: 1.13 $ + Date: $Date: 2004/08/01 02:39:09 $ + 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 @@ -33,8 +33,9 @@ * \brief constructor : populates the chained lists * from the file 'Dicts/DicomDir.dic' */ -gdcmDicomDirElement::gdcmDicomDirElement() { - std::string filename=gdcmDictSet::BuildDictPath() + std::string(DICT_ELEM); +gdcmDicomDirElement::gdcmDicomDirElement() +{ + std::string filename = gdcmDictSet::BuildDictPath() + std::string(DICT_ELEM); std::ifstream from(filename.c_str()); dbg.Error(!from, "gdcmDicomDirElement::gdcmDicomDirElement: can't open dictionary",filename.c_str()); @@ -42,7 +43,8 @@ gdcmDicomDirElement::gdcmDicomDirElement() { std::string type; gdcmElement elem; - while (!from.eof()) { + while (!from.eof()) + { eatwhite(from); from.getline(buff, 1024, ' '); type = buff; @@ -59,16 +61,26 @@ gdcmDicomDirElement::gdcmDicomDirElement() { from.getline(buff, 1024, '"'); elem.value = buff; - if(type=="metaElem") - DicomDirMetaList.push_back(elem); - else if(type=="patientElem") + if( type == "metaElem" ) + { + DicomDirMetaList.push_back(elem); + } + else if( type == "patientElem" ) + { DicomDirPatientList.push_back(elem); - else if(type=="studyElem") + } + else if( type == "studyElem" ) + { DicomDirStudyList.push_back(elem); - else if(type=="serieElem") + } + else if( type == "serieElem" ) + { DicomDirSerieList.push_back(elem); - else if(type=="imageElem") + } + else if( type == "imageElem" ) + { DicomDirImageList.push_back(elem); + } } from.getline(buff, 1024, '\n'); } @@ -79,7 +91,8 @@ gdcmDicomDirElement::gdcmDicomDirElement() { * \ingroup gdcmDicomDirElement * \brief canonical destructor */ -gdcmDicomDirElement::~gdcmDicomDirElement() { +gdcmDicomDirElement::~gdcmDicomDirElement() +{ DicomDirMetaList.clear(); DicomDirPatientList.clear(); DicomDirStudyList.clear(); @@ -95,41 +108,42 @@ gdcmDicomDirElement::~gdcmDicomDirElement() { * \todo add a 'Print Level' check * @param os The output stream to be written to. */ -void gdcmDicomDirElement::Print(std::ostream &os) { +void gdcmDicomDirElement::Print(std::ostream &os) +{ std::ostringstream s; std::list::iterator it; char greltag[10]; //group element tag s << "Meta Elements :"<group,it->elem); s << " ("<value<group,it->elem); s << " ("<value<group,it->elem); s << " ("<value<group,it->elem); s << " ("<value<group,it->elem); s << " ("<value< ListDicomDirImageElem; class GDCM_EXPORT gdcmDicomDirElement { public: - gdcmDicomDirElement(void); - ~gdcmDicomDirElement(void); + gdcmDicomDirElement(); + ~gdcmDicomDirElement(); /** * \brief canonical Printer @@ -62,36 +62,36 @@ public: * \brief returns a reference to the chained List * related to the META Elements of a DICOMDIR. */ - ListDicomDirMetaElem &GetDicomDirMetaElements(void) - {return(DicomDirMetaList);}; + ListDicomDirMetaElem &GetDicomDirMetaElements() + { return DicomDirMetaList; }; /** * \ingroup gdcmDicomDirElement * \brief returns a reference to the chained List * related to the PATIENT Elements of a DICOMDIR. */ - ListDicomDirPatientElem &GetDicomDirPatientElements(void) - {return(DicomDirPatientList);}; + ListDicomDirPatientElem &GetDicomDirPatientElements() + { return DicomDirPatientList; }; /** * \ingroup gdcmDicomDirElement * \brief returns a reference to the chained List * related to the STUDY Elements of a DICOMDIR. */ - ListDicomDirStudyElem &GetDicomDirStudyElements(void) - {return(DicomDirStudyList);}; + ListDicomDirStudyElem &GetDicomDirStudyElements() + { return DicomDirStudyList; }; /** * \ingroup gdcmDicomDirElement * \brief returns a reference to the chained List * related to the SERIE Elements of a DICOMDIR. */ - ListDicomDirSerieElem &GetDicomDirSerieElements(void) - {return(DicomDirSerieList);}; + ListDicomDirSerieElem &GetDicomDirSerieElements() + { return DicomDirSerieList; }; /** * \ingroup gdcmDicomDirElement * \brief returns a reference to the chained List * related to the IMAGE Elements of a DICOMDIR. */ - ListDicomDirImageElem &GetDicomDirImageElements(void) - {return(DicomDirImageList);}; + ListDicomDirImageElem &GetDicomDirImageElements() + { return DicomDirImageList; }; private: /// gdcmElements chained list, related to the MetaElements of DICOMDIR diff --git a/src/gdcmDicomDirImage.cxx b/src/gdcmDicomDirImage.cxx index 445bbb97..7d2c5668 100644 --- a/src/gdcmDicomDirImage.cxx +++ b/src/gdcmDicomDirImage.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirImage.cxx,v $ Language: C++ - Date: $Date: 2004/06/20 18:08:47 $ - Version: $Revision: 1.7 $ + Date: $Date: 2004/08/01 02:39:09 $ + Version: $Revision: 1.8 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -55,13 +55,15 @@ gdcmDicomDirImage::~gdcmDicomDirImage() */ void gdcmDicomDirImage::Print(std::ostream &os) { - os<<"IMAGE : "; + os << "IMAGE : "; for(ListDocEntry::iterator i=docEntries.begin();i!=docEntries.end();++i) { - if( ((*i)->GetGroup()==0x0004) && ((*i)->GetElement()==0x1500) ) - os<<((gdcmValEntry *)(*i))->GetValue(); + if( (*i)->GetGroup() == 0x0004 && (*i)->GetElement() == 0x1500 ) + { + os << ((gdcmValEntry *)(*i))->GetValue(); //FIXME + } } - os< ListDicomDirSerie; //----------------------------------------------------------------------------- -class GDCM_EXPORT gdcmDicomDirStudy : public gdcmObject { +class GDCM_EXPORT gdcmDicomDirStudy : public gdcmObject +{ public: gdcmDicomDirStudy(gdcmSQItem *s, TagDocEntryHT *ptagHT); gdcmDicomDirStudy(TagDocEntryHT *ptagHT); - ~gdcmDicomDirStudy(void); + ~gdcmDicomDirStudy(); virtual void Print(std::ostream &os = std::cout); /** * \ingroup gdcmDicomDirStudy * \brief returns the SERIE chained List for this STUDY. */ - ListDicomDirSerie &GetDicomDirSeries() - {return series;}; + ListDicomDirSerie &GetDicomDirSeries() { return series; }; /** * \ingroup gdcmDicomDirStudy * \brief adds the passed SERIE to the SERIE chained List for this STUDY. */ - void AddDicomDirSerie(gdcmDicomDirSerie *obj) - {series.push_back(obj);}; + void AddDicomDirSerie(gdcmDicomDirSerie *obj) { series.push_back(obj); }; /** * \ingroup gdcmDicomDirStudy * \brief TODO */ - gdcmDicomDirSerie* NewSerie(void); + gdcmDicomDirSerie* NewSerie(); private: /** diff --git a/src/gdcmDict.cxx b/src/gdcmDict.cxx index 2f79254f..50e775ea 100644 --- a/src/gdcmDict.cxx +++ b/src/gdcmDict.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDict.cxx,v $ Language: C++ - Date: $Date: 2004/07/28 21:23:20 $ - Version: $Revision: 1.40 $ + Date: $Date: 2004/08/01 02:39:09 $ + Version: $Revision: 1.41 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -148,9 +148,9 @@ void gdcmDict::PrintByName(std::ostream& os) * @param NewEntry entry to add * @return false if Dicom Element already exists */ -bool gdcmDict::AddNewEntry(gdcmDictEntry *NewEntry) +bool gdcmDict::AddNewEntry(gdcmDictEntry *newEntry) { - gdcmTagKey key = NewEntry->GetKey(); + gdcmTagKey key = newEntry->GetKey(); if(KeyHt.count(key) == 1) { @@ -159,8 +159,8 @@ bool gdcmDict::AddNewEntry(gdcmDictEntry *NewEntry) } else { - KeyHt[NewEntry->GetKey()] = NewEntry; - NameHt[NewEntry->GetName()] = NewEntry; + KeyHt[newEntry->GetKey()] = newEntry; + NameHt[newEntry->GetName()] = newEntry; return true; } } @@ -171,12 +171,12 @@ bool gdcmDict::AddNewEntry(gdcmDictEntry *NewEntry) * @param NewEntry new entry (overwrites any previous one with same tag) * @return false if Dicom Element doesn't exist */ -bool gdcmDict::ReplaceEntry(gdcmDictEntry *NewEntry) +bool gdcmDict::ReplaceEntry(gdcmDictEntry *newEntry) { - if ( RemoveEntry(NewEntry->gdcmDictEntry::GetKey()) ) + if ( RemoveEntry(newEntry->gdcmDictEntry::GetKey()) ) { - KeyHt[NewEntry->GetKey()] = NewEntry; - NameHt[NewEntry->GetName()] = NewEntry; + KeyHt[newEntry->GetKey()] = newEntry; + NameHt[newEntry->GetName()] = newEntry; return true; } return false; @@ -193,12 +193,12 @@ bool gdcmDict::RemoveEntry(gdcmTagKey key) { if(KeyHt.count(key) == 1) { - gdcmDictEntry* EntryToDelete = KeyHt.find(key)->second; + gdcmDictEntry* entryToDelete = KeyHt.find(key)->second; - if ( EntryToDelete ) + if ( entryToDelete ) { - NameHt.erase(EntryToDelete->GetName()); - delete EntryToDelete; + NameHt.erase(entryToDelete->GetName()); + delete entryToDelete; } KeyHt.erase(key); @@ -220,7 +220,7 @@ bool gdcmDict::RemoveEntry(gdcmTagKey key) */ bool gdcmDict::RemoveEntry (uint16_t group, uint16_t element) { - return( RemoveEntry(gdcmDictEntry::TranslateToKey(group, element)) ); + return RemoveEntry(gdcmDictEntry::TranslateToKey(group, element)); } /** diff --git a/src/gdcmDictSet.cxx b/src/gdcmDictSet.cxx index 6d8e10b0..d6a2fb7f 100644 --- a/src/gdcmDictSet.cxx +++ b/src/gdcmDictSet.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDictSet.cxx,v $ Language: C++ - Date: $Date: 2004/08/01 00:59:21 $ - Version: $Revision: 1.33 $ + Date: $Date: 2004/08/01 02:39:09 $ + Version: $Revision: 1.34 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -31,9 +31,9 @@ gdcmDictSet::gdcmDictSet() { DictPath = BuildDictPath(); - std::string PubDictFile(DictPath); - PubDictFile += PUB_DICT_FILENAME; /// MEMORY LEAK std::string::operator+= - Dicts[PUB_DICT_NAME] = new gdcmDict(PubDictFile); + std::string pubDictFile(DictPath); + pubDictFile += PUB_DICT_FILENAME; + Dicts[PUB_DICT_NAME] = new gdcmDict(pubDictFile); } /** @@ -45,21 +45,25 @@ gdcmDictSet::~gdcmDictSet() // Remove dictionnaries for (DictSetHT::iterator tag = Dicts.begin(); tag != Dicts.end(); ++tag) { - gdcmDict *EntryToDelete = tag->second; - if ( EntryToDelete ) - delete EntryToDelete; - tag->second=NULL; + gdcmDict *entryToDelete = tag->second; + if ( entryToDelete ) + { + delete entryToDelete; + } + tag->second = NULL; } Dicts.clear(); // Remove virtual dictionnary entries std::map::iterator it; - for(it=virtualEntry.begin(); it!=virtualEntry.end(); ++it) + for(it = VirtualEntry.begin(); it != VirtualEntry.end(); ++it) { - gdcmDictEntry *Entry = it->second; - if ( Entry ) - delete Entry; - it->second=NULL; + gdcmDictEntry *entry = it->second; + if ( entry ) + { + delete entry; + } + it->second = NULL; } } @@ -89,9 +93,9 @@ void gdcmDictSet::Print(std::ostream& os) * \sa gdcmDictSet::GetPubDictTagNamesByCategory * @return A list of all entries of the public dicom dictionnary. */ -std::list *gdcmDictSet::GetPubDictEntryNames(void) +std::list *gdcmDictSet::GetPubDictEntryNames() { - return(GetDefaultPubDict()->GetDictEntryNames()); + return GetDefaultPubDict()->GetDictEntryNames(); } /** @@ -120,9 +124,10 @@ std::list *gdcmDictSet::GetPubDictEntryNames(void) * corresponding values are lists of all the dictionnary entries * among that group. */ -std::map > *gdcmDictSet::GetPubDictEntryNamesByCategory(void) +std::map > * + gdcmDictSet::GetPubDictEntryNamesByCategory() { - return(GetDefaultPubDict()->GetDictEntryNamesByCategory()); + return GetDefaultPubDict()->GetDictEntryNamesByCategory(); } /** @@ -134,11 +139,13 @@ std::map > *gdcmDictSet::GetPubDictEntryName * @param Name Symbolic name that be used as identifier of the newly * created dictionary. */ -gdcmDict *gdcmDictSet::LoadDictFromFile(std::string FileName, DictKey Name) +gdcmDict *gdcmDictSet::LoadDictFromFile(std::string const & fileName, + DictKey const & name) { - gdcmDict *NewDict = new gdcmDict(FileName); - AppendDict(NewDict,Name); - return(NewDict); + gdcmDict *newDict = new gdcmDict(fileName); + AppendDict(newDict, name); + + return newDict; } /** @@ -148,11 +155,13 @@ gdcmDict *gdcmDictSet::LoadDictFromFile(std::string FileName, DictKey Name) * @param DictName The symbolic name of the searched dictionary. * \result The retrieved dictionary. */ -gdcmDict *gdcmDictSet::GetDict(DictKey DictName) +gdcmDict *gdcmDictSet::GetDict(DictKey const & dictName) { - DictSetHT::iterator dict = Dicts.find(DictName); - if(dict!=Dicts.end()) + DictSetHT::iterator dict = Dicts.find(dictName); + if(dict != Dicts.end()) + { return dict->second; + } return NULL; } @@ -177,21 +186,22 @@ gdcmDictEntry *gdcmDictSet::NewVirtualDictEntry(uint16_t group, std::string name) { gdcmDictEntry* entry; - std::string tag = gdcmDictEntry::TranslateToKey(group,element) - + "#" + vr + "#" + fourth + "#" + name; + const std::string tag = gdcmDictEntry::TranslateToKey(group,element) + + "#" + vr + "#" + fourth + "#" + name; std::map::iterator it; - it=virtualEntry.find(tag); - if(it!=virtualEntry.end()) + it = VirtualEntry.find(tag); + if(it != VirtualEntry.end()) { - entry=it->second; + entry = it->second; } else { - entry=new gdcmDictEntry(group,element,vr,fourth,name); - virtualEntry[tag]=entry; + entry = new gdcmDictEntry(group, element, vr, fourth, name); + VirtualEntry[tag] = entry; } - return(entry); + + return entry; } /** @@ -201,30 +211,37 @@ gdcmDictEntry *gdcmDictSet::NewVirtualDictEntry(uint16_t group, * to "../Dicts/". * @return path to directory containing the dictionnaries */ -std::string gdcmDictSet::BuildDictPath(void) +std::string gdcmDictSet::BuildDictPath() { - std::string ResultPath; - const char *EnvPath = (char*)0; - EnvPath = getenv("GDCM_DICT_PATH"); - if (EnvPath && (strlen(EnvPath) != 0)) + std::string resultPath; + const char *envPath = 0; + envPath = getenv("GDCM_DICT_PATH"); + + if (envPath && (strlen(envPath) != 0)) { - ResultPath = EnvPath; - if (ResultPath[ResultPath.length() -1] != '/' ) - ResultPath += '/'; + resultPath = envPath; + if ( resultPath[resultPath.length()-1] != '/' ) + { + resultPath += '/'; + } dbg.Verbose(1, "gdcmDictSet::BuildDictPath:", "Dictionary path set from environnement"); } else - ResultPath = PUB_DICT_PATH; - return ResultPath; + { + resultPath = PUB_DICT_PATH; + } + + return resultPath; } //----------------------------------------------------------------------------- // Protected -bool gdcmDictSet::AppendDict(gdcmDict *NewDict,DictKey Name) +bool gdcmDictSet::AppendDict(gdcmDict *newDict, DictKey const & name) { - Dicts[Name] = NewDict; - return(true); + Dicts[name] = newDict; + + return true; //FIXME } //----------------------------------------------------------------------------- diff --git a/src/gdcmDictSet.h b/src/gdcmDictSet.h index 960296d6..d6f5b4c9 100644 --- a/src/gdcmDictSet.h +++ b/src/gdcmDictSet.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDictSet.h,v $ Language: C++ - Date: $Date: 2004/08/01 00:59:21 $ - Version: $Revision: 1.22 $ + Date: $Date: 2004/08/01 02:39:09 $ + Version: $Revision: 1.23 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -54,9 +54,9 @@ public: std::map > * GetPubDictEntryNamesByCategory(); - gdcmDict *LoadDictFromFile(std::string FileName, DictKey Name); + gdcmDict *LoadDictFromFile(std::string const & fileName, DictKey const & name); - gdcmDict *GetDict(DictKey DictName); + gdcmDict *GetDict(DictKey const & DictName); gdcmDict *GetDefaultPubDict(); gdcmDictEntry *NewVirtualDictEntry(uint16_t group, uint16_t element, @@ -67,7 +67,7 @@ public: static std::string BuildDictPath(); protected: - bool AppendDict(gdcmDict *NewDict,DictKey Name); + bool AppendDict(gdcmDict *NewDict, DictKey const & name); private: /// Hash table of all dictionaries contained in this gdcmDictSet @@ -75,7 +75,7 @@ private: /// Directory path to dictionaries std::string DictPath; /// H table for the on the fly created gdcmDictEntries - std::map virtualEntry; + std::map VirtualEntry; }; //----------------------------------------------------------------------------- -- 2.48.1