]> Creatis software - gdcm.git/commitdiff
doxygenation
authorjpr <jpr>
Thu, 5 Feb 2004 12:25:38 +0000 (12:25 +0000)
committerjpr <jpr>
Thu, 5 Feb 2004 12:25:38 +0000 (12:25 +0000)
12 files changed:
src/gdcmDicomDir.cxx
src/gdcmDicomDirElement.cxx
src/gdcmDict.cxx
src/gdcmDictEntry.cxx
src/gdcmDictSet.cxx
src/gdcmDirList.cxx
src/gdcmException.cxx
src/gdcmFile.cxx
src/gdcmHeader.cxx
src/gdcmHeaderEntry.cxx
src/gdcmHeaderHelper.cxx
src/gdcmParser.cxx

index 92cdc6f8702234cf7474e1132bf527ec82ede3d0..39685088a8cea1d405bf514b11a94edf32846d74 100644 (file)
@@ -17,7 +17,7 @@
 // Constructor / Destructor
 /*
  * \ingroup gdcmDicomDir
- * \brief   
+ * \brief   Constructor
  * @param   Filename
  * @param   exception_on_error
  */
@@ -66,6 +66,10 @@ gdcmDicomDir::~gdcmDicomDir()
 
 //-----------------------------------------------------------------------------
 // Print
