From: jpr Date: Fri, 4 Feb 2005 16:51:36 +0000 (+0000) Subject: Some more Doxygenation X-Git-Tag: Version1.0.bp~87 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=7f62d92753e6a3e7f4f15093fb959dcb785d6c46;p=gdcm.git Some more Doxygenation --- diff --git a/src/gdcmDebug.cxx b/src/gdcmDebug.cxx index a075700c..541f79fc 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/02/02 14:52:22 $ - Version: $Revision: 1.23 $ + Date: $Date: 2005/02/04 16:51:36 $ + 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 @@ -43,7 +43,7 @@ Debug::~Debug() //----------------------------------------------------------------------------- // Public /** - * \brief Accessor + * \brief Sets the debug flag * @param flag Set the debug flag */ void Debug::SetDebugFlag (bool flag) @@ -78,7 +78,8 @@ bool Debug::GetDebugToFile () } /** - * \brief Set Accessor + * \brief Set the filename the debug stream should be redirect to + * Settting a filename also set DebugToFile to true * @param filename File to redirect debug info * Absolutely nothing is check. You have to pass in * a correct filename @@ -93,7 +94,8 @@ void Debug::SetDebugFilename (std::string const &filename) } /** - * \brief Get Accessor + * \brief Internal use only. Allow us to retrieve the static from anywhere + * in gdcm code * @return Debug file */ std::ofstream &Debug::GetDebugFile () diff --git a/src/gdcmDebug.h b/src/gdcmDebug.h index f181276a..f4c36419 100644 --- a/src/gdcmDebug.h +++ b/src/gdcmDebug.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDebug.h,v $ Language: C++ - Date: $Date: 2005/02/01 13:11:49 $ - Version: $Revision: 1.28 $ + Date: $Date: 2005/02/04 16:51:36 $ + 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 @@ -51,22 +51,22 @@ public: /// messages are displayed. static void SetDebugFlag (bool flag); static bool GetDebugFlag (); + /// \brief Sets the Debug Flag to true static void DebugOn () { SetDebugFlag(true); }; + /// \brief Sets the Debug Flag to false static void DebugOff () { SetDebugFlag(false); }; /// This is a global flag that controls if debug are redirected /// to a file or not static void SetDebugToFile (bool flag); static bool GetDebugToFile (); + /// \brief Next debug messages will be sent in the debug file static void DebugToFileOn () { SetDebugToFile(true); }; + /// \brief Next debug messages will be sent in the standard output static void DebugToFileOff () { SetDebugToFile(false); }; - /// Set the filename the debug stream should be redirect to - /// Settting a filename also set DebugToFile to true - static void SetDebugFilename (std::string const& filename); + static void SetDebugFilename (std::string const &filename); - /// Internal use only. Allow us to retrieve the static from anywhere - /// in gdcm code static std::ofstream &GetDebugFile (); }; diff --git a/src/gdcmDicomDirPatient.h b/src/gdcmDicomDirPatient.h index 3ef9dca7..6cdb3534 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/02/02 14:52:25 $ - Version: $Revision: 1.24 $ + Date: $Date: 2005/02/04 16:51:36 $ + Version: $Revision: 1.25 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -39,10 +39,11 @@ public: DicomDirPatient(bool empty=false); ~DicomDirPatient(); - void Print(std::ostream &os = std::cout, std::string const & indent = "" ); + void Print(std::ostream &os = std::cout, std::string const &indent = "" ); void WriteContent(std::ofstream *fp, FileType t); // Patient methods + /// \brief Adds a new gdcmDicomDirStudy to the Patient void AddStudy(DicomDirStudy *obj) { Studies.push_back(obj); }; DicomDirStudy *NewStudy(); void ClearStudy(); diff --git a/src/gdcmDicomDirSerie.h b/src/gdcmDicomDirSerie.h index d4b2c1e3..81e92bdd 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/02/02 14:52:26 $ - Version: $Revision: 1.26 $ + Date: $Date: 2005/02/04 16:51:36 $ + 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 @@ -38,11 +38,12 @@ public: DicomDirSerie(bool empty=false); ~DicomDirSerie(); - void Print( std::ostream &os = std::cout, std::string const & indent = "" ); + void Print( std::ostream &os = std::cout, std::string const &indent = "" ); void WriteContent( std::ofstream *fp, FileType t ); // Image methods DicomDirImage *NewImage(); + /// Add a new gdcm::DicomDirImage to the Serie void AddImage(DicomDirImage *obj) { Images.push_back(obj); }; void ClearImage(); diff --git a/src/gdcmDicomDirStudy.h b/src/gdcmDicomDirStudy.h index 2d94b737..168efcbb 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/02/02 14:52:26 $ - Version: $Revision: 1.23 $ + Date: $Date: 2005/02/04 16:51:36 $ + 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 @@ -38,11 +38,12 @@ public: DicomDirStudy(bool empty=false); ~DicomDirStudy(); - void Print(std::ostream &os = std::cout, std::string const & indent = "" ); + void Print(std::ostream &os = std::cout, std::string const &indent = "" ); void WriteContent(std::ofstream *fp, FileType t); // Serie methods DicomDirSerie* NewSerie(); + /// Adds a gdcm::DicomDirSerie to a Study void AddSerie(DicomDirSerie *obj) { Series.push_back(obj); }; void ClearSerie(); diff --git a/src/gdcmDirList.cxx b/src/gdcmDirList.cxx index 6b95cf8f..dbe3c051 100644 --- a/src/gdcmDirList.cxx +++ b/src/gdcmDirList.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDirList.cxx,v $ Language: C++ - Date: $Date: 2005/02/02 15:07:41 $ - Version: $Revision: 1.43 $ + Date: $Date: 2005/02/04 16:51:36 $ + Version: $Revision: 1.44 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -54,6 +54,11 @@ DirList::~DirList() //----------------------------------------------------------------------------- // Public +/** + * \brief Tells us if file name corresponds to a Directory + * @param dirName file name to check + * @return true if the file IS a Directory + */ bool DirList::IsDirectory(std::string const &dirName) { #ifndef _MSC_VER diff --git a/src/gdcmDocEntryArchive.h b/src/gdcmDocEntryArchive.h index 660d255c..5c8de46e 100644 --- a/src/gdcmDocEntryArchive.h +++ b/src/gdcmDocEntryArchive.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntryArchive.h,v $ Language: C++ - Date: $Date: 2005/01/26 11:42:02 $ - Version: $Revision: 1.7 $ + Date: $Date: 2005/02/04 16:51:36 $ + 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 @@ -49,8 +49,9 @@ public: void ClearArchive(void); private: -// TagDocEntryHT &HeaderHT; // we keep the name HeaderHT + /// pointer to the gdcm::File pointer we want to save values from File *ArchFile; + /// H table to save values. TagDocEntryHT Archive; }; } // end namespace gdcm diff --git a/src/gdcmGlobal.h b/src/gdcmGlobal.h index 7be8db87..893af415 100644 --- a/src/gdcmGlobal.h +++ b/src/gdcmGlobal.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmGlobal.h,v $ Language: C++ - Date: $Date: 2005/02/01 10:29:55 $ - Version: $Revision: 1.6 $ + Date: $Date: 2005/02/04 16:51:36 $ + 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 @@ -48,11 +48,11 @@ private: static DictSet *Dicts; /// Pointer to a hash table containing the 'Value Representations'. static VR *ValRes; - /// Pointer to a hash table containing the Transfer Syntax codes and their - /// english description + /// \brief Pointer to a hash table containing the Transfer Syntax codes + /// and their english description static TS *TranSyn; - /// Pointer to the hash table containing the Dicom Elements necessary - /// to describe each part of a DICOMDIR + /// \brief Pointer to the hash table containing the Dicom Elements necessary + /// to describe each part of a DICOMDIR static DicomDirElement *ddElem; }; } // end namespace gdcm diff --git a/src/gdcmJPEGFragment.cxx b/src/gdcmJPEGFragment.cxx index fa8f86d6..8c82b1d8 100644 --- a/src/gdcmJPEGFragment.cxx +++ b/src/gdcmJPEGFragment.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJPEGFragment.cxx,v $ Language: C++ - Date: $Date: 2005/02/01 10:29:55 $ - Version: $Revision: 1.13 $ + Date: $Date: 2005/02/04 16:51:36 $ + 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 @@ -24,11 +24,11 @@ namespace gdcm //------------------------------------------------------------------------- // For JPEG 2000, body in file gdcmJpeg2000.cxx // Not yet made -bool gdcm_read_JPEG2000_file (std::ifstream* fp, void* image_buffer); +bool gdcm_read_JPEG2000_file (std::ifstream *fp, void *image_buffer); // For JPEG-LS, body in file gdcmJpegLS.cxx // Not yet made -bool gdcm_read_JPEGLS_file (std::ifstream* fp, void* image_buffer); +bool gdcm_read_JPEGLS_file (std::ifstream *fp, void *image_buffer); //------------------------------------------------------------------------- // Constructor / Destructor @@ -55,7 +55,7 @@ JPEGFragment::JPEGFragment() */ void JPEGFragment::DecompressJPEGFramesFromFile(std::ifstream *fp, uint8_t *buffer, int nBits, - int & statesuspension) + int &statesuspension) { // First thing need to reset file to proper position: fp->seekg( Offset, std::ios::beg); diff --git a/src/gdcmJPEGFragment.h b/src/gdcmJPEGFragment.h index e6d74eb8..72de1f2b 100644 --- a/src/gdcmJPEGFragment.h +++ b/src/gdcmJPEGFragment.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJPEGFragment.h,v $ Language: C++ - Date: $Date: 2005/01/31 04:00:04 $ - Version: $Revision: 1.15 $ + Date: $Date: 2005/02/04 16:51:36 $ + 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 @@ -28,7 +28,8 @@ namespace gdcm { /** - * \brief Utility class for summerizing the informations of a JPEG + * \brief *very* internal class . Shouldn't appear here ! + * Utility class for summerizing the informations of a JPEG * fragment of an "Encapsulated JPEG Compressed Image". * This information is a mix of: * - the fragment offset @@ -43,17 +44,19 @@ class GDCM_EXPORT JPEGFragment public: JPEGFragment(); void Print( std::ostream &os = std::cout, std::string indent = "" ); - void DecompressJPEGFramesFromFile(std::ifstream *fp, uint8_t *buffer, int nBits, int & statesuspension); + void DecompressJPEGFramesFromFile(std::ifstream *fp, + uint8_t *buffer, int nBits, + int &statesuspension); - bool ReadJPEGFile8 (std::ifstream* fp, void* image_buffer, int & statesuspension ); - bool ReadJPEGFile12 (std::ifstream* fp, void* image_buffer, int & statesuspension ); - bool ReadJPEGFile16 (std::ifstream* fp, void* image_buffer, int & statesuspension ); + bool ReadJPEGFile8 (std::ifstream* fp, void *image_buffer, int &statesuspension ); + bool ReadJPEGFile12 (std::ifstream* fp, void *image_buffer, int &statesuspension ); + bool ReadJPEGFile16 (std::ifstream* fp, void *image_buffer, int &statesuspension ); void SetLength(uint32_t length) { Length = length; }; - uint32_t GetLength() { return Length;}; + uint32_t GetLength() { return Length; }; void SetOffset(uint32_t offset) { Offset = offset; }; - uint32_t GetOffset() { return Offset;}; - uint8_t *GetImage() { return pImage;}; + uint32_t GetOffset() { return Offset; }; + uint8_t *GetImage() { return pImage; }; private: uint32_t Offset; diff --git a/src/gdcmPixelReadConvert.cxx b/src/gdcmPixelReadConvert.cxx index 424514ed..18315f10 100644 --- a/src/gdcmPixelReadConvert.cxx +++ b/src/gdcmPixelReadConvert.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelReadConvert.cxx,v $ Language: C++ - Date: $Date: 2005/02/03 17:12:46 $ - Version: $Revision: 1.47 $ + Date: $Date: 2005/02/04 16:51:36 $ + Version: $Revision: 1.48 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -35,6 +35,7 @@ namespace gdcm //----------------------------------------------------------------------------- // Constructor / Destructor +/// Constructor PixelReadConvert::PixelReadConvert() { RGB = 0; @@ -47,6 +48,7 @@ PixelReadConvert::PixelReadConvert() LutBlueData = 0; } +/// Canonical Destructor PixelReadConvert::~PixelReadConvert() { Squeeze(); @@ -181,6 +183,7 @@ void PixelReadConvert::GrabInformationsFromFile( File *file ) ComputeRawAndRGBSizes(); } +/// \brief Reads from disk and decompresses Pixels bool PixelReadConvert::ReadAndDecompressPixelData( std::ifstream *fp ) { // ComputeRawAndRGBSizes is already made by @@ -264,6 +267,7 @@ bool PixelReadConvert::ReadAndDecompressPixelData( std::ifstream *fp ) return true; } +/// Deletes Pixels Area void PixelReadConvert::Squeeze() { if ( RGB ) @@ -756,6 +760,11 @@ void PixelReadConvert::ConvertYcBcRPlanesToRGBPixels() delete[] copyRaw; } +/// \brief Deals with the color decoding i.e. handle: +/// - R, G, B planes (as opposed to RGB pixels) +/// - YBR (various) encodings. +/// - LUT[s] (or "PALETTE COLOR"). + void PixelReadConvert::ConvertHandleColor() { ////////////////////////////////// @@ -826,6 +835,7 @@ void PixelReadConvert::ConvertHandleColor() // In *normal *case, when planarConf is 0, pixels are already in RGB } +/// Computes the Pixels Size void PixelReadConvert::ComputeRawAndRGBSizes() { int bitsAllocated = BitsAllocated; @@ -850,6 +860,7 @@ void PixelReadConvert::ComputeRawAndRGBSizes() } } +/// Allocates room for RGB Pixels void PixelReadConvert::AllocateRGB() { if ( RGB ) @@ -857,6 +868,7 @@ void PixelReadConvert::AllocateRGB() RGB = new uint8_t[RGBSize]; } +/// Allocates room for RAW Pixels void PixelReadConvert::AllocateRaw() { if ( Raw ) diff --git a/src/gdcmPixelWriteConvert.cxx b/src/gdcmPixelWriteConvert.cxx index 645d03ab..34c5fcdb 100644 --- a/src/gdcmPixelWriteConvert.cxx +++ b/src/gdcmPixelWriteConvert.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelWriteConvert.cxx,v $ Language: C++ - Date: $Date: 2005/02/01 10:29:56 $ - Version: $Revision: 1.6 $ + Date: $Date: 2005/02/04 16:51:36 $ + 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 @@ -24,14 +24,14 @@ namespace gdcm //----------------------------------------------------------------------------- // Constructor / Destructor /** - * \brief Construcror + * \brief Constructor */ PixelWriteConvert::PixelWriteConvert() { - ReadData = 0; + ReadData = 0; ReadDataSize = 0; - UserData = 0; + UserData = 0; UserDataSize = 0; } @@ -49,26 +49,26 @@ PixelWriteConvert::~PixelWriteConvert() * @param data data * @param size size */ -void PixelWriteConvert::SetReadData(uint8_t *data,size_t size) +void PixelWriteConvert::SetReadData(uint8_t *data, size_t size) { ReadData = data; ReadDataSize = size; } /** - * \brief SetUserData + * \brief Sets User Data * @param data data * @param size size */ -void PixelWriteConvert::SetUserData(uint8_t *data,size_t size) +void PixelWriteConvert::SetUserData(uint8_t *data, size_t size) { UserData = data; UserDataSize = size; } /** - * \brief GetData - * @return data + * \brief Get Data (UserData or ReadData) + * @return data data */ uint8_t *PixelWriteConvert::GetData() { @@ -83,8 +83,8 @@ uint8_t *PixelWriteConvert::GetData() } /** - * \brief GetDataSize - * @return size + * \brief Get Data Size (UserData or ReadData) + * @return size size */ size_t PixelWriteConvert::GetDataSize() {