From: jpr Date: Fri, 11 Feb 2005 15:22:18 +0000 (+0000) Subject: Typo, comments, doxygenation X-Git-Tag: Version1.0.bp~28 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d5ebba38c596bd5a0514fc9e08fe8ac2a45482f5;p=gdcm.git Typo, comments, doxygenation --- diff --git a/src/gdcmCommon.h b/src/gdcmCommon.h index 094ad90c..0a115ec2 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/02/07 19:17:27 $ - Version: $Revision: 1.61 $ + Date: $Date: 2005/02/11 15:22:18 $ + 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 @@ -79,6 +79,7 @@ typedef unsigned int uint32_t; #include +/// \brief namespace for Grass root DiCoM namespace gdcm { @@ -136,6 +137,7 @@ enum FileType { ACR_LIBIDO }; +/// \brief type of the elements composing a DICOMDIR (for internal use only) enum DicomDirType { DD_UNKNOWN = 0, DD_META, diff --git a/src/gdcmDebug.h b/src/gdcmDebug.h index 1b6d80ce..8bb1aa46 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/09 21:37:45 $ - Version: $Revision: 1.31 $ + Date: $Date: 2005/02/11 15:22:18 $ + Version: $Revision: 1.32 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -47,8 +47,8 @@ public: Debug(); ~Debug(); - /// This is a global flag that controls whether any debug, warning - /// messages are displayed. + /// \brief This is a global flag that controls whether any debug, warning + /// messages are displayed. static void SetDebugFlag (bool flag); static bool GetDebugFlag (); /// \brief Sets the Debug Flag to true @@ -56,8 +56,8 @@ public: /// \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 + /// \brief 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 diff --git a/src/gdcmDicomDir.h b/src/gdcmDicomDir.h index 0e7cdcf6..7a5af430 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/02/07 14:48:34 $ - Version: $Revision: 1.55 $ + Date: $Date: 2005/02/11 15:22:18 $ + Version: $Revision: 1.56 $ 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,7 @@ public: // Meta DicomDirMeta *NewMeta(); /// Returns a pointer to the DicomDirMeta for this DICOMDIR. - DicomDirMeta* GetMeta() { return MetaElems; }; + DicomDirMeta *GetMeta() { return MetaElems; }; // Patients DicomDirPatient *NewPatient(); @@ -131,14 +131,14 @@ private: void SetElements(std::string const &path, VectDocument const &list); void SetElement (std::string const &path, DicomDirType type, Document *header); - void MoveSQItem(DocEntrySet *dst,DocEntrySet *src); + void MoveSQItem(DocEntrySet *dst, DocEntrySet *src); static bool HeaderLessThan(Document *header1, Document *header2); // Variables /// Pointer on *the* DicomDirObject 'DicomDirMeta Elements' - DicomDirMeta* MetaElems; + DicomDirMeta *MetaElems; /// Chained list of DicomDirPatient (to be exploited hierarchicaly) ListDicomDirPatient Patients; diff --git a/src/gdcmDicomDirElement.cxx b/src/gdcmDicomDirElement.cxx index 68500272..b71f0f8f 100644 --- a/src/gdcmDicomDirElement.cxx +++ b/src/gdcmDicomDirElement.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirElement.cxx,v $ Language: C++ - Date: $Date: 2005/02/07 14:48:34 $ - Version: $Revision: 1.35 $ + Date: $Date: 2005/02/11 15:22:18 $ + Version: $Revision: 1.36 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -27,6 +27,8 @@ namespace gdcm { //----------------------------------------------------------------------------- +/// \brief auto generate function, to fill up the default elements for +/// a DICOMDIR, if relevant file is not found on user's disk void FillDefaultDIRDict(DicomDirElement *dde); //----------------------------------------------------------------------------- diff --git a/src/gdcmDicomDirElement.h b/src/gdcmDicomDirElement.h index a214c47e..4540ce16 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/02/07 14:48:34 $ - Version: $Revision: 1.27 $ + Date: $Date: 2005/02/11 15:22:18 $ + Version: $Revision: 1.28 $ 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,30 @@ typedef std::list ListDicomDirStudyElem; typedef std::list ListDicomDirSerieElem; typedef std::list ListDicomDirImageElem; +// For future use (Full DICOMDIR) +/* +typedef std::list ListDicomDirVisit; +typedef std::list ListDicomDirResult; +typedef std::list ListDicomDirStudyComponent; + +typedef std::list ListDicomDirOverlay; +typedef std::list ListDicomDirModalityLut; +typedef std::list ListDicomDirModalityLut; +typedef std::list ListDicomDirCurve; +typedef std::list ListDicomDirStoredPrint; +typedef std::list ListDicomDirRtDose; +typedef std::list ListDicomDirRtStructureSet; +typedef std::list ListDicomDirRtPlan; +typedef std::list ListDicomDirRtTreatRecord; +typedef std::list ListDicomDirPresentation; +typedef std::list ListDicomDirSrDocument; +typedef std::list ListDicomDirKeyObjectDoc; +typedef std::list ListDicomDirSpectroscopy; +typedef std::list ListDicomDirRawData; +typedef std::list ListDicomDirRegistration; +typedef std::list ListDicomDirFiducial; +*/ + //----------------------------------------------------------------------------- /** * \brief Represents elements contained in a DicomDir class diff --git a/src/gdcmDict.cxx b/src/gdcmDict.cxx index 21df55ad..fc7c07f2 100644 --- a/src/gdcmDict.cxx +++ b/src/gdcmDict.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDict.cxx,v $ Language: C++ - Date: $Date: 2005/02/05 01:37:08 $ - Version: $Revision: 1.73 $ + Date: $Date: 2005/02/11 15:22:18 $ + Version: $Revision: 1.74 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -27,6 +27,8 @@ namespace gdcm { //----------------------------------------------------------------------------- +/// \brief auto generate function, to fill up the Dicom Dictionnary, +/// if relevant file is not found on user's disk void FillDefaultDataDict(Dict *d); //----------------------------------------------------------------------------- diff --git a/src/gdcmDocEntrySet.cxx b/src/gdcmDocEntrySet.cxx index ceba6d07..2f0de0e3 100644 --- a/src/gdcmDocEntrySet.cxx +++ b/src/gdcmDocEntrySet.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntrySet.cxx,v $ Language: C++ - Date: $Date: 2005/02/05 01:37:08 $ - Version: $Revision: 1.54 $ + Date: $Date: 2005/02/11 15:22:18 $ + Version: $Revision: 1.55 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -372,7 +372,7 @@ BinEntry *DocEntrySet::InsertBinEntry(uint8_t *binArea, int lgth, } /** - * \brief Modifies the value of a given Header Entry (Dicom Element) + * \brief Modifies the value of a given Doc Entry (Dicom Element) * when it exists. Creates it when unexistant. * @param group Group number of the Entry * @param elem Element number of the Entry @@ -382,7 +382,7 @@ BinEntry *DocEntrySet::InsertBinEntry(uint8_t *binArea, int lgth, SeqEntry *DocEntrySet::InsertSeqEntry(uint16_t group, uint16_t elem) { SeqEntry *seqEntry = 0; - DocEntry *currentEntry = GetDocEntry( group, elem); + DocEntry *currentEntry = GetDocEntry( group, elem ); // Verify the currentEntry if( currentEntry ) @@ -391,10 +391,9 @@ SeqEntry *DocEntrySet::InsertSeqEntry(uint16_t group, uint16_t elem) // Verify the VR if( seqEntry ) - if( seqEntry->GetVR()!="SQ" ) - seqEntry = NULL; + seqEntry = NULL; - // if currentEntry doesn't correspond to the requested valEntry + // if currentEntry doesn't correspond to the requested seqEntry if( !seqEntry ) { if (!RemoveEntry(currentEntry)) @@ -418,8 +417,13 @@ SeqEntry *DocEntrySet::InsertSeqEntry(uint16_t group, uint16_t elem) return NULL; } } + + // TODO : Find a trick to insert a SequenceDelimitationItem + // in the SeqEntry, at the end. return seqEntry; } + + /** * \brief Checks if a given Dicom Element exists within the H table diff --git a/src/gdcmGlobal.cxx b/src/gdcmGlobal.cxx index fe6840c7..1a31c1c6 100644 --- a/src/gdcmGlobal.cxx +++ b/src/gdcmGlobal.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmGlobal.cxx,v $ Language: C++ - Date: $Date: 2005/02/07 14:48:34 $ - Version: $Revision: 1.20 $ + Date: $Date: 2005/02/11 15:22:18 $ + 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 @@ -27,12 +27,12 @@ namespace gdcm { //----------------------------------------------------------------------------- -// Those global string that are return by reference everywhere in gdcm code -// used to be in gdcmCommon.h but due to a 'bug' in gcc/MacOSX -// you cannot have static initialization in a multithreaded environment -// since there is a lazy construction everything got skrew up somehow -// Therefore the actual initialization is done in a cxx file (avoid -// duplicated symbol), and an extern is used in gdcmCommon.h +/// \brief Those global string that are return by reference everywhere in +/// gdcm code used to be in gdcmCommon.h but due to a 'bug' in gcc/MacOSX +/// you cannot have static initialization in a multithreaded environment +/// since there is a lazy construction everything got skrew up somehow +/// Therefore the actual initialization is done in a cxx file (avoid +/// duplicated symbol), and an extern is used in gdcmCommon.h const std::string GDCM_UNKNOWN = "gdcm::Unknown"; const std::string GDCM_UNFOUND = "gdcm::Unfound"; const std::string GDCM_BINLOADED = "gdcm::Binary data loaded"; diff --git a/src/gdcmJpegLS.cxx b/src/gdcmJpegLS.cxx index a850d359..200d2096 100644 --- a/src/gdcmJpegLS.cxx +++ b/src/gdcmJpegLS.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJpegLS.cxx,v $ Language: C++ - Date: $Date: 2005/02/05 01:37:09 $ - Version: $Revision: 1.3 $ + Date: $Date: 2005/02/11 15:22:18 $ + 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 @@ -34,8 +34,10 @@ namespace gdcm * @warning : not yet made */ -bool gdcm_read_JPEGLS_file (std::ifstream* , void* ) +bool gdcm_read_JPEGLS_file (std::ifstream *fp, void *image_buffer) { + (void)fp; + (void)image_buffer; gdcmWarningMacro( "Sorry JPEG-LS File not yet taken into account" ); return false; } diff --git a/src/gdcmSeqEntry.cxx b/src/gdcmSeqEntry.cxx index 11033cdb..81503181 100644 --- a/src/gdcmSeqEntry.cxx +++ b/src/gdcmSeqEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSeqEntry.cxx,v $ Language: C++ - Date: $Date: 2005/02/05 01:37:09 $ - Version: $Revision: 1.54 $ + Date: $Date: 2005/02/11 15:22:18 $ + Version: $Revision: 1.55 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -18,6 +18,7 @@ #include "gdcmSeqEntry.h" #include "gdcmSQItem.h" +#include "gdcmValEntry.h" #include "gdcmTS.h" #include "gdcmGlobal.h" #include "gdcmUtil.h" @@ -46,7 +47,7 @@ SeqEntry::SeqEntry( DictEntry *e ) } /** - * \brief Constructor from a given SeqEntry + * \brief Constructor from a given DocEntry * @param e Pointer to existing Doc entry * @param depth depth level of the current Seq entry */ diff --git a/src/gdcmSeqEntry.h b/src/gdcmSeqEntry.h index 621c0614..7804b6cf 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/02/04 14:49:01 $ - Version: $Revision: 1.33 $ + Date: $Date: 2005/02/11 15:22:18 $ + 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 @@ -59,6 +59,7 @@ public: /// Sets the Sequence Delimitation Item void SetDelimitationItem(DocEntry *e) { SeqTerm = e; } + /// Gets the Sequence Delimitation Item DocEntry *GetDelimitationItem() { return SeqTerm;} diff --git a/src/gdcmTS.cxx b/src/gdcmTS.cxx index 190c151e..598c92db 100644 --- a/src/gdcmTS.cxx +++ b/src/gdcmTS.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmTS.cxx,v $ Language: C++ - Date: $Date: 2005/02/05 01:37:09 $ - Version: $Revision: 1.42 $ + Date: $Date: 2005/02/11 15:22:18 $ + 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 @@ -28,12 +28,13 @@ // TODO // a lot of troubles expected with TS : 1.2.840.113619.5.2 // Implicit VR - Big Endian -// see : http://www.gemedicalsystemseurope.com/euen/it_solutions/pdf/lsqxi_rev2.pdf +// http://www.gemedicalsystemseurope.com/euen/it_solutions/pdf/lsqxi_rev2.pdf // namespace gdcm { //----------------------------------------------------------------------------- +/// \brief Transfer Syntaxes gdcm deals with (internal use onky) static const char *SpecialStrings[] = { // Implicit VR Little Endian "1.2.840.10008.1.2", @@ -57,7 +58,8 @@ static const char *SpecialStrings[] = { "1.2.840.10008.1.2.4.55", // JPEG Lossless, Non-Hierarchical (Process 14) "1.2.840.10008.1.2.4.57", - // JPEG Lossless, Hierarchical, First-Order Prediction (Process 14, [Selection Value 1]) + // JPEG Lossless, Hierarchical, First-Order Prediction (Process 14, + // [Selection Value 1]) "1.2.840.10008.1.2.4.70", // JPEG-LS Lossless Image Compression "1.2.840.10008.1.2.4.80", @@ -74,6 +76,8 @@ static const char *SpecialStrings[] = { }; //----------------------------------------------------------------------------- +/// \brief auto generated function, to fill up the Dicom Dictionnary, +/// if relevant file is not found on user's disk void FillDefaultTSDict(TSHT &ts); //----------------------------------------------------------------------------- @@ -114,14 +118,18 @@ TS::~TS() //----------------------------------------------------------------------------- // Public + +/// \brief returns occurence number of the given key int TS::Count(TSKey const &key) { return TsMap.count(key); } +/// \brief returns the human reabable value of a Transfer Synatx string TSAtr const &TS::GetValue(TSKey const &key) { - // First thing clean up the string sometime the transfer syntax is padded with spaces + // First thing clean up the string + // (sometime the transfer syntax is padded with spaces) std::string copy = key; while ( copy.size() && !isdigit((unsigned char)copy[copy.size()-1]) ) { diff --git a/src/gdcmUtil.cxx b/src/gdcmUtil.cxx index d51514cc..0e08e053 100644 --- a/src/gdcmUtil.cxx +++ b/src/gdcmUtil.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmUtil.cxx,v $ Language: C++ - Date: $Date: 2005/02/05 01:37:09 $ - Version: $Revision: 1.132 $ + Date: $Date: 2005/02/11 15:22:18 $ + Version: $Revision: 1.133 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -437,7 +437,7 @@ bool Util::DicomStringEqual(const std::string &s1, const char *s2) OUT AsnObjectIdentifier * supportedView); #endif //_WIN32 - +/// \brief gets current M.A.C adress (for internal use only) int GetMacAddrSys ( unsigned char *addr ) { #ifdef _WIN32 @@ -450,8 +450,8 @@ int GetMacAddrSys ( unsigned char *addr ) HANDLE PollForTrapEvent; AsnObjectIdentifier SupportedView; - UINT OID_ifEntryType[] = { 1, 3, 6, 1, 2, 1, 2, 2, 1, 3 }; - UINT OID_ifEntryNum[] = { 1, 3, 6, 1, 2, 1, 2, 1 }; + UINT OID_ifEntryType[] = { 1, 3, 6, 1, 2, 1, 2, 2, 1, 3 }; + UINT OID_ifEntryNum[] = { 1, 3, 6, 1, 2, 1, 2, 1 }; UINT OID_ipMACEntAddr[] = { 1, 3, 6, 1, 2, 1, 2, 2, 1, 6 }; AsnObjectIdentifier MIB_ifMACEntAddr = { sizeof(OID_ipMACEntAddr) / sizeof(UINT), OID_ipMACEntAddr }; @@ -699,9 +699,9 @@ int GetMacAddrSys ( unsigned char *addr ) } /** - * Mini function to return the last digit from a number express in base 256 - * pre condition data contain an array of 6 unsigned char - * post condition carry contain the last digit + * \brief Mini function to return the last digit from a number express in base 256 + * pre condition data contain an array of 6 unsigned char + * post condition carry contain the last digit */ inline int getlastdigit(unsigned char *data) { @@ -810,7 +810,7 @@ const std::string &Util::GetRootUID() //------------------------------------------------------------------------- /** - * \brief + * \brief class for binary write * @param os ostream to write to * @param val val */ diff --git a/src/gdcmVR.cxx b/src/gdcmVR.cxx index a1936d0e..ea98ceb8 100644 --- a/src/gdcmVR.cxx +++ b/src/gdcmVR.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmVR.cxx,v $ Language: C++ - Date: $Date: 2005/02/05 01:37:09 $ - Version: $Revision: 1.35 $ + Date: $Date: 2005/02/11 15:22:19 $ + Version: $Revision: 1.36 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -27,6 +27,8 @@ namespace gdcm { //----------------------------------------------------------------------------- +/// \brief auto generated function, to fill up the 'Value Representation' +/// Dictionnary, if relevant file is not found on user's disk void FillDefaultVRDict(VRHT &vr); //-----------------------------------------------------------------------------