+/*
+ * \ingroup gdcmDicomDir
+ * \brief  Canonical Printer 
+ */
 void gdcmDicomDir::Print(std::ostream &os)
 {
    for(ListPatient::iterator cc=patients.begin();cc!=patients.end();++cc)
@@ -81,9 +85,9 @@ void gdcmDicomDir::Print(std::ostream &os)
  * \ingroup gdcmDicomDir
  * \brief   writes on disc a DICOMDIR
  * \ warning does NOT add the missing elements in the header :
- * \         it's up to the user doing it !
+ *           it's up to the user doing it !
  * @param  fileName file to be written to 
- * @return
+ * @return false only when fail to open
  */
 bool gdcmDicomDir::Write(std::string fileName) 
 {
@@ -109,6 +113,10 @@ bool gdcmDicomDir::Write(std::string fileName)
    return true;
 }
 
+/*
+ * \ingroup gdcmDicomDir
+ * \brief  fills whole the structure
+ */
 void gdcmDicomDir::ParseDirectory(void)
 {
    NewDicomDir(GetPath());
@@ -120,7 +128,7 @@ void gdcmDicomDir::ParseDirectory(void)
 /*
  * \ingroup gdcmDicomDir
  * \brief   
- * @param   
+ * @param path entry point of the stree-like structure
  */
 void gdcmDicomDir::NewDicomDir(std::string path)
 {
@@ -233,7 +241,9 @@ void gdcmDicomDir::CreateDicomDir()
 /*
  * \ingroup gdcmDicomDir
  * \brief   
- * @param   
+ * @param   type
+ * @param   begin
+ * @param   end
  */
 void gdcmDicomDir::AddObjectToEnd(gdcmDicomDirType type,ListTag::iterator begin,ListTag::iterator end)
 {
@@ -260,8 +270,9 @@ void gdcmDicomDir::AddObjectToEnd(gdcmDicomDirType type,ListTag::iterator begin,
 /*
  * \ingroup gdcmDicomDir
  * \brief   
- * @param   
- */
+ * @param   begin
+ * @param   end
+*/
 void gdcmDicomDir::AddPatientToEnd(ListTag::iterator begin,ListTag::iterator end)
 {
    patients.push_back(new gdcmPatient(begin,end));
@@ -270,7 +281,8 @@ void gdcmDicomDir::AddPatientToEnd(ListTag::iterator begin,ListTag::iterator end
 /*
  * \ingroup gdcmDicomDir
  * \brief   
- * @param   
+ * @param   begin
+ * @param   end
  */
  void gdcmDicomDir::AddStudyToEnd(ListTag::iterator begin,ListTag::iterator end)
 {
@@ -284,7 +296,8 @@ void gdcmDicomDir::AddPatientToEnd(ListTag::iterator begin,ListTag::iterator end
 /*
  * \ingroup gdcmDicomDir
  * \brief   
- * @param   
+ * @param   begin
+ * @param   end
  */
 void gdcmDicomDir::AddSerieToEnd(ListTag::iterator begin,ListTag::iterator end)
 {
@@ -304,7 +317,8 @@ void gdcmDicomDir::AddSerieToEnd(ListTag::iterator begin,ListTag::iterator end)
 
 /*
  * \ingroup gdcmDicomDir
- * \brief   
+ * @param   begin
+ * @param   end
  * @param   
  */
  void gdcmDicomDir::AddImageToEnd(ListTag::iterator begin,ListTag::iterator end)
@@ -332,7 +346,8 @@ void gdcmDicomDir::AddSerieToEnd(ListTag::iterator begin,ListTag::iterator end)
 /*
  * \ingroup gdcmDicomDir
  * \brief   
- * @param   
+ * @param   path
+ * @param   list
  */
 void gdcmDicomDir::SetElements(std::string &path,ListHeader &list)
 {
@@ -385,7 +400,9 @@ void gdcmDicomDir::SetElements(std::string &path,ListHeader &list)
 /*
  * \ingroup gdcmDicomDir
  * \brief   
- * @param   
+ * @param   path
+ * @param   type
+ * @param   header
  */
 void gdcmDicomDir::SetElement(std::string &path,gdcmDicomDirType type,gdcmHeader *header)
 {
index 7fecc3eb4deb9df415ccd440aa63d9ac9bcca7e1..f8aba446125120b54a680aae93cb0aa7bbf4ffb4 100644 (file)
 
 //-----------------------------------------------------------------------------
 // Constructor / Destructor
-gdcmDicomDirElement::gdcmDicomDirElement(void) 
+
+/**
+ * \ingroup gdcmDicomDirElement
+ * \brief   constructor 
+ */
+ gdcmDicomDirElement::gdcmDicomDirElement(void) 
 {
    std::string filename=gdcmDictSet::BuildDictPath() + std::string(DICT_ELEM);
    std::ifstream from(filename.c_str());
@@ -65,7 +70,11 @@ gdcmDicomDirElement::gdcmDicomDirElement(void)
    from.close();
 }
 
-gdcmDicomDirElement::~gdcmDicomDirElement() 
+/**
+ * \ingroup gdcmDicomDirElement
+ * \brief   destructor 
+ */
+ gdcmDicomDirElement::~gdcmDicomDirElement() 
 {
    MetaList.clear();
    PatientList.clear();
@@ -77,8 +86,9 @@ gdcmDicomDirElement::~gdcmDicomDirElement()
 //-----------------------------------------------------------------------------
 // Print
 /**
- * \ingroup gdcmVR
- * \brief   Print all 
+ * \ingroup gdcmDicomDirElement
+ * \brief   Print all
+ * \todo add a 'Print Level' check 
  * @param   os The output stream to be written to.
  */
 void gdcmDicomDirElement::Print(std::ostream &os) 
index e15c5ded5402c9fd9b3a8e0054f91f29f888ac68..c0fc1b2673c2d53784f771697d2141094917acc2 100644 (file)
@@ -106,7 +106,7 @@ void gdcmDict::PrintByKey(std::ostream &os) {
  * \ingroup gdcmDict
  * \brief   Print all the dictionary entries contained in this dictionary.
  *          Entries will be sorted by the name of the dictionary entries.
- * \warning AVOID USING IT : the name IS NOT an identifier
+ * \warning AVOID USING IT : the name IS NOT an identifier
  *                           unpredictable result
  * @param   os The output stream to be written to.
  */
@@ -130,7 +130,7 @@ void gdcmDict::PrintByName(std::ostream& os) {
 /**
  * \ingroup gdcmDict
  * \brief  adds a new Dicom Dictionary Entry 
- * @param   NewEntry 
+ * @param   NewEntry entry to add 
  * @return  false if Dicom Element already existed
  */
 bool gdcmDict::AddNewEntry(gdcmDictEntry *NewEntry) 
@@ -154,7 +154,7 @@ bool gdcmDict::AddNewEntry(gdcmDictEntry *NewEntry)
 /**
  * \ingroup gdcmDict
  * \brief  replaces an already existing Dicom Element by a new one
- * @param   NewEntry
+ * @param   NewEntry new entry (overwrites any previous one with same tag)
  * @return  false if Dicom Element doesn't exist
  */
 bool gdcmDict::ReplaceEntry(gdcmDictEntry *NewEntry) {
@@ -198,8 +198,7 @@ bool gdcmDict::RemoveEntry(TagKey key)
 /**
  * \ingroup gdcmDict
  * \brief  removes an already existing Dicom Dictionary Entry, 
- *          identified by its group,element
- number
+ *          identified by its group,element number
  * @param   group   Dicom group number of the Dicom Element
  * @param   element Dicom element number of the Dicom Element
  * @return  false if Dicom Dictionary Entry doesn't exist
@@ -273,7 +272,7 @@ std::list<std::string> *gdcmDict::GetDictEntryNames(void)
  *           than asking us to perform a line by line check of the dictionnary
  *           at the beginning of each year to -try to- guess the changes)
  *           Therefore : please NEVER use that fourth field :-(
- * *
+ *
  * @return  An hashtable: whose keys are the names of the groups and whose
  *          corresponding values are lists of all the dictionnary entries
  *          among that group.
index c4b30838c8de928b7392c079130243bbd6f30178..bdabafbec3e943cf05fa9fe32abaa4528e664e73 100644 (file)
@@ -13,7 +13,7 @@
  * @param   InGroup    DICOM-Group Number
  * @param   InElement  DICOM-Element Number
  * @param   InVr       Value Representatiion
- * @param   InFourth  // DO NOT use any longer
+ * @param   InFourth  // DO NOT use any longer
  *                       NOT part of the Dicom Standard
  * @param   InName    description of the element
 */
index 518eb728deebc892d337aa7d1ef36aa6d573c582..24a3eafb1d5b8594283875f561dba91339925f4d 100644 (file)
@@ -75,7 +75,7 @@ void gdcmDictSet::Print(std::ostream& os)
  * \ingroup gdcmDictSet
  * \brief   Consider all the entries of the public dicom dictionnary. 
  *          Build all list of all the tag names of all those entries.
- * \sa      gdcmDictSet::GetPubDictTagNamesByCategory
+ * \sa gdcmDictSet::GetPubDictTagNamesByCategory
  * @return  A list of all entries of the public dicom dictionnary.
  */
 std::list<std::string> *gdcmDictSet::GetPubDictEntryNames(void) 
@@ -85,23 +85,24 @@ std::list<std::string> *gdcmDictSet::GetPubDictEntryNames(void)
 
 /** 
  * \ingroup gdcmDictSet
- * \brief   Consider all the entries of the public dicom dictionnary.
- *          Build an hashtable whose keys are the names of the groups
- *          (fourth field in each line of dictionary) and whose corresponding
- *          values are lists of all the dictionnary entries among that
- *          group. Note that apparently the Dicom standard doesn't explicitely
- *          define a name (as a string) for each group.
- *          A typical usage of this method would be to enable a dynamic
- *          configuration of a Dicom file browser: the admin/user can
- *          select in the interface which Dicom tags should be displayed.
- * \warning Dicom *doesn't* define any name for any 'categorie'
+ * \brief   - Consider all the entries of the public dicom dictionnary.
+ *           Build an hashtable whose keys are the names of the groups
+ *           (fourth field in each line of dictionary) and whose corresponding
+ *           values are lists of all the dictionnary entries among that
+ *           group. Note that apparently the Dicom standard doesn't explicitely
+ *           define a name (as a string) for each group.
+ *          - A typical usage of this method would be to enable a dynamic
+ *           configuration of a Dicom file browser: the admin/user can
+ *           select in the interface which Dicom tags should be displayed.
+ * \warning 
+ *          - Dicom *doesn't* define any name for any 'categorie'
  *          (the dictionnary fourth field was formerly NIH defined
- *           - and no longer he is-
+ *           -and no longer he is-
  *           and will be removed when Dicom provides us a text file
  *           with the 'official' Dictionnary, that would be more friendly
  *           than asking us to perform a line by line check of the dictionnary
  *           at the beginning of each year to -try to- guess the changes)
- *           Therefore : please NEVER use that fourth field :-(
+ *          - Therefore : please NEVER use that fourth field :-(
  * *
  * @return  An hashtable: whose keys are the names of the groups and whose
  *          corresponding values are lists of all the dictionnary entries
index 096209fabb5c1f870b2a74a11c87a178b7565953..836041fbca94851635cd4a1271c637e1069390d1 100644 (file)
@@ -29,7 +29,7 @@ const std::string gdcmDirList::SEPARATOR = "/";
 // Constructor / Destructor
 /*
  * \ingroup gdcmDirList
- * \brief   
+ * \brief Constructor  
  * @param   
  */
 gdcmDirList::gdcmDirList(std::string dirName,bool recursive)
@@ -42,7 +42,7 @@ gdcmDirList::gdcmDirList(std::string dirName,bool recursive)
 
 /*
  * \ingroup gdcmDirList
- * \brief   
+ * \brief  Destructor
  * @param   
  */
 gdcmDirList::~gdcmDirList(void)
index aeb15c0b5760038f875af775b81204be4e0fe3e8..d1120896d15e790ea1281e14ea66e77de07a2fb6 100644 (file)
@@ -7,6 +7,12 @@
 
 //-----------------------------------------------------------------------------
 // gdcmException
+
+/*
+ * \ingroup gdcmException
+ * \brief 
+ * @param   
+ */
 gdcmException::gdcmException(const std::string &f, const std::string& msg) throw()
 #ifdef __GNUC__
   try
@@ -20,7 +26,12 @@ catch(...) {
 #endif
 
 
-void gdcmException::fatal(const char *from) throw() {
+/*
+ * \ingroup gdcmException
+ * \brief 
+ * @param   
+ */
+ void gdcmException::fatal(const char *from) throw() {
   try {
     std::cerr << "Fatal: exception received in " << from 
         << " while handling exception." << std::endl;
@@ -38,7 +49,12 @@ void gdcmException::fatal(const char *from) throw() {
   }  
 }
 
-std::string gdcmException::getName() const throw() {
+/*
+ * \ingroup gdcmException
+ * \brief 
+ * @param   
+ */
+ std::string gdcmException::getName() const throw() {
   try {
 #ifdef __GNUC__   // GNU C++ compiler class name demangling
       unsigned int nested = 1, i, nb, offset;
@@ -69,12 +85,22 @@ std::string gdcmException::getName() const throw() {
   }
 }
 
-gdcmException::operator const char *() const throw() {
+/*
+ * \ingroup gdcmException
+ * \brief 
+ * @param   
+ */
+ gdcmException::operator const char *() const throw() {
   return getName().c_str();
 }
 
 //-----------------------------------------------------------------------------
-std::ostream& operator<<(std::ostream &os, const gdcmException &e) {
+/*
+ * \ingroup gdcmException
+ * \brief 
+ * @param   
+ */
+ std::ostream& operator<<(std::ostream &os, const gdcmException &e) {
   try {  
     os << "Exception " << e.getName() << " thrown: " << e.getError() << std::endl;
   }
index a48f1a5423fed18a7a8192376a369a9fbec45d57..3193f55406b763bafb89817c03037a80b2853dce 100644 (file)
@@ -14,14 +14,12 @@ typedef std::pair<TagHeaderEntryHT::iterator,TagHeaderEntryHT::iterator> IterHT;
  *        file (see SetFileName, SetDcmTag and Write)
  *        Opens (in read only and when possible) an existing file and checks
  *        for DICOM compliance. Returns NULL on failure.
- * \Note  the in-memory representation of all available tags found in
+ * \note  the in-memory representation of all available tags found in
  *        the DICOM header is post-poned to first header information access.
  *        This avoid a double parsing of public part of the header when
  *        one sets an a posteriori shadow dictionary (efficiency can be
  *        seen as a side effect).   
- *
  * @param header file to be opened for reading datas
- *
  * @return     
  */
  
@@ -40,13 +38,12 @@ gdcmFile::gdcmFile(gdcmHeader *header) {
  *        file (see SetFileName, SetDcmTag and Write)
  *        Opens (in read only and when possible) an existing file and checks
  *        for DICOM compliance. Returns NULL on failure.
- * \Note  the in-memory representation of all available tags found in
+ * \note  the in-memory representation of all available tags found in
  *        the DICOM header is post-poned to first header information access.
  *        This avoid a double parsing of public part of the header when
  *        one sets an a posteriori shadow dictionary (efficiency can be
  *        seen as a side effect).   
  * @param filename file to be opened for parsing
- * @return     
  */
 gdcmFile::gdcmFile(std::string & filename) {
    Header=new gdcmHeader(filename.c_str());
@@ -57,7 +54,20 @@ gdcmFile::gdcmFile(std::string & filename) {
       SetPixelDataSizeFromHeader();
 }
 
-gdcmFile::gdcmFile(const char * filename) {
+/**
+ * \ingroup   gdcmFile
+ * \brief Constructor dedicated to writing a new DICOMV3 part10 compliant
+ *        file (see SetFileName, SetDcmTag and Write)
+ *        Opens (in read only and when possible) an existing file and checks
+ *        for DICOM compliance. Returns NULL on failure.
+ * \note  the in-memory representation of all available tags found in
+ *        the DICOM header is post-poned to first header information access.
+ *        This avoid a double parsing of public part of the header when
+ *        one sets an a posteriori shadow dictionary (efficiency can be
+ *        seen as a side effect).   
+ * @param filename file to be opened for parsing
+ */
+ gdcmFile::gdcmFile(const char * filename) {
    Header=new gdcmHeader(filename);
    SelfHeader=true;
    PixelRead=-1; // no ImageData read yet.
@@ -162,9 +172,9 @@ size_t gdcmFile::GetImageDataSize(void) {
 /**
  * \ingroup   gdcmFile
  * \brief     Returns the size (in bytes) of required memory to hold
- * \          the pixel data represented in this file, when user DOESN'T want 
- * \          to get RGB pixels image when it's stored as a PALETTE COLOR image
- * \          - the (vtk) user is supposed to know how deal with LUTs 
+ *            the pixel data represented in this file, when user DOESN'T want 
+ *            to get RGB pixels image when it's stored as a PALETTE COLOR image
+ *            -the (vtk) user is supposed to know how deal with LUTs
  * \warning   to be used with GetImagePixelsRaw()
  * @return    The size of pixel data in bytes.
  */
@@ -180,7 +190,7 @@ size_t gdcmFile::GetImageDataSizeRaw(void) {
  *          Transforms 3 planes R, G, B into a single RGB Plane
  *          Transforms single Grey plane + 3 Palettes into a RGB Plane
  * @return  Pointer to newly allocated pixel data.
- * \        NULL if alloc fails 
+ *          NULL if alloc fails 
  */
 void * gdcmFile::GetImageData (void) {
    PixelData = (void *) malloc(lgrTotale);
@@ -533,7 +543,7 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void* destination, size_t MaxSize) {
  * \ingroup   gdcmFile
  * \brief TODO JPR
  * \warning doit-etre etre publique ?  
- * TODO : y a-t-il un inconvenient Ã  fusioner ces 2 fonctions
+ * \toto : y a-t-il un inconvenient Ã  fusioner ces 2 fonctions
  *
  * @param inData 
  * @param ExpectedSize 
@@ -551,9 +561,7 @@ bool gdcmFile::SetImageData(void * inData, size_t ExpectedSize) {
  * \ingroup   gdcmFile
  * \brief Writes on disk A SINGLE Dicom file
  *        NO test is performed on  processor "Endiannity".
- *        Ca sera Ã  l'utilisateur d'appeler son Reader correctement
- *        (Equivalent a IdImaWriteRawFile) 
- *
+ *        It's up to the user to call his Reader properly
  * @param fileName name of the file to be created
  *                 (any already existing file is over written)
  * @return false if write fails        
@@ -575,7 +583,6 @@ bool gdcmFile::WriteRawData (std::string fileName) {
  * \ingroup   gdcmFile
  * \brief Writes on disk A SINGLE Dicom file
  *        NO test is performed on  processor "Endiannity".
- *
  * @param fileName name of the file to be created
  *                 (any already existing file is overwritten)
  * @return false if write fails        
@@ -634,7 +641,7 @@ bool gdcmFile::WriteAcr (std::string fileName) {
 /**
  * \ingroup   gdcmFile
  *
-* @param fileName name of the file to be created
+ * @param fileName name of the file to be created
  *                 (any already existing file is overwritten)
  * @param  type file type (ExplicitVR, ImplicitVR, ...)
  * @return false if write fails                
index 31bf7bc314d8f9bdaee95eb7f67ba9e4bb551d05..a35ceb8bd802012fc631e091ab0cd0324366d772 100644 (file)
@@ -14,7 +14,7 @@
 // Constructor / Destructor
 /**
  * \ingroup gdcmHeader
- * \brief   
+ * \brief  Constructor 
  * @param   InFilename
  * @param   exception_on_error
  * @param   enable_sequences = true to allow the header 
@@ -401,7 +401,7 @@ int gdcmHeader::GetPixelSize(void) {
  *          - 32S   signed 32 bit,
  *          - FD floating double 64 bits (Not kosher DICOM, but so usefull!)
  * \warning 12 bit images appear as 16 bit.
- * \        24 bit images appear as 8 bit
+ *          24 bit images appear as 8 bit
  * @return  0S if nothing found. NOT USABLE file. The caller has to check
  */
 std::string gdcmHeader::GetPixelType(void) { 
@@ -434,7 +434,7 @@ std::string gdcmHeader::GetPixelType(void) {
 /**
  * \ingroup gdcmHeader
  * \brief   Recover the offset (from the beginning of the file) 
- * \        of *image* pixels (not *icone image* pixels, if any !)
+ *          of *image* pixels (not *icone image* pixels, if any !)
  * @return Pixel Offset
  */
 size_t gdcmHeader::GetPixelOffset(void) { 
@@ -470,7 +470,7 @@ size_t gdcmHeader::GetPixelOffset(void) {
  * \brief   Recover the pixel area length (in Bytes)
  * @return Pixel Element Length, as stored in the header
  *         (NOT the memory space necessary to hold the Pixels 
- *          - in case of embeded compressed image-)
+ *          -in case of embeded compressed image-)
  *         0 : NOT USABLE file. The caller has to check.
  */
 size_t gdcmHeader::GetPixelAreaLength(void) { 
@@ -498,9 +498,9 @@ size_t gdcmHeader::GetPixelAreaLength(void) {
   * \ingroup gdcmHeader
   * \brief tells us if LUT are used
   * \warning Right now, 'Segmented xxx Palette Color Lookup Table Data'
-  * \        are NOT considered as LUT, since nobody knows
-  * \        how to deal with them
-  * \        Please warn me if you know sbdy that *does* know ... jprx
+  *          are NOT considered as LUT, since nobody knows
+  *          how to deal with them
+  *          Please warn me if you know sbdy that *does* know ... jprx
   * @return true if LUT Descriptors and LUT Tables were found 
   */
 bool gdcmHeader::HasLUT(void) {
@@ -530,9 +530,9 @@ bool gdcmHeader::HasLUT(void) {
 /**
   * \ingroup gdcmHeader
   * \brief gets the info from 0028,1101 : Lookup Table Desc-Red
-  * \           else 0
+  *             else 0
   * @return Lookup Table number of Bits , 0 by default
-  * \       when (0028,0004),Photometric Interpretation = [PALETTE COLOR ]
+  *          when (0028,0004),Photometric Interpretation = [PALETTE COLOR ]
   * @ return bit number of each LUT item 
   */
 int gdcmHeader::GetLUTNbits(void) {
@@ -557,17 +557,17 @@ int gdcmHeader::GetLUTNbits(void) {
 /**
   * \ingroup gdcmHeader
   * \brief builts Red/Green/Blue/Alpha LUT from Header
-  * \       when (0028,0004),Photometric Interpretation = [PALETTE COLOR ]
-  * \        and (0028,1101),(0028,1102),(0028,1102)  
-  * \          - xxx Palette Color Lookup Table Descriptor - are found
-  * \        and (0028,1201),(0028,1202),(0028,1202) 
-  * \          - xxx Palette Color Lookup Table Data - are found 
+  *         when (0028,0004),Photometric Interpretation = [PALETTE COLOR ]
+  *          and (0028,1101),(0028,1102),(0028,1102)  
+  *            - xxx Palette Color Lookup Table Descriptor - are found
+  *          and (0028,1201),(0028,1202),(0028,1202) 
+  *            - xxx Palette Color Lookup Table Data - are found 
   * \warning does NOT deal with :
-  * \ 0028 1100 Gray Lookup Table Descriptor (Retired)
-  * \ 0028 1221 Segmented Red Palette Color Lookup Table Data
-  * \ 0028 1222 Segmented Green Palette Color Lookup Table Data
-  * \ 0028 1223 Segmented Blue Palette Color Lookup Table Data 
-  * \ no known Dicom reader deals with them :-(
+  *   0028 1100 Gray Lookup Table Descriptor (Retired)
+  *   0028 1221 Segmented Red Palette Color Lookup Table Data
+  *   0028 1222 Segmented Green Palette Color Lookup Table Data
+  *   0028 1223 Segmented Blue Palette Color Lookup Table Data 
+  *   no known Dicom reader deals with them :-(
   * @return a RGBA Lookup Table 
   */ 
 unsigned char * gdcmHeader::GetLUTRGBA(void) {
@@ -689,7 +689,7 @@ unsigned char * gdcmHeader::GetLUTRGBA(void) {
 /**
  * \ingroup gdcmHeader
  * \brief gets the info from 0002,0010 : Transfert Syntax
- * \      else 1.
+ *        else 1.
  * @return Transfert Syntax Name (as oposite to Transfert Syntax UID)
  */
 std::string gdcmHeader::GetTransfertSyntaxName(void) { 
index a55933c0502308db78c8532a92faf5ab626e7d67..b3dd2ef2254b2a9e3aae7f5488c96686300e0973 100644 (file)
@@ -31,6 +31,10 @@ gdcmHeaderEntry::gdcmHeaderEntry(gdcmDictEntry* in) {
 
 //-----------------------------------------------------------------------------
 // Print
+/**
+ * \ingroup gdcmHeaderEntry
+ * \brief   canonical Printer
+ */
 void gdcmHeaderEntry::Print(std::ostream & os) {
    size_t o;
    unsigned short int g, e;
index 16d1157690fbea3cfd32b810b94a39fc5735500b..4317a6f8caf9694dabc8616eb8d2e52baf9cd9a4 100644 (file)
@@ -7,54 +7,6 @@
 #include <math.h>
 #include <algorithm>
 
-/*#ifdef _MSC_VER 
-   #include <windows.h> 
-
-   int GetDir(std::string dPath, std::list<std::string> &filenames)
-   {
-     //For now dPath should have an ending "\"
-     WIN32_FIND_DATA FileData; 
-     HANDLE hFile; 
-     hFile = FindFirstFile((dPath+"*").c_str(), &FileData); 
-     if ( hFile == INVALID_HANDLE_VALUE ) 
-     { 
-       //No files !
-       return false; 
-     } 
-  
-     if( strncmp(FileData.cFileName, ".", 1) != 0 )
-       filenames.push_back( dPath+FileData.cFileName );
-     while( FindNextFile(hFile, &FileData ) != 0)
-     { 
-       if( strncmp(FileData.cFileName, ".", 1) != 0 )
-         filenames.push_back( dPath+FileData.cFileName );
-     }
-     return true;
-   }
-
-#else
-   #include <dirent.h>
-
-   int GetDir(std::string dPath, std::list<std::string> &filenames)
-   {
-    DIR *dir = opendir( dPath.c_str() );
-    if (dir == NULL)
-       return false;
-    struct dirent *entry;
-    while((entry = readdir(dir)) != NULL)
-    {
-   //   if( strncmp(entry->d_name, ".", 1) != 0 && strncmp(entry->d_name, "..", 2) != 0)
-      if( strncmp(entry->d_name, ".", 1) != 0 )
-      {
-         filenames.push_back( dPath + "/" + entry->d_name );
-      }
-    }
-    closedir(dir);
-    return true;
-   }
-
-#endif*/
-
 //-----------------------------------------------------------------------------
 // gdcmHeaderHelper
 //-----------------------------------------------------------------------------
@@ -170,7 +122,7 @@ std::string gdcmHeaderHelper::GetPixelType() {
 /**
   * \ingroup gdcmHeaderHelper
   * \brief gets the info from 0028,0030 : Pixel Spacing
-  * \           else 1.
+  *             else 1.
   * @return X dimension of a pixel
   */
 float gdcmHeaderHelper::GetXSpacing() {
@@ -194,7 +146,7 @@ float gdcmHeaderHelper::GetXSpacing() {
 /**
   * \ingroup gdcmHeaderHelper
   * \brief gets the info from 0028,0030 : Pixel Spacing
-  * \           else 1.
+  *             else 1.
   * @return Y dimension of a pixel
   */
 float gdcmHeaderHelper::GetYSpacing() {
@@ -218,8 +170,8 @@ float gdcmHeaderHelper::GetYSpacing() {
 /**
   *\ingroup gdcmHeaderHelper
   *\brief gets the info from 0018,0088 : Space Between Slices
-  *\               else from 0018,0050 : Slice Thickness
-  *\               else 1.
+  *                else from 0018,0050 : Slice Thickness
+  *                else 1.
   * @return Z dimension of a voxel-to be
   */
 float gdcmHeaderHelper::GetZSpacing() {
@@ -288,8 +240,8 @@ float gdcmHeaderHelper::GetRescaleIntercept() {
 /**
   * \ingroup gdcmHeaderHelper
   * \brief This function is intended to user who doesn't want 
-  * \ to have to manage a LUT and expects to get an RBG Pixel image
-  * \ (or a monochrome one ...) 
+  *   to have to manage a LUT and expects to get an RBG Pixel image
+  *   (or a monochrome one ...) 
   * \warning to be used with GetImagePixels()
   * @return 1 if Gray level, 3 if Color (RGB, YBR or PALETTE COLOR)
   */
@@ -402,8 +354,8 @@ int gdcmHeaderHelper::GetNumberOfScalarComponentsRaw() {
 /**
   * \ingroup gdcmHeaderHelper
   * \brief gets the info from 0020,0032 : Image Position Patient
-  *\                else from 0020,0030 : Image Position (RET)
-  *\                else 0.
+  *                 else from 0020,0030 : Image Position (RET)
+  *                 else 0.
   * @return up-left image corner X position
   */
     
@@ -428,8 +380,8 @@ float gdcmHeaderHelper::GetXOrigin() {
 /**
   * \ingroup gdcmHeaderHelper
   * \brief gets the info from 0020,0032 : Image Position Patient
-  * \               else from 0020,0030 : Image Position (RET)
-  * \               else 0.
+  *                 else from 0020,0030 : Image Position (RET)
+  *                 else 0.
   * @return up-left image corner Y position
   */
 float gdcmHeaderHelper::GetYOrigin() {
index 9a2f98143eb823756b79099c77cbb143cb05cb82..651f248adbaabca7e4f91733e22ad1df4197bed1 100644 (file)
@@ -238,7 +238,6 @@ bool gdcmParser::IsReadable(void) {
  * \ingroup gdcmParser
  * \brief   Determines if the Transfer Syntax was already encountered
  *          and if it corresponds to a ImplicitVRLittleEndian one.
- *
  * @return  True when ImplicitVRLittleEndian found. False in all other cases.
  */
 bool gdcmParser::IsImplicitVRLittleEndianTransferSyntax(void) {
@@ -257,7 +256,6 @@ bool gdcmParser::IsImplicitVRLittleEndianTransferSyntax(void) {
  * \ingroup gdcmParser
  * \brief   Determines if the Transfer Syntax was already encountered
  *          and if it corresponds to a ExplicitVRLittleEndian one.
- *
  * @return  True when ExplicitVRLittleEndian found. False in all other cases.
  */
 bool gdcmParser::IsExplicitVRLittleEndianTransferSyntax(void) {
@@ -276,7 +274,6 @@ bool gdcmParser::IsExplicitVRLittleEndianTransferSyntax(void) {
  * \ingroup gdcmParser
  * \brief   Determines if the Transfer Syntax was already encountered
  *          and if it corresponds to a DeflatedExplicitVRLittleEndian one.
- *
  * @return  True when DeflatedExplicitVRLittleEndian found. False in all other cases.
  */
 bool gdcmParser::IsDeflatedExplicitVRLittleEndianTransferSyntax(void) {
@@ -295,7 +292,6 @@ bool gdcmParser::IsDeflatedExplicitVRLittleEndianTransferSyntax(void) {
  * \ingroup gdcmParser
  * \brief   Determines if the Transfer Syntax was already encountered
  *          and if it corresponds to a Explicit VR Big Endian one.
- *
  * @return  True when big endian found. False in all other cases.
  */
 bool gdcmParser::IsExplicitVRBigEndianTransferSyntax(void) {
@@ -314,7 +310,7 @@ bool gdcmParser::IsExplicitVRBigEndianTransferSyntax(void) {
  * \ingroup gdcmParser
  * \brief  returns the File Type 
  *         (ACR, ACR_LIBIDO, ExplicitVR, ImplicitVR, Unknown)
- * @return 
+ * @return the FileType code
  */
 FileType gdcmParser::GetFileType(void) {
    return(filetype);
@@ -445,7 +441,7 @@ bool gdcmParser::Write(FILE *fp, FileType type) {
  * @param   Value passed as a std::string
  * @param   Group
  * @param   Elem
- * \return  boolean
+ * \return  false only if new element creation fails
  */
 bool gdcmParser::ReplaceOrCreateByNumber(std::string Value, 
                                          guint16 Group, 
@@ -465,8 +461,8 @@ bool gdcmParser::ReplaceOrCreateByNumber(std::string Value,
  * \brief   Modifies the value of a given Header Entry (Dicom Element)
  *          if it exists; Creates it with the given value if it doesn't
  * @param   Value passed as a char*
- * @param   Group
- * @param   Elem
+ * @param Group   group of the Entry 
+ * @param Elem element of the Entry
  * \return  boolean 
  * 
  */
@@ -487,9 +483,9 @@ bool gdcmParser::ReplaceOrCreateByNumber(char* Value, guint16 Group, guint16 Ele
  * \ingroup gdcmParser
  * \brief   Set a new value if the invoked element exists
  *          Seems to be useless !!!
- * @param   Value
- * @param   Group
- * @param   Elem
+ * @param Value new element value
+ * @param Group   group of the Entry 
+ * @param Elem element of the Entry
  * \return  boolean 
  */
 bool gdcmParser::ReplaceIfExistByNumber(char* Value, guint16 Group, guint16 Elem ) 
@@ -501,10 +497,11 @@ bool gdcmParser::ReplaceIfExistByNumber(char* Value, guint16 Group, guint16 Elem
 
 //-----------------------------------------------------------------------------
 // Protected
+
 /**
  * \ingroup gdcmParser
  * \brief   Checks if a given Dicom Element exists
- * \        within the H table
+ *          within the H table
  * @param   group Group   number of the searched Dicom Element 
  * @param   element  Element number of the searched Dicom Element 
  * @return  number of occurences
@@ -629,7 +626,7 @@ bool gdcmParser::SetEntryByNumber(std::string content,
    if ( ! tagHT.count(key))
       return false;
    int l = content.length();
-   if(l%2) // Odd length are padded with a space (020H).
+   if(l%2) // Non even length are padded with a space (020H).
    {  
       l++;
       content = content + '\0';
@@ -669,20 +666,20 @@ bool gdcmParser::SetEntryByNumber(std::string content,
  *          through it's (group, element) and modifies it's length with
  *          the given value.
  * \warning Use with extreme caution.
- * @param   length new length to substitute with
- * @param   group   group of the entry to modify
- * @param   element element of the Entry to modify
+ * @param l new length to substitute with
+ * @param group   group of the Entry to modify
+ * @param element element of the Entry to modify
  * @return  1 on success, 0 otherwise.
  */
-bool gdcmParser::SetEntryLengthByNumber(guint32 length
+bool gdcmParser::SetEntryLengthByNumber(guint32 l, 
                                         guint16 group, 
                                        guint16 element) 
 {
    TagKey key = gdcmDictEntry::TranslateToKey(group, element);
    if ( ! tagHT.count(key))
       return false;
-   if (length%2) length++; // length must be even
-   ( ((tagHT.equal_range(key)).first)->second )->SetLength(length);     
+   if (l%2) l++; // length must be even
+   ( ((tagHT.equal_range(key)).first)->second )->SetLength(l);  
         
    return true ;               
 }
@@ -690,9 +687,9 @@ bool gdcmParser::SetEntryLengthByNumber(guint32 length,
 /**
  * \ingroup gdcmParser
  * \brief   Gets (from Header) the offset  of a 'non string' element value 
- * \        (LoadElementValues has already be executed)
- * @param   Group
- * @param   Elem
+ *          (LoadElementValues has already be executed)
+ * @param Group   group of the Entry 
+ * @param Elem element of the Entry
  * @return File Offset of the Element Value 
  */
 size_t gdcmParser::GetEntryOffsetByNumber(guint16 Group, guint16 Elem) 
@@ -710,9 +707,9 @@ size_t gdcmParser::GetEntryOffsetByNumber(guint16 Group, guint16 Elem)
 /**
  * \ingroup gdcmParser
  * \brief   Gets (from Header) a 'non string' element value 
- * \        (LoadElementValues has already be executed)  
- * @param   Group
- * @param   Elem
+ *          (LoadElementValues has already be executed)  
+ * @param Group   group of the Entry 
+ * @param Elem element of the Entry
  * @return Pointer to the 'non string' area
  */
 void * gdcmParser::GetEntryVoidAreaByNumber(guint16 Group, guint16 Elem) 
@@ -731,8 +728,8 @@ void * gdcmParser::GetEntryVoidAreaByNumber(guint16 Group, guint16 Elem)
  * \ingroup       gdcmParser
  * \brief         Loads (from disk) the element content 
  *                when a string is not suitable
- * @param   Group
- * @param   Elem
+ * @param Group   group of the Entry 
+ * @param Elem element of the Entry
  */
 void *gdcmParser::LoadEntryVoidArea(guint16 Group, guint16 Elem) 
 {
@@ -779,8 +776,8 @@ bool gdcmParser::SetEntryVoidAreaByNumber(void * area,
 
 /**
  * \ingroup gdcmParser
- * \brief   Update the entries with the shadow dictionary. Only odd entries are
- *          analized
+ * \brief   Update the entries with the shadow dictionary. 
+ *          Only non even entries are  analyzed       
  */
 void gdcmParser::UpdateShaEntries(void) {
    gdcmDictEntry *entry;
@@ -840,7 +837,7 @@ void gdcmParser::UpdateShaEntries(void) {
 /**
  * \ingroup gdcmParser
  * \brief  retrieves a Dicom Element (the first one) using (group, element)
- * \ warning (group, element) IS NOT an identifier inside the Dicom Header
+ * \warning (group, element) IS NOT an identifier inside the Dicom Header
  *           if you think it's NOT UNIQUE, check the count number
  *           and use iterators to retrieve ALL the Dicoms Elements within
  *           a given couple (group, element)
@@ -993,12 +990,12 @@ void gdcmParser::UpdateGroupLength(bool SkipSequence, FileType type) {
 /**
  * \ingroup gdcmParser
  * \brief   writes on disc according to the requested format
- * \        (ACR-NEMA, ExplicitVR, ImplicitVR) the image
- * \ warning does NOT add the missing elements in the header :
- * \         it's up to the user doing it !
- * \         (function CheckHeaderCoherence to be written)
- * \ warning DON'T try, right now, to write a DICOM image
- * \         from an ACR Header (meta elements will be missing!)
+ *          (ACR-NEMA, ExplicitVR, ImplicitVR) the image
+ * \warning does NOT add the missing elements in the header :
+ *           it's up to the user doing it !
+ *           (function CheckHeaderCoherence to be written)
+ * \warning DON'T try, right now, to write a DICOM image
+ *           from an ACR Header (meta elements will be missing!)
  * @param   type type of the File to be written 
  *          (ACR-NEMA, ExplicitVR, ImplicitVR)
  * @param   _fp already open file pointer
@@ -1399,8 +1396,9 @@ void gdcmParser::LoadHeaderEntry(gdcmHeaderEntry *Entry)  {
  * \brief   add a new Dicom Element pointer to 
  *          the H Table and to the chained List
  * \warning push_bash in listEntries ONLY during ParseHeader
- * \TODO    something to allow further Elements addition,
- * \        when position to be taken care of     
+ * \todo    something to allow further Elements addition,
+ *          (at their right place in the chained list)
+ *          when position to be taken care of     
  * @param   newHeaderEntry
  */
 void gdcmParser::AddHeaderEntry(gdcmHeaderEntry *newHeaderEntry) {
@@ -1413,7 +1411,6 @@ void gdcmParser::AddHeaderEntry(gdcmHeaderEntry *newHeaderEntry) {
  * \ingroup gdcmParser
  * \brief   
  * @param   Entry Header Entry whose length of the value shall be loaded. 
-
  * @return 
  */
  void gdcmParser::FindHeaderEntryLength (gdcmHeaderEntry *Entry) {
@@ -1571,8 +1568,8 @@ void gdcmParser::FindHeaderEntryVR( gdcmHeaderEntry *Entry)
  * \brief     Check the correspondance between the VR of the header entry
  *            and the taken VR. If they are different, the header entry is 
  *            updated with the new VR.
- * @param     Entry
- * @param     vr
+ * @param     Entry Header Entry to check
+ * @param     vr    Dicom Value Representation
  * @return    false if the VR is incorrect of if the VR isn't referenced
  *            otherwise, it returns true
 */
@@ -1881,7 +1878,7 @@ bool gdcmParser::IsHeaderEntryAnInteger(gdcmHeaderEntry *Entry) {
 /**
  * \ingroup gdcmParser
  * \brief   
- *
+ * \warning NOT end user intended method !
  * @return 
  */
  guint32 gdcmParser::FindHeaderEntryLengthOB(void)  {
@@ -1932,8 +1929,7 @@ bool gdcmParser::IsHeaderEntryAnInteger(gdcmHeaderEntry *Entry) {
 /**
  * \ingroup gdcmParser
  * \brief Reads a supposed to be 16 Bits integer
- * \     (swaps it depending on processor endianity) 
- *
+ *       (swaps it depending on processor endianity) 
  * @return read value
  */
 guint16 gdcmParser::ReadInt16(void) {
@@ -1954,8 +1950,7 @@ guint16 gdcmParser::ReadInt16(void) {
 /**
  * \ingroup gdcmParser
  * \brief  Reads a supposed to be 32 Bits integer
- * \       (swaps it depending on processor endianity)  
- *
+ *         (swaps it depending on processor endianity)  
  * @return read value
  */
 guint32 gdcmParser::ReadInt32(void) {
@@ -1976,7 +1971,7 @@ guint32 gdcmParser::ReadInt32(void) {
 /**
  * \ingroup gdcmParser
  * \brief   
- *
+ * \warning NOT end user intended method !
  * @return 
  */
 void gdcmParser::SkipBytes(guint32 NBytes) {
@@ -2208,7 +2203,7 @@ void gdcmParser::SwitchSwapToBigEndian(void)
 
 /**
  * \ingroup gdcmParser
- * \brief   
+ * \brief  during parsing, Header Elements too long are not loaded in memory 
  * @param NewSize
  */
 void gdcmParser::SetMaxSizeLoadEntry(long NewSize) 
@@ -2226,8 +2221,9 @@ void gdcmParser::SetMaxSizeLoadEntry(long NewSize)
 
 /**
  * \ingroup gdcmParser
- * \brief
- * \warning TODO : not yet usable 
+ * \brief Header Elements too long will not be printed
+ * \warning 
+ * \todo : not yet usable 
  *          (see MAX_SIZE_PRINT_ELEMENT_VALUE 
  *           in gdcmHeaderEntry gdcmLoadEntry)
  *             
@@ -2373,7 +2369,7 @@ gdcmHeaderEntry *gdcmParser::NewHeaderEntryByName(std::string Name)
  * \ingroup gdcmParser
  * \brief   Request a new virtual dict entry to the dict set
  * @param   group  group   of the underlying DictEntry
- * @param   elem   element of the underlying DictEntry
+ * @param   element  element of the underlying DictEntry
  * @param   vr     VR of the underlying DictEntry
  * @param   fourth owner group
  * @param   name   english name