From c03bc9b5e7d49126a10d49f78682410a5500c412 Mon Sep 17 00:00:00 2001 From: frog Date: Tue, 16 Nov 2004 10:25:52 +0000 Subject: [PATCH] * FIX: src/* fix the doxygen warnings. --- ChangeLog | 3 +++ src/gdcmDicomDir.cxx | 34 ++++++++++++++++++---------------- src/gdcmDicomDir.h | 7 +++++-- src/gdcmDirList.cxx | 7 +++---- src/gdcmDocEntrySet.cxx | 24 ++++++++++++------------ src/gdcmDocEntrySet.h | 18 +++++++++--------- src/gdcmDocument.cxx | 21 +++++++++------------ src/gdcmDocument.h | 16 ++++++++-------- src/gdcmUtil.cxx | 17 +++++++++++------ 9 files changed, 78 insertions(+), 69 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4f09a7e6..79b17c7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2004-11-09 Eric Boix + * FIX: src/* fix the doxygen warnings. + 2004-11-15 Mathieu Malaterre 1. Finish merging JMR patch for writting DICOM from scratch 2. Fix -hopefully- bug with MONOCHROME and space vs null character diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index f61ae1b5..7b5857ae 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/11/09 22:15:36 $ - Version: $Revision: 1.79 $ + Date: $Date: 2004/11/16 10:25:52 $ + Version: $Revision: 1.80 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -229,14 +229,15 @@ void DicomDir::ParseDirectory() /** * \ingroup DicomDir - * \brief Set the start method to call when the parsing of the directory starts + * \brief Set the start method to call when the parsing of the + * directory starts. * @param method Method to call * @param arg Argument to pass to the method * @param argDelete Argument * \warning In python : the arg parameter isn't considered */ -void DicomDir::SetStartMethod(Method* method, void* arg, - Method* argDelete ) +void DicomDir::SetStartMethod( DicomDir::Method* method, void* arg, + DicomDir::Method* argDelete ) { if( StartArg && StartMethodArgDelete ) { @@ -255,21 +256,22 @@ void DicomDir::SetStartMethod(Method* method, void* arg, * class is destroyed * @param method Method to call to delete the argument */ -void DicomDir::SetStartMethodArgDelete(Method* method) +void DicomDir::SetStartMethodArgDelete( DicomDir::Method* method ) { StartMethodArgDelete = method; } /** * \ingroup DicomDir - * \brief Set the progress method to call when the parsing of the directory progress + * \brief Set the progress method to call when the parsing of the + * directory progress * @param method Method to call * @param arg Argument to pass to the method * @param argDelete Argument * \warning In python : the arg parameter isn't considered */ -void DicomDir::SetProgressMethod(Method* method, void* arg, - Method* argDelete ) +void DicomDir::SetProgressMethod( DicomDir::Method* method, void* arg, + DicomDir::Method* argDelete ) { if( ProgressArg && ProgressMethodArgDelete ) { @@ -288,7 +290,7 @@ void DicomDir::SetProgressMethod(Method* method, void* arg, * class is destroyed * @param method Method to call to delete the argument */ -void DicomDir::SetProgressMethodArgDelete(Method* method) +void DicomDir::SetProgressMethodArgDelete( DicomDir::Method* method ) { ProgressMethodArgDelete = method; } @@ -301,8 +303,8 @@ void DicomDir::SetProgressMethodArgDelete(Method* method) * @param argDelete Argument * \warning In python : the arg parameter isn't considered */ -void DicomDir::SetEndMethod(Method* method, void* arg, - Method* argDelete ) +void DicomDir::SetEndMethod( DicomDir::Method* method, void* arg, + DicomDir::Method* argDelete ) { if( EndArg && EndMethodArgDelete ) { @@ -317,18 +319,18 @@ void DicomDir::SetEndMethod(Method* method, void* arg, /** * \ingroup DicomDir * \brief Set the method to delete the argument - * The argument is destroyed when the method is changed or when the class - * is destroyed + * The argument is destroyed when the method is changed or when + * the class is destroyed * @param method Method to call to delete the argument */ -void DicomDir::SetEndMethodArgDelete(Method* method) +void DicomDir::SetEndMethodArgDelete( DicomDir::Method* method ) { EndMethodArgDelete = method; } /** * \ingroup DicomDir - * \brief writes on disc a DICOMDIR + * \brief writes on disc a DICOMDIR * \ warning does NOT add the missing elements in the header : * it's up to the user doing it ! * \todo : to be re-written using the DICOMDIR tree-like structure diff --git a/src/gdcmDicomDir.h b/src/gdcmDicomDir.h index 77b94aaa..c77f91a5 100644 --- a/src/gdcmDicomDir.h +++ b/src/gdcmDicomDir.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.h,v $ Language: C++ - Date: $Date: 2004/11/09 13:10:44 $ - Version: $Revision: 1.38 $ + Date: $Date: 2004/11/16 10:25:53 $ + Version: $Revision: 1.39 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -67,6 +67,9 @@ public: /// Parsing void ParseDirectory(); + // Note: the DicomDir:: namespace prefix is needed by Swig in the + // following method declarations. Refer to gdcmPython/gdcm.i + // for the reasons of this unecessary notation at C++ level. void SetStartMethod( DicomDir::Method*, void* = NULL, DicomDir::Method* = NULL ); diff --git a/src/gdcmDirList.cxx b/src/gdcmDirList.cxx index 0420c80a..938dbb3f 100644 --- a/src/gdcmDirList.cxx +++ b/src/gdcmDirList.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDirList.cxx,v $ Language: C++ - Date: $Date: 2004/11/09 21:55:55 $ - Version: $Revision: 1.26 $ + Date: $Date: 2004/11/16 10:25:53 $ + Version: $Revision: 1.27 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -80,10 +80,9 @@ std::string const & DirList::GetDirName() const // Private /** - * \ingroup DirList * \brief Explore a directory with possibility of recursion * return number of files read - * @param dirName directory to explore + * @param dirpath directory to explore * @param recursive whether we want recursion or not */ int DirList::Explore(std::string const & dirpath, bool recursive) diff --git a/src/gdcmDocEntrySet.cxx b/src/gdcmDocEntrySet.cxx index abccfe1f..0a076049 100644 --- a/src/gdcmDocEntrySet.cxx +++ b/src/gdcmDocEntrySet.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntrySet.cxx,v $ Language: C++ - Date: $Date: 2004/10/27 22:31:12 $ - Version: $Revision: 1.25 $ + Date: $Date: 2004/11/16 10:25:53 $ + Version: $Revision: 1.26 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -118,11 +118,12 @@ SeqEntry* DocEntrySet::NewSeqEntryByNumber(uint16_t Group, // Protected /** - * \brief Gets a Dicom Element inside a SQ Item Entry, by name + * \brief Gets a Dicom Element inside a SQ Item Entry, by name + * @param name of the element to be found. * @return */ - DocEntry *DocEntrySet::GetDocEntryByName(std::string const & name) - { +DocEntry* DocEntrySet::GetDocEntryByName( TagName const & name ) +{ Dict *pubDict = Global::GetDicts()->GetDefaultPubDict(); DictEntry *dictEntry = pubDict->GetDictEntryByName(name); if( !dictEntry ) @@ -162,11 +163,11 @@ std::string DocEntrySet::GetEntryByName(TagName const & name) * @param fourth owner group * @param name english name */ -DictEntry* DocEntrySet::NewVirtualDictEntry(uint16_t group, - uint16_t element, - std::string const & vr, - std::string const & fourth, - std::string const & name) +DictEntry* DocEntrySet::NewVirtualDictEntry( uint16_t group, + uint16_t element, + TagName const & vr, + TagName const & fourth, + TagName const & name ) { return Global::GetDicts()->NewVirtualDictEntry(group,element,vr,fourth,name); } @@ -202,8 +203,7 @@ DocEntry* DocEntrySet::NewDocEntryByNumber(uint16_t group, * Creates a new DocEntry (without any 'value' ...) * @param group group number of the underlying DictEntry * @param elem elem number of the underlying DictEntry - * @param VR V(alue) R(epresentation) of the Entry -if private Entry- - + * @param vr V(alue) R(epresentation) of the Entry -if private Entry- */ DocEntry* DocEntrySet::NewDocEntryByNumber(uint16_t group, uint16_t elem, TagName const & vr) diff --git a/src/gdcmDocEntrySet.h b/src/gdcmDocEntrySet.h index bdb050ce..dc057ac1 100644 --- a/src/gdcmDocEntrySet.h +++ b/src/gdcmDocEntrySet.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntrySet.h,v $ Language: C++ - Date: $Date: 2004/10/25 03:35:19 $ - Version: $Revision: 1.22 $ + Date: $Date: 2004/11/16 10:25:53 $ + 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 @@ -37,7 +37,7 @@ typedef std::string BaseTagKey; * and \ref SQItem which are both containers for DocEntries. * \ref ElementSet is based on the STL map<> container * (see \ref ElementSet::TagHT), as opposed to \ref SQItem - * which is based on an STL list container (see \ref SQItem::docEntries). + * which is based on an STL list container (see \ref ListDocEntry). * Since the syntax for adding a new element to a map<> or a list<> * differ, \ref DocEntrySet is designed as an adapter to unify the * interfaces of \ref DocEntrySet and \ref ElementSet. @@ -70,14 +70,14 @@ public: virtual DocEntry* GetDocEntryByNumber(uint16_t group, uint16_t element) = 0; - DocEntry *GetDocEntryByName(TagName const & name); + DocEntry* GetDocEntryByName(TagName const & name); virtual std::string GetEntryByNumber(uint16_t group, uint16_t element) = 0; std::string GetEntryByName(TagName const & name); - DictEntry *NewVirtualDictEntry(uint16_t group, - uint16_t element, - TagName const & vr = "unkn", - TagName const & fourth = "unkn", - TagName const & name = "unkn"); + DictEntry* NewVirtualDictEntry( uint16_t group, + uint16_t element, + TagName const & vr = "unkn", + TagName const & fourth = "unkn", + TagName const & name = "unkn" ); protected: diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 821b7027..2fbb8bd7 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2004/11/16 02:54:35 $ - Version: $Revision: 1.124 $ + Date: $Date: 2004/11/16 10:25:53 $ + Version: $Revision: 1.125 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -295,14 +295,11 @@ bool Document::IsReadable() return true; } - /** - * \brief Internal function that checks whether the Transfer Syntax given - * as argument is the one present in the current document. - * @param syntaxToCheck The transfert syntax we need to check against. - * @return True when SyntaxToCheck corresponds to the Transfer Syntax of - * the current document. False either when the document contains - * no Transfer Syntax, or when the Tranfer Syntaxes doesn't match. + * \brief Accessor to the Transfer Syntax (when present) of the + * current document (it internally handles reading the + * value from disk when only parsing occured). + * @return The encountered Transfer Syntax of the current document. */ TransferSyntaxType Document::GetTransferSyntax() { @@ -542,7 +539,7 @@ void Document::Write(std::ofstream* fp, FileType filetype) * @param value (string) Value to be set * @param group Group number of the Entry * @param elem Element number of the Entry - * @param VR V(alue) R(epresentation) of the Entry -if private Entry- + * @param vr V(alue) R(epresentation) of the Entry -if private Entry- * \return pointer to the modified/created Header Entry (NULL when creation * failed). */ @@ -872,8 +869,8 @@ int Document::GetEntryLengthByNumber(uint16_t group, uint16_t element) * @param tagName name of the searched Dicom Element. * @return true when found */ -bool Document::SetEntryByName(std::string const & content, - TagName const & tagName) +bool Document::SetEntryByName( std::string const & content, + TagName const & tagName) { DictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName); if( !dictEntry ) diff --git a/src/gdcmDocument.h b/src/gdcmDocument.h index 8f9b84e9..68126078 100644 --- a/src/gdcmDocument.h +++ b/src/gdcmDocument.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.h,v $ Language: C++ - Date: $Date: 2004/11/16 02:54:35 $ - Version: $Revision: 1.59 $ + Date: $Date: 2004/11/16 10:25:53 $ + Version: $Revision: 1.60 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -153,11 +153,11 @@ public: ValEntry* ReplaceOrCreateByNumber(std::string const & value, uint16_t group, uint16_t elem, - std::string const & vr = "unkn"); + TagName const & vr = "unkn"); BinEntry* ReplaceOrCreateByNumber(uint8_t* binArea, int lgth, uint16_t group, uint16_t elem, - std::string const & vr = "unkn"); + TagName const & vr = "unkn"); SeqEntry* ReplaceOrCreateByNumber(uint16_t group, uint16_t elem); @@ -193,8 +193,8 @@ public: virtual std::string GetEntryVRByNumber(uint16_t group, uint16_t elem); virtual int GetEntryLengthByNumber(uint16_t group, uint16_t elem); //protected: - virtual bool SetEntryByName (std::string const & content, - std::string const & tagName); + virtual bool SetEntryByName ( std::string const & content, + TagName const & tagName ); virtual bool SetEntryByNumber(std::string const & content, uint16_t group, uint16_t element); virtual bool SetEntryByNumber(uint8_t* content, int lgth, @@ -202,7 +202,7 @@ public: virtual bool SetEntryLengthByNumber(uint32_t length, uint16_t group, uint16_t element); - virtual size_t GetEntryOffsetByNumber (uint16_t group, uint16_t elem); + virtual size_t GetEntryOffsetByNumber(uint16_t group, uint16_t elem); virtual void* GetEntryBinAreaByNumber(uint16_t group, uint16_t elem); virtual bool SetEntryBinAreaByNumber(uint8_t* a, uint16_t group, uint16_t elem); @@ -211,7 +211,7 @@ public: // Header entry DocEntry* GetDocEntryByNumber(uint16_t group, uint16_t element); - DocEntry* GetDocEntryByName (std::string const & tagName); + DocEntry* GetDocEntryByName (TagName const & tagName); ValEntry* GetValEntryByNumber(uint16_t group, uint16_t element); //BinEntry* GetBinEntryByNumber(uint16_t group, uint16_t element); diff --git a/src/gdcmUtil.cxx b/src/gdcmUtil.cxx index b551067f..509b6984 100644 --- a/src/gdcmUtil.cxx +++ b/src/gdcmUtil.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmUtil.cxx,v $ Language: C++ - Date: $Date: 2004/11/16 02:54:35 $ - Version: $Revision: 1.64 $ + Date: $Date: 2004/11/16 10:25:53 $ + Version: $Revision: 1.65 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -139,7 +139,7 @@ std::string Util::CreateCleanString(std::string const & s) /** * \ingroup Globals * \brief Add a SEPARATOR to the end of the name is necessary - * @param name file/directory name to normalize + * @param pathname file/directory name to normalize */ std::string Util::NormalizePath(std::string const & pathname) { @@ -227,10 +227,12 @@ std::string Util::GetCurrentTime() } /** - * \ingroup Util * \brief Create a /DICOM/ string: * It should a of even length (no odd length ever) - * It can contains as many \0 as you want. + * It can contain as many (if you are reading this from your + * editor the following character is is backslash followed by zero + * that needed to be escaped with an extra backslash for doxygen) \\0 + * as you want. */ std::string Util::DicomString(const char* s, size_t l) { @@ -243,7 +245,10 @@ std::string Util::DicomString(const char* s, size_t l) * \ingroup Util * \brief Create a /DICOM/ string: * It should a of even lenght (no odd length ever) - * It can contains as many \0 as you want. + * It can contain as many (if you are reading this from your + * editor the following character is is backslash followed by zero + * that needed to be escaped with an extra backslash for doxygen) \\0 + * as you want. * This function is similar to DicomString(const char*), * except it doesn't take a lenght. * It only pad with a null character if length is odd -- 2.48.1