From a585fafed1e72e092c6a1942c8692991c1688e7f Mon Sep 17 00:00:00 2001 From: jpr Date: Mon, 21 Nov 2005 09:46:24 +0000 Subject: [PATCH] Doxygenation --- src/gdcmDataEntry.cxx | 7 +++--- src/gdcmDataEntry.h | 13 ++++++----- src/gdcmDicomDir.cxx | 30 ++----------------------- src/gdcmDicomDir.h | 9 +++----- src/gdcmDicomDirElement.h | 5 +++-- src/gdcmDicomDirImage.h | 5 +++-- src/gdcmDicomDirMeta.h | 5 +++-- src/gdcmDicomDirPatient.h | 5 +++-- src/gdcmDicomDirSerie.h | 5 +++-- src/gdcmDicomDirStudy.h | 5 +++-- src/gdcmDicomDirVisit.h | 5 +++-- src/gdcmDict.h | 6 +++-- src/gdcmDictGroupName.cxx | 6 ++--- src/gdcmDictGroupName.h | 7 +++--- src/gdcmDictSet.h | 9 ++++---- src/gdcmDirList.h | 6 ++--- src/gdcmDocEntrySet.h | 19 ++++++++-------- src/gdcmDocument.cxx | 15 +++++-------- src/gdcmDocument.h | 7 +++--- src/gdcmFileHelper.cxx | 46 +++++++++++++++++++-------------------- src/gdcmFileHelper.h | 10 +++++---- src/gdcmOrientation.h | 40 +++++++++++++++++++--------------- src/gdcmSQItem.cxx | 10 ++++----- src/gdcmSeqEntry.h | 6 +++-- src/gdcmSerieHelper.cxx | 22 +++++-------------- src/gdcmSerieHelper.h | 20 ++++++++--------- src/gdcmTS.h | 5 +++-- src/gdcmValidator.h | 8 ++++--- 28 files changed, 161 insertions(+), 175 deletions(-) diff --git a/src/gdcmDataEntry.cxx b/src/gdcmDataEntry.cxx index 1ae42af4..a57cb406 100644 --- a/src/gdcmDataEntry.cxx +++ b/src/gdcmDataEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDataEntry.cxx,v $ Language: C++ - Date: $Date: 2005/11/14 18:54:04 $ - Version: $Revision: 1.21 $ + Date: $Date: 2005/11/21 09:46:24 $ + Version: $Revision: 1.22 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -574,6 +574,7 @@ uint32_t DataEntry::ComputeFullLength() //----------------------------------------------------------------------------- // Protected +/// \brief Creates a DataEntry owned BinArea (remove previous one if any) void DataEntry::NewBinArea(void) { DeleteBinArea(); @@ -581,7 +582,7 @@ void DataEntry::NewBinArea(void) BinArea = new uint8_t[GetLength()]; SelfArea = true; } - +/// \brief Removes the BinArea, if owned by the DataEntry void DataEntry::DeleteBinArea(void) { if (BinArea && SelfArea) diff --git a/src/gdcmDataEntry.h b/src/gdcmDataEntry.h index eba677c7..b545ff0c 100644 --- a/src/gdcmDataEntry.h +++ b/src/gdcmDataEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDataEntry.h,v $ Language: C++ - Date: $Date: 2005/11/14 14:23:43 $ - Version: $Revision: 1.9 $ + Date: $Date: 2005/11/21 09:46:25 $ + Version: $Revision: 1.10 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -38,7 +38,9 @@ class GDCM_EXPORT DataEntry : public DocEntry gdcmTypeMacro(DataEntry); public: +/// \brief Contructs a DataEntry with a RefCounter from DictEntry static DataEntry *New(DictEntry *e) {return new DataEntry(e);} +/// \brief Contructs a DataEntry with a RefCounter from DocEntry static DataEntry *New(DocEntry *d) {return new DataEntry(d);} // Print @@ -92,8 +94,10 @@ public: }; // State + /// \brief Sets the state (Loaded, NotLoaded, UnFound, ...) of the DataEntry void SetState(const TValueState &state) { State = state; } - const TValueState &GetState() const { return State; } + /// \brief Returns the state (Loaded, NotLoaded, ...) of the DataEntry + const TValueState &GetState() const { return State; } /// \brief true when value Entry not loaded bool IsNotLoaded() { return State == STATE_NOTLOADED; } /// \brief true if Entry not found @@ -145,8 +149,7 @@ private: /// \brief Entry status:STATE_NOTLOADED,STATE_UNFOUND,STATE_UNREAD,STATE_LOADED TValueState State; - /// \brief Size threshold above which an element val - /// By default, this upper bound is fixed to 64 bytes. + /// \brief Size threshold above which an element is printed static uint32_t MaxSizePrintEntry; }; diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index 0a9a7142..27cbd3ea 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.cxx,v $ Language: C++ - Date: $Date: 2005/11/07 10:14:44 $ - Version: $Revision: 1.172 $ + Date: $Date: 2005/11/21 09:46:25 $ + Version: $Revision: 1.173 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -159,32 +159,6 @@ bool DicomDir::Load( ) return DoTheLoadingJob( ); } -#ifndef GDCM_LEGACY_REMOVE -/* * - * \ brief Loader. (DEPRECATED : kept not to break the API) - * @ param fileName file to be open for parsing - * @ return false if file cannot be open or no swap info was found, - * or no tag was found. - * @ deprecated use SetFileName(n) + Load() instead - */ -bool DicomDir::Load(std::string const &fileName ) -{ - SetFileName(fileName); - return Load(); -} - -/// DEPRECATED : use SetDirectoryName(dname) instead -/* * - * \brief Loader. (DEPRECATED : kept not to break the API) - * @param paseDir Parse Dir - * @deprecated use SetDirectoryName(dname) instead - */ -void DicomDir::SetParseDir(bool parseDir) -{ - ParseDir = parseDir; -} -#endif - /** * \brief Does the Loading Job (internal use only) * @return false if file cannot be open or no swap info was found, diff --git a/src/gdcmDicomDir.h b/src/gdcmDicomDir.h index 7a698763..4c432851 100644 --- a/src/gdcmDicomDir.h +++ b/src/gdcmDicomDir.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.h,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:33 $ - Version: $Revision: 1.69 $ + Date: $Date: 2005/11/21 09:46:25 $ + Version: $Revision: 1.70 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -53,11 +53,11 @@ class GDCM_EXPORT DicomDir: public Document gdcmTypeMacro(DicomDir); public: +/// \brief Constructs a DicomDir with a RefCounter static DicomDir *New() {return new DicomDir();} typedef void Method(void*); - GDCM_LEGACY( bool Load(std::string const &filename) ); bool Load( ); void Print(std::ostream &os = std::cout, std::string const &indent = "" ); @@ -69,9 +69,6 @@ public: virtual void SetFileName(std::string const &fileName) { ParseDir = false; if (Filename != fileName) Filename = fileName, IsDocumentModified = true;} - - /// DEPRECATED : use SetDirectoryName - GDCM_LEGACY( void SetParseDir(bool parseDir) ); // Informations contained in the parser virtual bool IsReadable(); diff --git a/src/gdcmDicomDirElement.h b/src/gdcmDicomDirElement.h index e3e0983e..945450a6 100644 --- a/src/gdcmDicomDirElement.h +++ b/src/gdcmDicomDirElement.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirElement.h,v $ Language: C++ - Date: $Date: 2005/10/26 08:04:15 $ - Version: $Revision: 1.34 $ + Date: $Date: 2005/11/21 09:46:25 $ + Version: $Revision: 1.35 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -70,6 +70,7 @@ class GDCM_EXPORT DicomDirElement : public RefCounter gdcmTypeMacro(DicomDirElement); public: +/// \brief Contructs a DicomDirElement with a RefCounter static DicomDirElement *New() {return new DicomDirElement();} /** diff --git a/src/gdcmDicomDirImage.h b/src/gdcmDicomDirImage.h index 573cc64f..8f04b09f 100644 --- a/src/gdcmDicomDirImage.h +++ b/src/gdcmDicomDirImage.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirImage.h,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:33 $ - Version: $Revision: 1.17 $ + Date: $Date: 2005/11/21 09:46:25 $ + Version: $Revision: 1.18 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -33,6 +33,7 @@ namespace gdcm gdcmTypeMacro(DicomDirImage); public: +/// \brief Constructs a DicomDirImage with a RefCounter static DicomDirImage *New(bool empty=false) {return new DicomDirImage(empty);} void Print(std::ostream &os = std::cout, std::string const &indent = "" ); diff --git a/src/gdcmDicomDirMeta.h b/src/gdcmDicomDirMeta.h index b8015d1c..8fc668ba 100644 --- a/src/gdcmDicomDirMeta.h +++ b/src/gdcmDicomDirMeta.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirMeta.h,v $ Language: C++ - Date: $Date: 2005/11/03 14:29:23 $ - Version: $Revision: 1.20 $ + Date: $Date: 2005/11/21 09:46:25 $ + Version: $Revision: 1.21 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -33,6 +33,7 @@ class GDCM_EXPORT DicomDirMeta : public DicomDirObject gdcmTypeMacro(DicomDirMeta); public: +/// \brief Constructs a DicomDirMeta with a RefCounter static DicomDirMeta *New(bool empty=false) {return new DicomDirMeta(empty);} virtual void Print(std::ostream &os = std::cout, std::string const &indent = "" ); diff --git a/src/gdcmDicomDirPatient.h b/src/gdcmDicomDirPatient.h index 4f989ca4..42a44903 100644 --- a/src/gdcmDicomDirPatient.h +++ b/src/gdcmDicomDirPatient.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirPatient.h,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:33 $ - Version: $Revision: 1.28 $ + Date: $Date: 2005/11/21 09:46:25 $ + Version: $Revision: 1.29 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -38,6 +38,7 @@ class GDCM_EXPORT DicomDirPatient : public DicomDirObject gdcmTypeMacro(DicomDirPatient); public: +/// \brief Constructs a DicomDirPatient with a RefCounter static DicomDirPatient *New(bool empty=false) {return new DicomDirPatient(empty);} void Print(std::ostream &os = std::cout, std::string const &indent = "" ); diff --git a/src/gdcmDicomDirSerie.h b/src/gdcmDicomDirSerie.h index dfcf8968..eecc374a 100644 --- a/src/gdcmDicomDirSerie.h +++ b/src/gdcmDicomDirSerie.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirSerie.h,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:33 $ - Version: $Revision: 1.30 $ + Date: $Date: 2005/11/21 09:46:25 $ + Version: $Revision: 1.31 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -37,6 +37,7 @@ class GDCM_EXPORT DicomDirSerie : public DicomDirObject gdcmTypeMacro(DicomDirSerie); public: +/// \brief Constructs a DicomDirSerie with a RefCounter static DicomDirSerie *New(bool empty=false) {return new DicomDirSerie(empty);} void Print( std::ostream &os = std::cout, std::string const &indent = "" ); diff --git a/src/gdcmDicomDirStudy.h b/src/gdcmDicomDirStudy.h index ba277d51..6806dc2f 100644 --- a/src/gdcmDicomDirStudy.h +++ b/src/gdcmDicomDirStudy.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirStudy.h,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:33 $ - Version: $Revision: 1.30 $ + Date: $Date: 2005/11/21 09:46:25 $ + Version: $Revision: 1.31 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -45,6 +45,7 @@ class GDCM_EXPORT DicomDirStudy : public DicomDirObject gdcmTypeMacro(DicomDirStudy); public: +/// \brief Constructs a DicomDirStudy with a RefCounter static DicomDirStudy *New(bool empty=false) {return new DicomDirStudy(empty);} void Print(std::ostream &os = std::cout, std::string const &indent = "" ); diff --git a/src/gdcmDicomDirVisit.h b/src/gdcmDicomDirVisit.h index 27f03b6d..580eb705 100644 --- a/src/gdcmDicomDirVisit.h +++ b/src/gdcmDicomDirVisit.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirVisit.h,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:34 $ - Version: $Revision: 1.2 $ + Date: $Date: 2005/11/21 09:46:25 $ + Version: $Revision: 1.3 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -33,6 +33,7 @@ class GDCM_EXPORT DicomDirVisit : public DicomDirObject gdcmTypeMacro(DicomDirVisit); public: +/// \brief Constructs a DicomDirVisit with a RefCounter static DicomDirVisit *New(bool empty=false) {return new DicomDirVisit(empty);} void Print( std::ostream &os = std::cout, std::string const &indent = "" ); diff --git a/src/gdcmDict.h b/src/gdcmDict.h index 168f794e..a1259bab 100644 --- a/src/gdcmDict.h +++ b/src/gdcmDict.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDict.h,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:34 $ - Version: $Revision: 1.45 $ + Date: $Date: 2005/11/21 09:46:25 $ + Version: $Revision: 1.46 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -49,7 +49,9 @@ class GDCM_EXPORT Dict : public RefCounter gdcmTypeMacro(Dict); public: +/// \brief Contructs an empty Dict with a RefCounter static Dict *New() {return new Dict();} +/// \brief Contructs a Dict with a RefCounter static Dict *New(std::string const &filename) {return new Dict(filename);} bool AddDict(std::string const &filename); diff --git a/src/gdcmDictGroupName.cxx b/src/gdcmDictGroupName.cxx index 9d07f287..db791bd7 100644 --- a/src/gdcmDictGroupName.cxx +++ b/src/gdcmDictGroupName.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDictGroupName.cxx,v $ Language: C++ - Date: $Date: 2005/10/26 08:04:15 $ - Version: $Revision: 1.6 $ + Date: $Date: 2005/11/21 09:46:25 $ + Version: $Revision: 1.7 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -28,7 +28,7 @@ namespace gdcm { //----------------------------------------------------------------------------- -/// \brief auto generated function, to fill up the 'Value Representation' +/// \brief auto generated function, to fill up the 'Group Name' /// Dictionnary, if relevant file is not found on user's disk void FillDefaultDictGroupName(DictGroupNameHT &groupName); diff --git a/src/gdcmDictGroupName.h b/src/gdcmDictGroupName.h index e75c0704..d3aa1e9e 100644 --- a/src/gdcmDictGroupName.h +++ b/src/gdcmDictGroupName.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDictGroupName.h,v $ Language: C++ - Date: $Date: 2005/10/26 08:04:15 $ - Version: $Revision: 1.5 $ + Date: $Date: 2005/11/21 09:46:26 $ + Version: $Revision: 1.6 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -34,7 +34,8 @@ typedef std::map DictGroupNameHT; //----------------------------------------------------------------------------- /** - * \brief Container for dicom 'Value Representation' Hash Table. + * \brief Container for dicom 'Group Name' Hash Table. + * (formerly NIH defined ACR-NEMA group name) * \note This is a singleton. */ class GDCM_EXPORT DictGroupName : public RefCounter diff --git a/src/gdcmDictSet.h b/src/gdcmDictSet.h index e49e859e..e9ed37a6 100644 --- a/src/gdcmDictSet.h +++ b/src/gdcmDictSet.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDictSet.h,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:34 $ - Version: $Revision: 1.49 $ + Date: $Date: 2005/11/21 09:46:26 $ + Version: $Revision: 1.50 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -34,8 +34,8 @@ typedef std::map DictSetHT; /** * \brief Container for managing a set of loaded dictionaries (Dict). * \note Hopefully, sharing dictionaries should avoid - * \par reloading an already loaded dictionary (saving time) - * \par having many in memory representations of the same dictionary + * - reloading an already loaded dictionary (saving time) + * - having many in memory representations of the same dictionary * (saving memory). */ class GDCM_EXPORT DictSet : public RefCounter @@ -43,6 +43,7 @@ class GDCM_EXPORT DictSet : public RefCounter gdcmTypeMacro(DictSet); public: +/// \brief Contructs a DictSet with a RefCounter static DictSet *New() {return new DictSet();} void Print(std::ostream &os = std::cout, std::string const &indent = "" ); diff --git a/src/gdcmDirList.h b/src/gdcmDirList.h index aa64c452..b30bc953 100644 --- a/src/gdcmDirList.h +++ b/src/gdcmDirList.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDirList.h,v $ Language: C++ - Date: $Date: 2005/10/23 15:32:31 $ - Version: $Revision: 1.26 $ + Date: $Date: 2005/11/21 09:46:26 $ + 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 @@ -32,7 +32,7 @@ typedef std::vector DirListType; //----------------------------------------------------------------------------- -// NOTE: Due to a VC6 'feature' we cannot export a std::list in a dll, +// NOTE: Due to a M$VC6 'feature' we cannot export a std::list in a dll, // so GDCM_EXPORT keyword was removed for this class only /** diff --git a/src/gdcmDocEntrySet.h b/src/gdcmDocEntrySet.h index 92f1c492..98d95b53 100644 --- a/src/gdcmDocEntrySet.h +++ b/src/gdcmDocEntrySet.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntrySet.h,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:34 $ - Version: $Revision: 1.62 $ + Date: $Date: 2005/11/21 09:46:26 $ + Version: $Revision: 1.63 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -41,15 +41,17 @@ class DictEntry; * - \ref ElementSet is based on the STL map<> container * (see \ref ElementSet::TagHT) * - \ref SQItem 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. + * * As an illustration of this design, please refer to the implementation * of \ref AddEntry (or any pure virtual method) in both derived classes. * This adapter unification of interfaces enables the parsing of a * DICOM header containing (optionaly heavily nested) sequences to be * written recursively [see \ref Document::ParseDES - * which calls \ref Document::ParseSQ, which in turns calls + * which calls \ref Document::ParseSQ, which in turn calls * \ref Document::ParseDES ]. * * \note Developpers should strongly resist to the temptation of adding @@ -64,21 +66,20 @@ public: /// \brief write any type of entry to the entry set virtual void WriteContent (std::ofstream *fp, FileType filetype) = 0; - /// \brief Remove all Entry in the entry set + /// \brief Remove all Entry of the current set virtual void ClearEntry() = 0; - /// \brief adds any type of entry to the entry set + /// \brief adds any type of entry to the current set virtual bool AddEntry(DocEntry *entry) = 0; /// \brief Removes any type of entry out of the entry set, and destroys it virtual bool RemoveEntry(DocEntry *entryToRemove) = 0; - /// Gets the first entry of any type of set + /// \brief Gets the first entry (of any type) of the current set virtual DocEntry *GetFirstEntry()=0; - /// Gets the next entry of any type of set + /// \brief Gets the next entry (of any type) of the current set virtual DocEntry *GetNextEntry()=0; virtual std::string GetEntryString(uint16_t group, uint16_t elem); virtual void *GetEntryBinArea(uint16_t group, uint16_t elem); virtual int GetEntryLength(uint16_t group, uint16_t elem); - virtual std::string GetEntryForcedAsciiValue(uint16_t group, uint16_t elem); /// \brief Gets any type of DocEntry, identified by its (group,elem) virtual DocEntry *GetDocEntry(uint16_t group, uint16_t elem) = 0; @@ -101,7 +102,7 @@ public: uint16_t group, uint16_t elem, VRKey const &vr = GDCM_VRUNKNOWN); SeqEntry *InsertSeqEntry(uint16_t group, uint16_t elem); - /// tells us if the set contains no entry + /// \brief Tells us if the set contains no entry virtual bool IsEmpty() = 0; virtual bool CheckIfEntryExist(uint16_t group, uint16_t elem); diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index eecf1488..d6e993b9 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2005/11/15 10:30:46 $ - Version: $Revision: 1.328 $ + Date: $Date: 2005/11/21 09:46:26 $ + Version: $Revision: 1.329 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -89,18 +89,15 @@ bool Document::Load( ) return false; } return DoTheLoadingDocumentJob( ); -} -/** - * \brief Loader. (DEPRECATED : not to break the API) - * @param fileName 'Document' (File or DicomDir) to be open for parsing - * @return false if file cannot be open or no swap info was found, - * or no tag was found. - */ +} + +#ifndef GDCM_LEGACY_REMOVE bool Document::Load( std::string const &fileName ) { Filename = fileName; return DoTheLoadingDocumentJob( ); } +#endif /** * \brief Performs the Loading Job (internal use only) diff --git a/src/gdcmDocument.h b/src/gdcmDocument.h index a3013451..9793a511 100644 --- a/src/gdcmDocument.h +++ b/src/gdcmDocument.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.h,v $ Language: C++ - Date: $Date: 2005/11/15 10:30:46 $ - Version: $Revision: 1.131 $ + Date: $Date: 2005/11/21 09:46:26 $ + Version: $Revision: 1.132 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -23,6 +23,7 @@ #include "gdcmDict.h" #include "gdcmElementSet.h" #include "gdcmException.h" +#include "gdcmDebug.h" // for LEGACY #include #include @@ -46,7 +47,7 @@ public: // Loading //Deprecated : use SetFileName() + Load() - virtual bool Load( std::string const &filename ); + //GDCM_LEGACY( virtual bool Load( std::string const &filename ) ); virtual bool Load( ); // Dictionaries diff --git a/src/gdcmFileHelper.cxx b/src/gdcmFileHelper.cxx index 4da69db5..a5381af6 100644 --- a/src/gdcmFileHelper.cxx +++ b/src/gdcmFileHelper.cxx @@ -4,8 +4,8 @@ Module: $RCSfile: gdcmFileHelper.cxx,v $ Language: C++ - Date: $Date: 2005/11/18 11:42:48 $ - Version: $Revision: 1.82 $ + Date: $Date: 2005/11/21 09:46:26 $ + Version: $Revision: 1.83 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -225,13 +225,12 @@ bool FileHelper::Load() } /** - * \brief Accesses an existing DocEntry (i.e. a Dicom Element) - * through it's (group, element) and modifies it's content with - * the given value. + * \brief Accesses an existing DataEntry through it's (group, element) + * and modifies it's content with the given value. * @param content new value (string) to substitute with * @param group group number of the Dicom Element to modify * @param elem element number of the Dicom Element to modify - * \return false if DocEntry not found + * \return false if DataEntry not found */ bool FileHelper::SetEntryString(std::string const &content, uint16_t group, uint16_t elem) @@ -241,14 +240,13 @@ bool FileHelper::SetEntryString(std::string const &content, /** - * \brief Accesses an existing DocEntry (i.e. a Dicom Element) - * through it's (group, element) and modifies it's content with - * the given value. + * \brief Accesses an existing DataEntry through it's (group, element) + * and modifies it's content with the given value. * @param content new value (void* -> uint8_t*) to substitute with * @param lgth new value length * @param group group number of the Dicom Element to modify * @param elem element number of the Dicom Element to modify - * \return false if DocEntry not found + * \return false if DataEntry not found */ bool FileHelper::SetEntryBinArea(uint8_t *content, int lgth, uint16_t group, uint16_t elem) @@ -257,12 +255,12 @@ bool FileHelper::SetEntryBinArea(uint8_t *content, int lgth, } /** - * \brief Modifies the value of a given DocEntry (Dicom entry) - * when it exists. Creates it with the given value when unexistant. - * @param content (string)value to be set + * \brief Modifies the value of a given DataEntry when it exists. + * Creates it with the given value when unexistant. + * @param content (string) value to be set * @param group Group number of the Entry * @param elem Element number of the Entry - * \return pointer to the modified/created Dicom entry (NULL when creation + * \return pointer to the modified/created DataEntry (NULL when creation * failed). */ DataEntry *FileHelper::InsertEntryString(std::string const &content, @@ -272,14 +270,14 @@ DataEntry *FileHelper::InsertEntryString(std::string const &content, } /** - * \brief Modifies the value of a given DocEntry (Dicom entry) - * when it exists. Creates it with the given value when unexistant. + * \brief Modifies the value of a given DataEntry when it exists. + * Creates it with the given value when unexistant. * A copy of the binArea is made to be kept in the Document. * @param binArea (binary)value to be set * @param lgth new value length * @param group Group number of the Entry * @param elem Element number of the Entry - * \return pointer to the modified/created Dicom entry (NULL when creation + * \return pointer to the modified/created DataEntry (NULL when creation * failed). */ DataEntry *FileHelper::InsertEntryBinArea(uint8_t *binArea, int lgth, @@ -289,11 +287,11 @@ DataEntry *FileHelper::InsertEntryBinArea(uint8_t *binArea, int lgth, } /** - * \brief Modifies the value of a given DocEntry (Dicom entry) - * when it exists. Creates it, empty (?!) when unexistant. + * \brief Adds an empty SeqEntry + * (remove any existing entry with same group,elem) * @param group Group number of the Entry * @param elem Element number of the Entry - * \return pointer to the modified/created Dicom entry (NULL when creation + * \return pointer to the created SeqEntry (NULL when creation * failed). */ SeqEntry *FileHelper::InsertSeqEntry(uint16_t group, uint16_t elem) @@ -1148,10 +1146,10 @@ DataEntry *FileHelper::CopyDataEntry(uint16_t group, uint16_t elem, /** * \brief This method is called automatically, just before writting - * in order to produce a 'True Dicom V3' image + * in order to produce a 'True Dicom V3' image. + * * We cannot know *how* the user made the File : * (reading an old ACR-NEMA file or a not very clean DICOM file ...) - * * Just before writting : * - we check the Entries * - we create the mandatory entries if they are missing @@ -1160,6 +1158,7 @@ DataEntry *FileHelper::CopyDataEntry(uint16_t group, uint16_t elem, * The writing process will restore the entries as they where before * entering FileHelper::CheckMandatoryElements, so the user will always * see the entries just as they were before he decided to write. + * * \note * - Entries whose type is 1 are mandatory, with a mandatory value * - Entries whose type is 1c are mandatory-inside-a-Sequence, @@ -1169,7 +1168,8 @@ DataEntry *FileHelper::CopyDataEntry(uint16_t group, uint16_t elem, * with an optional value * - Entries whose type is 3 are optional * - * \todo : - warn the user if we had to add some entries : + * \todo + * - warn the user if we had to add some entries : * even if a mandatory entry is missing, we add it, with a default value * (we don't want to give up the writting process if user forgot to * specify Lena's Patient ID, for instance ...) diff --git a/src/gdcmFileHelper.h b/src/gdcmFileHelper.h index f4322b9b..eee1c02a 100644 --- a/src/gdcmFileHelper.h +++ b/src/gdcmFileHelper.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFileHelper.h,v $ Language: C++ - Date: $Date: 2005/11/07 09:50:52 $ - Version: $Revision: 1.30 $ + Date: $Date: 2005/11/21 09:46:26 $ + Version: $Revision: 1.31 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -52,7 +52,9 @@ public: }; public: +/// \brief Constructs a FileHelper with a RefCounter static FileHelper *New() {return new FileHelper();} +/// \brief Constructs a FileHelper with a RefCounter from a fileHelper static FileHelper *New(File *header) {return new FileHelper(header);} virtual ~FileHelper(); @@ -220,8 +222,8 @@ private: /// See vtkgdcmSerieViewer for an example VOID_FUNCTION_PUINT8_PFILE_POINTER UserFunction; - /// if user knows he didn't modify the pixels (e.g. he just anonymized - /// the file), he is allowed to ask to keep the original + /// \brief if user knows he didn't modify the pixels (e.g. he just + /// anonymized the file), he is allowed to ask to keep the original /// 'Media Storage SOP Class UID' and 'Image Type' bool KeepMediaStorageSOPClassUID; }; diff --git a/src/gdcmOrientation.h b/src/gdcmOrientation.h index 870bee43..6b2f309e 100644 --- a/src/gdcmOrientation.h +++ b/src/gdcmOrientation.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmOrientation.h,v $ Language: C++ - Date: $Date: 2005/11/18 11:42:48 $ - Version: $Revision: 1.12 $ + Date: $Date: 2005/11/21 09:46:27 $ + 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 @@ -34,16 +34,34 @@ typedef struct typedef std::pair Res; class File; +typedef enum { + NotApplicable = 0, + Axial = 1, + AxialInvert = -1, + Coronal = 2, + CoronalInvert = -2, + Sagital = 3, + SagitalInvert = -3, + HeartAxial = 4, + HeartAxialInvert = -4, + HeartCoronal = 5, + HeartCoronalInvert = -5, + HeartSagital = 6, + HeartSagitalInvert = -6 +} OrientationType; + //----------------------------------------------------------------------------- /** * \brief Orientation class for dealing with DICOM image orientation + * * A gentle reminder for non-medical user: * PatientPosition (0x0010,0x5100) tells us the way the patient was introduced in the imager * - HFS : Head First Supine * - FFS : Feet First Supine * - HFP : Head First Prone * - FFP : Feet First Prone - * Note: HFP and FFP are not very common values, since the position must be pretty unconfortable for the Patient -the patient is lying on his belly; but, if he has handcuffs there is no other way ...- + * Note: HFP and FFP are not very common values, since the position must + * be pretty unconfortable for the Patient -the patient is lying on his belly; but, if he has handcuffs there is no other way ...- * * ImageOrientationPatient (0x0020,0x0037) gives 6 cosines (2 for each plane) * Patient Orientation (as found in the optional 0x0020,0x0020, or computed by @@ -76,26 +94,12 @@ class File; * You'll probabely have 3 letters for X axis and Y axis, and the image remains *perfectly* sagital ! * The values are given within the 'Patient referential', *not* within the 'Organ referential' ... */ -typedef enum { - NotApplicable = 0, - Axial = 1, - AxialInvert = -1, - Coronal = 2, - CoronalInvert = -2, - Sagital = 3, - SagitalInvert = -3, - HeartAxial = 4, - HeartAxialInvert = -4, - HeartCoronal = 5, - HeartCoronalInvert = -5, - HeartSagital = 6, - HeartSagitalInvert = -6 -} OrientationType; class GDCM_EXPORT Orientation : public RefCounter { gdcmTypeMacro(Orientation); public: +/// \brief Constructs a gdcm::Orientation with a RefCounter static Orientation *New() {return new Orientation();} OrientationType GetOrientationType( File *file ); diff --git a/src/gdcmSQItem.cxx b/src/gdcmSQItem.cxx index 431ac51e..d5f11db5 100644 --- a/src/gdcmSQItem.cxx +++ b/src/gdcmSQItem.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSQItem.cxx,v $ Language: C++ - Date: $Date: 2005/11/07 09:46:37 $ - Version: $Revision: 1.79 $ + Date: $Date: 2005/11/21 09:46:27 $ + 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 @@ -61,7 +61,7 @@ void SQItem::WriteContent(std::ofstream *fp, FileType filetype) uint16_t itemt[4]= { 0xfffe, 0xe00d, 0xffff, 0xffff }; //we force the writting of an 'Item' Start Element - // because we want to write the Item as a 'no Length' item + // because we want to write the Item as a 'No Length' item for(j=0;j<4;++j) { binary_write( *fp, item[j]); // fffe e000 ffff ffff @@ -100,8 +100,8 @@ void SQItem::WriteContent(std::ofstream *fp, FileType filetype) } /** - * \brief Compute the full length of the SQItem (not only value - * length) depending on the VR. + * \brief Compute the full length of the SQItem (not only value length) + * depending on the VR. */ uint32_t SQItem::ComputeFullLength() { diff --git a/src/gdcmSeqEntry.h b/src/gdcmSeqEntry.h index 96a8740f..0d1aef53 100644 --- a/src/gdcmSeqEntry.h +++ b/src/gdcmSeqEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSeqEntry.h,v $ Language: C++ - Date: $Date: 2005/11/07 09:46:36 $ - Version: $Revision: 1.37 $ + Date: $Date: 2005/11/21 09:46:27 $ + Version: $Revision: 1.38 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -42,7 +42,9 @@ class GDCM_EXPORT SeqEntry : public DocEntry gdcmTypeMacro(SeqEntry); public: +/// \brief Contructs a SeqEntry with a RefCounter from DictEntry static SeqEntry *New(DictEntry *e) {return new SeqEntry(e);} +/// \brief Contructs a SeqEntry with a RefCounter from DocEntry static SeqEntry *New(DocEntry *d, int depth) {return new SeqEntry(d,depth);} void Print(std::ostream &os = std::cout, std::string const &indent = "" ); diff --git a/src/gdcmSerieHelper.cxx b/src/gdcmSerieHelper.cxx index 23e60112..df093b33 100644 --- a/src/gdcmSerieHelper.cxx +++ b/src/gdcmSerieHelper.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSerieHelper.cxx,v $ Language: C++ - Date: $Date: 2005/11/08 16:31:21 $ - Version: $Revision: 1.34 $ + Date: $Date: 2005/11/21 09:46:27 $ + Version: $Revision: 1.35 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -213,8 +213,7 @@ void SerieHelper::AddGdcmFile(File *header) * directory which would have a particular EchoTime==4.0. * This method is a user level, value is not required to be formatted as a DICOM * string - * @param group Group number of the target tag. - * @param elem Element number of the target tag. + * @param key Target tag we want restrict on a given value * @param value value to be checked to exclude File * @param op operator we want to use to check */ @@ -229,16 +228,6 @@ void SerieHelper::AddRestriction(TagKey const &key, ExRestrictions.push_back( r ); } -#ifndef GDCM_LEGACY_REMOVE -void SerieHelper::AddRestriction(TagKey const &key, std::string const &value) -{ - Rule r; - r.first = key; - r.second = value; - Restrictions.push_back( r ); -} -#endif - /** * \brief Sets the root Directory * @param dir Name of the directory to deal with @@ -563,11 +552,12 @@ XCoherentFileSetmap SerieHelper::SplitOnTagValue(FileList *fileSet, //----------------------------------------------------------------------------- // Private /** - * \brief sorts the images, according to their Patient Position + * \brief sorts the images, according to their Patient Position. + * * We may order, considering : * -# Image Position Patient * -# Image Number - * -# File Name + * -# file name * -# More to come :-) * \note : FileList = std::vector * @param fileList Coherent File list (same Serie UID) to sort diff --git a/src/gdcmSerieHelper.h b/src/gdcmSerieHelper.h index acb98ec7..9264eb18 100644 --- a/src/gdcmSerieHelper.h +++ b/src/gdcmSerieHelper.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSerieHelper.h,v $ Language: C++ - Date: $Date: 2005/11/14 15:50:33 $ - Version: $Revision: 1.28 $ + Date: $Date: 2005/11/21 09:46:27 $ + Version: $Revision: 1.29 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -32,7 +32,6 @@ namespace gdcm { class File; - typedef std::vector FileList; /// \brief XCoherent stands for 'Extra Coherent', @@ -46,13 +45,14 @@ class File; //----------------------------------------------------------------------------- /** * \brief - * - This class should be used for a stack of 2D dicom images. - * It allows to explore (recursively or not) a directory and + * This class should be used for a stack of 2D dicom images. + * + * - It allows to explore (recursively or not) a directory and * makes a set of 'Single SerieUID Filesets' - * It allows : - * - to sort any of the 'Single SerieUID Fileset' on the image position. - * - to split any of the Single SerieUID Filesets (better use this name than - * 'Coherent File List' : it's NOT a std::list, files are NOT coherent ...) + * - It allows : + * - - to sort any of the 'Single SerieUID Fileset' on the image position. + * - - to split any of the Single SerieUID Filesets (better use this name than + * 'CoherentFileList' : it's NOT a std::list, files are NOT coherent ...) * into several XCoherent Filesets * XCoherent stands for 'Extra Coherent' (same orientation, or same position) */ @@ -68,6 +68,7 @@ public: typedef std::vector FileVector; +/// \brief Constructs a SerieHelper with a RefCounter static SerieHelper *New() {return new SerieHelper();} virtual ~SerieHelper(); @@ -100,7 +101,6 @@ public: { return (*ItFileSetHt).first; } /// All the following allow user to restrict DICOM file to be part /// of a particular serie - GDCM_LEGACY( void AddRestriction(TagKey const &key, std::string const &value) ); void AddRestriction(TagKey const &key, std::string const &value, int op); /** diff --git a/src/gdcmTS.h b/src/gdcmTS.h index 1033846f..8c87c9a7 100644 --- a/src/gdcmTS.h +++ b/src/gdcmTS.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmTS.h,v $ Language: C++ - Date: $Date: 2005/10/26 08:04:16 $ - Version: $Revision: 1.23 $ + Date: $Date: 2005/11/21 09:46:27 $ + Version: $Revision: 1.24 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -66,6 +66,7 @@ public: }; public: +/// \brief Constructs a gdcmTS with a RefCounter static TS *New() {return new TS();} virtual void Print(std::ostream &os = std::cout, diff --git a/src/gdcmValidator.h b/src/gdcmValidator.h index 051aec9a..752e3b18 100644 --- a/src/gdcmValidator.h +++ b/src/gdcmValidator.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmValidator.h,v $ Language: C++ - Date: $Date: 2005/11/18 11:07:53 $ - Version: $Revision: 1.2 $ + Date: $Date: 2005/11/21 09:46:27 $ + Version: $Revision: 1.3 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,7 +24,7 @@ namespace gdcm { /** - * \brief + * \brief Class to perform some verifications on a gdcm::Document */ class ElementSet; class GDCM_EXPORT Validator : public RefCounter @@ -32,6 +32,8 @@ class GDCM_EXPORT Validator : public RefCounter gdcmTypeMacro(Validator); public: + +/// \brief Constructs a Validator with a RefCounter static Validator *New() {return new Validator();} void SetInput(ElementSet *input); -- 2.45.1