From: jpr Date: Sun, 30 Jan 2005 17:30:57 +0000 (+0000) Subject: Cosmetics X-Git-Tag: Version1.0.bp~154 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=dd9001df5c1b8d5be917f635a6316aa4f0869af7;p=gdcm.git Cosmetics --- diff --git a/src/gdcmBase.h b/src/gdcmBase.h index 9304052d..0036ba22 100644 --- a/src/gdcmBase.h +++ b/src/gdcmBase.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmBase.h,v $ Language: C++ - Date: $Date: 2005/01/21 11:40:55 $ - Version: $Revision: 1.4 $ + Date: $Date: 2005/01/30 17:30:57 $ + 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 @@ -27,7 +27,6 @@ namespace gdcm //----------------------------------------------------------------------------- /** * \brief Base class of all gdcm classes - * * Contains the Print related methods : * - Print * - SetPrintLevel / GetPrintLevel @@ -38,7 +37,8 @@ public: Base( ); virtual ~Base(); - virtual void Print(std::ostream &os = std::cout, std::string const & indent = "" ); + virtual void Print(std::ostream &os = std::cout, + std::string const & indent = "" ); /// \brief Sets the print level for the Dicom Header Elements /// \note 0 for Light Print; 1 for 'medium' Print, 2 for Heavy diff --git a/src/gdcmBinEntry.cxx b/src/gdcmBinEntry.cxx index f572c83e..037db638 100644 --- a/src/gdcmBinEntry.cxx +++ b/src/gdcmBinEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmBinEntry.cxx,v $ Language: C++ - Date: $Date: 2005/01/28 15:10:56 $ - Version: $Revision: 1.58 $ + Date: $Date: 2005/01/30 17:30:57 $ + Version: $Revision: 1.59 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -64,7 +64,6 @@ BinEntry::~BinEntry() } } - //----------------------------------------------------------------------------- // Print /** @@ -101,7 +100,7 @@ void BinEntry::Print(std::ostream &os, std::string const & ) //----------------------------------------------------------------------------- // Public -/* +/** * \brief canonical Writer * @param fp already open file pointer * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...) diff --git a/src/gdcmBinEntry.h b/src/gdcmBinEntry.h index 63637ebe..f7fa6485 100644 --- a/src/gdcmBinEntry.h +++ b/src/gdcmBinEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmBinEntry.h,v $ Language: C++ - Date: $Date: 2005/01/28 15:10:56 $ - Version: $Revision: 1.34 $ + Date: $Date: 2005/01/30 17:30:57 $ + 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 @@ -44,6 +44,7 @@ public: ~BinEntry(); void Print( std::ostream &os = std::cout, std::string const & indent = "" ); + void WriteContent( std::ofstream *fp, FileType ft); /// \brief Returns the area value of the current Dicom Entry @@ -51,13 +52,16 @@ public: uint8_t *GetBinArea() { return BinArea; } void SetBinArea( uint8_t *area, bool self = true ); + /// \brief Sets SelfArea void SetSelfArea(bool area) { SelfArea = area; }; + /// \brief Returns SelfArea bool IsSelfArea() { return SelfArea; }; private: /// \brief memory area to hold 'non std::string' representable values /// (ie : Lookup Tables, overlays, icons) uint8_t *BinArea; + /// \brief Whether BinEntry has its own BinArea or not bool SelfArea; }; diff --git a/src/gdcmCommon.h b/src/gdcmCommon.h index 16af1928..a51dd660 100644 --- a/src/gdcmCommon.h +++ b/src/gdcmCommon.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmCommon.h,v $ Language: C++ - Date: $Date: 2005/01/28 00:02:15 $ - Version: $Revision: 1.58 $ + Date: $Date: 2005/01/30 17:30:57 $ + Version: $Revision: 1.59 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -97,7 +97,7 @@ GDCM_EXPORT extern const std::string GDCM_NOTLOADED; GDCM_EXPORT extern const std::string GDCM_UNREAD; /// \brief TagKey is made to hold an "universal" (as in URL, Universal -/// Ressource Locator) key to a DocEntry i.e. a dicom tag. +/// Ressource Locator) key to a DocEntry i.e. a dicom tag. /// A dicom tag always has a group and an elem, but a set of tags /// embeded in various (optionally nested) sequences and sharing /// the same group and elem all share the same (group, elem) @@ -123,12 +123,13 @@ GDCM_EXPORT extern const std::string GDCM_UNREAD; /// a sequence, itself nested in the third item of a sequence is the /// string e.g. /// 0004|1220/2#0008|0082/0#0008|0090 +/// Probabely useless stuff. typedef std::string TagKey; typedef std::string TagName; enum FileType { Unknown = 0, - ExplicitVR, // DicomDir is in this case + ExplicitVR, // DicomDir is in this case. Except when it's ImplicitVR !... ImplicitVR, ACR, ACR_LIBIDO @@ -142,6 +143,7 @@ enum DicomDirType { DD_SERIE, DD_IMAGE }; + } //namespace gdcm //----------------------------------------------------------------------------- #endif diff --git a/src/gdcmContentEntry.cxx b/src/gdcmContentEntry.cxx index d48ac1c2..22ca6d2f 100644 --- a/src/gdcmContentEntry.cxx +++ b/src/gdcmContentEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmContentEntry.cxx,v $ Language: C++ - Date: $Date: 2005/01/28 15:10:56 $ - Version: $Revision: 1.7 $ + Date: $Date: 2005/01/30 17:30:57 $ + 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 @@ -56,6 +56,9 @@ ContentEntry::~ContentEntry () { } +//----------------------------------------------------------------------------- +// Print + //----------------------------------------------------------------------------- // Public void ContentEntry::Copy(DocEntry *doc) diff --git a/src/gdcmContentEntry.h b/src/gdcmContentEntry.h index da8db0ed..8cb66a0a 100644 --- a/src/gdcmContentEntry.h +++ b/src/gdcmContentEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmContentEntry.h,v $ Language: C++ - Date: $Date: 2005/01/28 15:10:56 $ - Version: $Revision: 1.3 $ + Date: $Date: 2005/01/30 17:30:57 $ + 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 @@ -40,6 +40,7 @@ public: virtual void WriteContent(std::ofstream *fp, FileType filetype) = 0; // Accessors are protected, not to be invoked by end user + /// Sets the value (string) of the current Dicom entry virtual void SetValue(std::string const &val) { Value = val; }; diff --git a/src/gdcmDebug.cxx b/src/gdcmDebug.cxx index 41f6f18c..82ced414 100644 --- a/src/gdcmDebug.cxx +++ b/src/gdcmDebug.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDebug.cxx,v $ Language: C++ - Date: $Date: 2005/01/27 11:55:57 $ - Version: $Revision: 1.18 $ + Date: $Date: 2005/01/30 17:30:57 $ + Version: $Revision: 1.19 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -28,6 +28,9 @@ static bool DebugToFile = false; static std::ofstream DebugFile; +//----------------------------------------------------------------------------- +// Constructor / Destructor + Debug::Debug() { @@ -38,7 +41,14 @@ Debug::~Debug() if ( DebugFile.is_open() ) DebugFile.close(); } + //----------------------------------------------------------------------------- +// Print + + +//----------------------------------------------------------------------------- +// Public + /** * \brief Accessor * @param flag Set the debug flag @@ -76,7 +86,7 @@ bool Debug::GetDebugToFile () } /** - * \brief Accessor + * \brief Set Accessor * @param flag Set the debug flag to redirect to file * Absolutely nothing is check. You have to pass in * a correct filename @@ -90,11 +100,22 @@ void Debug::SetDebugFilename (std::string const &filename) DebugFile.open( filename.c_str() ); } +/** + * \brief Get Accessor + * @return Debug file + */ std::ofstream &Debug::GetDebugFile () { return DebugFile; } +//----------------------------------------------------------------------------- +// Protected + +//----------------------------------------------------------------------------- +// Private + +//----------------------------------------------------------------------------- } // end namespace gdcm diff --git a/src/gdcmDocEntry.cxx b/src/gdcmDocEntry.cxx index ec546415..a1f5882e 100644 --- a/src/gdcmDocEntry.cxx +++ b/src/gdcmDocEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntry.cxx,v $ Language: C++ - Date: $Date: 2005/01/28 15:10:56 $ - Version: $Revision: 1.48 $ + Date: $Date: 2005/01/30 17:30:57 $ + Version: $Revision: 1.49 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -134,12 +134,11 @@ void DocEntry::WriteContent(std::ofstream *fp, FileType filetype) // we just *always* ignore spurious fffe|0000 tag ! return; } - // // ----------- Writes the common part // - binary_write( *fp, group); //group - binary_write( *fp, el); //element + binary_write( *fp, group); //group + binary_write( *fp, el); //element if ( filetype == ExplicitVR ) { @@ -234,14 +233,14 @@ uint32_t DocEntry::GetFullLength() /** * \brief Copies all the attributes from an other DocEntry - * @param e entry to copy from + * @param doc entry to copy from */ -void DocEntry::Copy(DocEntry *e) +void DocEntry::Copy(DocEntry *doc) { - Length = e->Length; - ReadLength = e->ReadLength; - ImplicitVR = e->ImplicitVR; - Offset = e->Offset; + Length = doc->Length; + ReadLength = doc->ReadLength; + ImplicitVR = doc->ImplicitVR; + Offset = doc->Offset; } /** @@ -252,6 +251,7 @@ bool DocEntry::IsItemDelimitor() { return (GetGroup() == 0xfffe && GetElement() == 0xe00d); } + /** * \brief tells us if entry is the last one of a 'no length' Sequence * (fffe,e0dd) diff --git a/src/gdcmDocEntry.h b/src/gdcmDocEntry.h index ba8718c5..02debe38 100644 --- a/src/gdcmDocEntry.h +++ b/src/gdcmDocEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntry.h,v $ Language: C++ - Date: $Date: 2005/01/28 15:10:56 $ - Version: $Revision: 1.42 $ + Date: $Date: 2005/01/30 17:30:57 $ + Version: $Revision: 1.43 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -128,7 +128,7 @@ public: uint32_t GetFullLength(); - virtual void Copy(DocEntry *doc); + virtual void Copy(DocEntry *e); bool IsItemDelimitor(); bool IsSequenceDelimitor(); diff --git a/src/gdcmJPEGFragmentsInfo.h b/src/gdcmJPEGFragmentsInfo.h index 20f17977..da248099 100644 --- a/src/gdcmJPEGFragmentsInfo.h +++ b/src/gdcmJPEGFragmentsInfo.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJPEGFragmentsInfo.h,v $ Language: C++ - Date: $Date: 2005/01/28 15:42:22 $ - Version: $Revision: 1.15 $ + Date: $Date: 2005/01/30 17:30:57 $ + Version: $Revision: 1.16 $ 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,8 @@ namespace gdcm * \brief Utility class for gathering the informations of the collection * of JPEG fragment[s] (see \ref JPEGFragment) when handling * "Encapsulated JPEG Compressed Images". - * The informations on each frame are obtained during the parsing - * of a Document (refer to - * \ref Document::ComputeJPEGFragmentInfo() ). + * The informations on each frame are obtained during the pixel parsing + * of a gdcm::File (refer to \ref File::ComputeJPEGFragmentInfo() ). * They shall be used when (if necessary) decoding the fragments. * * This class is simply a stl list<> of \ref JPEGFragment. diff --git a/src/gdcmRLEFramesInfo.h b/src/gdcmRLEFramesInfo.h index 5d7c2232..dfc3d89c 100644 --- a/src/gdcmRLEFramesInfo.h +++ b/src/gdcmRLEFramesInfo.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmRLEFramesInfo.h,v $ Language: C++ - Date: $Date: 2005/01/28 15:42:22 $ - Version: $Revision: 1.13 $ + Date: $Date: 2005/01/30 17:30:57 $ + 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,9 +33,9 @@ namespace gdcm * Note: a classical image can be considered as the degenerated case * of a multiframe image. In this case the collection is limited * to a single individual frame. - * The informations on each frame are obtained during the parsing - * of a Document (refer to - * \ref Document::ComputeRLEInfo() ). + * The informations on each frame are obtained during the pixel parsing + * of a gdcm::File (refer to + * \ref File::ComputeRLEInfo() ). * They shall be used when (if necessary) decoding the frames. * * This class is simply a stl list<> of \ref RLEFrame. diff --git a/src/gdcmSQItem.cxx b/src/gdcmSQItem.cxx index bb907582..945ad0b2 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/01/26 09:49:54 $ - Version: $Revision: 1.61 $ + Date: $Date: 2005/01/30 17:30:57 $ + 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 @@ -169,7 +169,7 @@ bool SQItem::AddEntry(DocEntry *entry) * @param entryToRemove Entry to remove AND delete. * @return true if the entry was found and removed; false otherwise */ -bool SQItem::RemoveEntry( DocEntry* entryToRemove) +bool SQItem::RemoveEntry( DocEntry *entryToRemove) { for(ListDocEntry::iterator it = DocEntries.begin(); it != DocEntries.end(); @@ -192,7 +192,7 @@ bool SQItem::RemoveEntry( DocEntry* entryToRemove) * @param entryToRemove Entry to remove. * @return true if the entry was found and removed; false otherwise */ -bool SQItem::RemoveEntryNoDestroy(DocEntry* entryToRemove) +bool SQItem::RemoveEntryNoDestroy(DocEntry *entryToRemove) { for(ListDocEntry::iterator it = DocEntries.begin(); it != DocEntries.end(); @@ -215,7 +215,7 @@ bool SQItem::RemoveEntryNoDestroy(DocEntry* entryToRemove) * \brief Get the first Dicom entry while visiting the SQItem * \return The first DocEntry if found, otherwhise 0 */ -DocEntry * SQItem::GetFirstEntry() +DocEntry *SQItem::GetFirstEntry() { ItDocEntries = DocEntries.begin(); if (ItDocEntries != DocEntries.end()) diff --git a/src/gdcmValEntry.cxx b/src/gdcmValEntry.cxx index 03f1d679..e2dad4e6 100644 --- a/src/gdcmValEntry.cxx +++ b/src/gdcmValEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmValEntry.cxx,v $ Language: C++ - Date: $Date: 2005/01/25 16:32:45 $ - Version: $Revision: 1.52 $ + Date: $Date: 2005/01/30 17:30:57 $ + Version: $Revision: 1.53 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -51,7 +51,6 @@ ValEntry::ValEntry(DocEntry *e) Copy(e); } - /** * \brief Canonical destructor. */ @@ -180,7 +179,6 @@ void ValEntry::Print(std::ostream &os, std::string const &) * \brief Sets the std::string representable' value of a ValEntry * @param val value to set */ - void ValEntry::SetValue(std::string const &val) { // Integers have a special treatement for their length: