]> Creatis software - gdcm.git/commitdiff
doxygenation improvement
authorjpr <jpr>
Tue, 13 Jan 2004 16:46:55 +0000 (16:46 +0000)
committerjpr <jpr>
Tue, 13 Jan 2004 16:46:55 +0000 (16:46 +0000)
src/gdcmDictEntry.cxx
src/gdcmElValSet.cxx
src/gdcmFile.h
src/gdcmHeader.cxx
src/gdcmHeader.h
src/gdcmParse.cxx

index 7ad40bee7d9924c336d74836b6a5c0bfc8498598..ee04a0c62a7f3a036df8394e5b2defb9da9787d1 100644 (file)
@@ -39,7 +39,7 @@ gdcmDictEntry::gdcmDictEntry(guint16 InGroup, guint16 InElement,
  * \brief   concatenates 2 guint16 (supposed to be a Dicom group number 
  *                                             and a Dicom element number)
  * @param  group the Dicom group   number used to build the tag
- * @param  group the Dicom element number used to build the tag
+ * @param  element the Dicom element number used to build the tag
  * return the built tag
  */
 
index fb99ba162ba520f64605026592c75f082f6eca78..58f87458f76eb3d659c0d861eedd98d5d700eeae 100644 (file)
@@ -42,7 +42,10 @@ void gdcmElValSet::Print(std::ostream & os) {
    TSKey v;
    std::string d2;
    gdcmTS * ts = gdcmGlobal::GetTS();
+
    std::ostringstream s;
+
+   s << "------------- using tagHt ---------------------" << std::endl; 
    
    // Tag HT
    s << "------------- using tagHt ---------------------" << std::endl; 
@@ -80,7 +83,9 @@ void gdcmElValSet::Print(std::ostream & os) {
    guint32 lgth;
    char greltag[10];  //group element tag
    
+
    s << "------------ using listElem -------------------" << std::endl; 
+
    for (ListTag::iterator i = listElem.begin();  
           i != listElem.end();
           ++i){
@@ -144,8 +149,8 @@ void gdcmElValSet::Add(gdcmElValue * newElValue) {
  *           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)
- * @param   group Group   number of the searched Dicom Element 
- * @param   elem  Element number of the searched Dicom Element 
+ * @param   group Group number of the searched Dicom Element 
+ * @param   element Element number of the searched Dicom Element 
  * @return  
  */
 gdcmElValue* gdcmElValSet::GetElementByNumber(guint16 group, guint16 element) {
@@ -158,8 +163,8 @@ gdcmElValue* gdcmElValSet::GetElementByNumber(guint16 group, guint16 element) {
 /**
  * \ingroup gdcmElValSet
  * \brief  Gets the value (string) of the target Dicom Element
- * @param   group Group   number of the searched Dicom Element 
- * @param   elem  Element number of the searched Dicom Element 
+ * @param   group Group  number of the searched Dicom Element 
+ * @param   element Element number of the searched Dicom Element 
  * @return  
  */
 std::string gdcmElValSet::GetElValueByNumber(guint16 group, guint16 element) {
@@ -173,8 +178,8 @@ std::string gdcmElValSet::GetElValueByNumber(guint16 group, guint16 element) {
  * \ingroup gdcmElValSet
  * \brief  Sets the value (string) of the target Dicom Element
  * @param   content string value of the Dicom Element
- * @param   group Group   number of the searched Dicom Element 
- * @param   elem  Element number of the searched Dicom Element 
+ * @param   group Group number of the searched Dicom Element 
+ * @param   element Element number of the searched Dicom Element 
  * @return  
  */
 bool gdcmElValSet::SetElValueByNumber(std::string content,
@@ -222,8 +227,8 @@ bool gdcmElValSet::SetElValueByNumber(std::string content,
  * \brief   Sets the value length of the Dicom Element
  * \warning : use with caution !
  * @param   length
- * @param   group Group   number of the searched Dicom Element 
- * @param   elem  Element number of the searched Dicom Element 
+ * @param   group Group number of the searched Dicom Element 
+ * @param   element Element number of the searched Dicom Element 
  * @return  boolean
  */
 bool gdcmElValSet::SetElValueLengthByNumber(guint32 length,
@@ -237,13 +242,12 @@ bool gdcmElValSet::SetElValueLengthByNumber(guint32 length,
         
    return true ;               
 }
-
 /**
  * \ingroup gdcmElValSet
  * \brief   Sets a 'non string' value to a given Dicom Element
  * @param   area
- * @param   group Group   number of the searched Dicom Element 
- * @param   elem  Element number of the searched Dicom Element 
+ * @param   group Group number of the searched Dicom Element 
+ * @param   element Element number of the searched Dicom Element 
  * @return  
  */
 bool gdcmElValSet::SetVoidAreaByNumber(void * area,
@@ -276,12 +280,12 @@ guint32 gdcmElValSet::GenerateFreeTagKeyInGroup(guint16 group) {
  * \ingroup gdcmElValSet
  * \brief   Checks if a given Dicom Element exists
  * \        within the H table
- * @param   Group Group   number of the searched Dicom Element 
- * @param   Elem  Element number of the searched Dicom Element 
+ * @param   group Group   number of the searched Dicom Element 
+ * @param   element  Element number of the searched Dicom Element 
  * @return  number of occurences
  */
-int gdcmElValSet::CheckIfExistByNumber(guint16 Group, guint16 Elem ) {
-       std::string key = gdcmDictEntry::TranslateToKey(Group, Elem );
+int gdcmElValSet::CheckIfExistByNumber(guint16 group, guint16 element ) {
+       std::string key = gdcmDictEntry::TranslateToKey(group, element );
        return (tagHt.count(key));
 }
 
index 6773662c46f08f9d47ec7a75682d508d63239b9d..dcf6f7046c794bede47eda7107b1bb39747efcb2 100644 (file)
@@ -57,19 +57,19 @@ public:
        // TODO Swig int Write();
        
    // Write pixels of ONE image on hard drive
-   // No test is made on processor "stupidity"
+   // No test is made on processor "endianity"
    // The user must call his reader correctly
    bool WriteRawData  (std::string fileName);
    bool WriteDcmImplVR(std::string fileName);
    bool WriteDcmImplVR(const char * fileName);
    bool WriteDcmExplVR(std::string fileName);
    bool WriteAcr      (std::string fileName);
-   
-protected:
-   bool WriteBase(std::string FileName, FileType type);
-
    // Body in file gdcmParse.cxx
    bool ParsePixelData(void);
+     
+protected:
+   bool WriteBase(std::string FileName, FileType type);
 
 private:
    void SwapZone(void* im, int swap, int lgr, int nb);
index cbe330c01823c36c7d54dbd8e49483dcf1e4b990..a8966f1512a7e57e6a2cf2dda41b2e15ae199947 100644 (file)
@@ -82,6 +82,7 @@ gdcmHeader::~gdcmHeader (void) {
 
 //-----------------------------------------------------------------------------
 // Print
+
 /**
   * \ingroup gdcmHeader
   * \brief
@@ -102,6 +103,7 @@ void gdcmHeader::PrintPubDict(std::ostream & os) {
 
 //-----------------------------------------------------------------------------
 // Public
+
 /**
  * \ingroup gdcmHeader
  * \brief  This predicate, based on hopefully reasonable heuristics,
@@ -795,7 +797,7 @@ std::string gdcmHeader::GetTransfertSyntaxName(void) {
    // use the gdcmTS (TS : Transfert Syntax)
    std::string TransfertSyntax = GetPubElValByNumber(0x0002,0x0010);
    if (TransfertSyntax == GDCM_UNFOUND) {
-      dbg.Verbose(0, "gdcmHeader::GetTransferSyntaxName: unfound Transfert Syntax (0002,0010)");
+      dbg.Verbose(0, "gdcmHeader::GetTransfertSyntaxName: unfound Transfert Syntax (0002,0010)");
       return "Uncompressed ACR-NEMA";
    }
    // we do it only when we need it
@@ -1439,6 +1441,7 @@ void gdcmHeader::LoadElements(void) {
  * \brief         Loads the element content if it's length is not bigger
  *                than the value specified with
  *                gdcmHeader::SetMaxSizeLoadElementValue()
+ * @param        ElVal string value of the Dicom Element
  */
 void gdcmHeader::LoadElementValue(gdcmElValue * ElVal) {
    size_t item_read;
@@ -1449,14 +1452,6 @@ void gdcmHeader::LoadElementValue(gdcmElValue * ElVal) {
 
    fseek(fp, (long)ElVal->GetOffset(), SEEK_SET);
    
-   // FIXME Sequences not treated yet !
-   //
-   // Ne faudrait-il pas au contraire trouver immediatement
-   // une maniere 'propre' de traiter les sequences (vr = SQ)
-   // car commencer par les ignorer risque de conduire a qq chose
-   // qui pourrait ne pas etre generalisable
-   // Well, I'm expecting your code !!!
-   
    // the test was commented out to 'go inside' the SeQuences
    // we don't any longer skip them !
     
index 23df5390bcb490ef551b0b348857ff45140db0f5..31d98776b929abe4033de7fd48f3c91a99a602f5 100644 (file)
@@ -135,10 +135,15 @@ public:
    inline int GetSwapCode(void) { return sw; }
    guint16 SwapShort(guint16); // needed by gdcmFile
    guint32 SwapLong(guint32);  // for JPEG Files
+   
+   // was protected
+   bool ReplaceOrCreateByNumber(std::string Value, guint16 Group, guint16 Elem); 
+   bool ReplaceOrCreateByNumber(     char * Value, guint16 Group, guint16 Elem);                                
+   bool ReplaceIfExistByNumber (     char * Value, guint16 Group, guint16 Elem);
 
 protected:
-   gdcmElValue * GetElValueByNumber(guint16 group, guint16 element);
    bool CheckIfExistByNumber(guint16 Group, guint16 Elem );
+   gdcmElValue * GetElValueByNumber(guint16 group, guint16 element); 
 
    int write(std::ostream&);   
    int anonymize(std::ostream&);  // FIXME : anonymize should be a friend ?
@@ -147,9 +152,6 @@ protected:
    void * GetPubElValVoidAreaByNumber(guint16 Group, guint16 Elem);   
    void * LoadElementVoidArea        (guint16 Group, guint16 Element);
 
-   bool ReplaceOrCreateByNumber(std::string Value, guint16 Group, guint16 Elem); 
-   bool ReplaceOrCreateByNumber(     char * Value, guint16 Group, guint16 Elem);                                
-   bool ReplaceIfExistByNumber (     char * Value, guint16 Group, guint16 Elem);
 
 // Variables
    FILE * fp;
index 57a09dacbd2fa9e2d7f14e2159be84918cfdf6d8..b79efb72e69f6aa49950e31612b447f1d3d16b09 100644 (file)
@@ -29,7 +29,7 @@
  */
 bool gdcmFile::ParsePixelData(void) {
 // DO NOT remove the printf s.
-// The ONLY purpose of this methos is to PRINT the content
+// The ONLY purpose of this method is to PRINT the content
    FILE *fp;
 
    if ( !(fp=Header->OpenFile()))