]> Creatis software - gdcm.git/commitdiff
Comment out the time consuming, never used/useless
authorjpr <jpr>
Thu, 7 Jul 2005 13:55:39 +0000 (13:55 +0000)
committerjpr <jpr>
Thu, 7 Jul 2005 13:55:39 +0000 (13:55 +0000)
'Extended tag' stuff for Sequence embedded Entries

src/gdcmDocument.cxx
src/gdcmSQItem.h

index 6bf0b28121803837925df0f63985cd1e33e17869..0c4507338b017a15dcef0edde0f0c0f42f1a7bb7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/07/07 13:11:38 $
-  Version:   $Revision: 1.260 $
+  Date:      $Date: 2005/07/07 13:55:39 $
+  Version:   $Revision: 1.261 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -108,15 +108,15 @@ bool Document::Load( std::string const &fileName )
 {
    if ( IsDocumentAlreadyLoaded )
    {
-  /* 
-      if ( Filename == fileName )
-      {
-         gdcmWarningMacro( "The file was already parsed inside this "
-                        << "gdcm::Document (its name is: "
-                        << Filename.c_str() );
-         return true;
-      }
-  */
+ // time waste hunting
//     if ( Filename == fileName )
//     {
//        gdcmWarningMacro( "The file was already parsed inside this "
//                       << "gdcm::Document (its name is: "
//                       << Filename.c_str() );
//        return true;
//     }
+  
       gdcmWarningMacro( "A file was already parsed inside this "
                         << "gdcm::Document (previous name was: "
                         << Filename.c_str() << ". New name is :"
@@ -926,12 +926,14 @@ void Document::ParseDES(DocEntrySet *set, long offset,
             // but when "this" is a SQItem, we are inserting this new
             // valEntry in a sequence item, and the key has the
             // generalized form (refer to \ref BaseTagKey):
-            if (SQItem *parentSQItem = dynamic_cast< SQItem* > ( set ) )
-            {
-               newBinEntry->SetKey(  parentSQItem->GetBaseTagKey()
-                                   + newBinEntry->GetKey() );
-            }
 
+            // time waste hunting
+            //if (SQItem *parentSQItem = dynamic_cast< SQItem* > ( set ) )
+            //{
+            //   newBinEntry->SetKey(  parentSQItem->GetBaseTagKey()
+            //                       + newBinEntry->GetKey() );
+            //}
+           
             if ( !set->AddEntry( newBinEntry ) )
             {
                gdcmWarningMacro( "in ParseDES : cannot add a BinEntry "
@@ -957,11 +959,13 @@ void Document::ParseDES(DocEntrySet *set, long offset,
             // ...but when "set" is a SQItem, we are inserting this new
             // valEntry in a sequence item. Hence the key has the
             // generalized form (refer to \ref BaseTagKey):
-            if (SQItem *parentSQItem = dynamic_cast< SQItem* > ( set ) )
-            {
-               newValEntry->SetKey(  parentSQItem->GetBaseTagKey()
-                                   + newValEntry->GetKey() );
-            }
+
+            // time waste hunting
+            //if (SQItem *parentSQItem = dynamic_cast< SQItem* > ( set ) )
+            //{
+            //   newValEntry->SetKey(  parentSQItem->GetBaseTagKey()
+            //                      + newValEntry->GetKey() );
+            //}
 
             if ( LoadMode & NO_SHADOW ) // User asked to skip, if possible, 
                                         // shadow groups ( if possible :
@@ -1062,11 +1066,14 @@ void Document::ParseDES(DocEntrySet *set, long offset,
          // But when "set" is already a SQItem, we are building a nested
          // sequence, and hence the depth level of the new SeqEntry
          // we are building, is one level deeper:
+
+         // time waste hunting
          if (SQItem *parentSQItem = dynamic_cast< SQItem* > ( set ) )
          {
             newSeqEntry->SetDepthLevel( parentSQItem->GetDepthLevel() + 1 );
-            newSeqEntry->SetKey(  parentSQItem->GetBaseTagKey()
-                                + newSeqEntry->GetKey() );
+
+          //  newSeqEntry->SetKey(  parentSQItem->GetBaseTagKey()
+          //                      + newSeqEntry->GetKey() );
          }
 
          if ( l != 0 )
@@ -1132,12 +1139,14 @@ void Document::ParseSQ( SeqEntry *seqEntry,
       }
       // create the current SQItem
       SQItem *itemSQ = new SQItem( seqEntry->GetDepthLevel() );
+/*
       std::ostringstream newBase;
       newBase << seqEntry->GetKey()
               << "/"
               << SQItemNumber
               << "#";
       itemSQ->SetBaseTagKey( newBase.str() );
+*/
       unsigned int l = newDocEntry->GetReadLength();
       
       if ( l == 0xffffffff )
index ef24fa2843dddaa1fbda237288f32dd078b7e986..4874a218e99e31e4746bdb6001f71992e6570ce1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.h,v $
   Language:  C++
-  Date:      $Date: 2005/02/07 08:48:18 $
-  Version:   $Revision: 1.41 $
+  Date:      $Date: 2005/07/07 13:55:39 $
+  Version:   $Revision: 1.42 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -70,11 +70,11 @@ public:
    ///  \brief Accessor on \ref SQDepthLevel.
    void SetDepthLevel(int depth) { SQDepthLevel = depth; }
 
-   ///  \brief Accessor on \ref BaseTagKey.
-   void SetBaseTagKey( BaseTagKey const &key ) { BaseTagKeyNested = key; }
-
-   ///  \brief Accessor on \ref BaseTagKey.
-   BaseTagKey const &GetBaseTagKey() const { return BaseTagKeyNested; }
+   // waste time hunting
+   // /  \brief Accessor on \ref BaseTagKey.
+   //void SetBaseTagKey( BaseTagKey const &key ) { BaseTagKeyNested = key; }
+   // /  \brief Accessor on \ref BaseTagKey.
+   //BaseTagKey const &GetBaseTagKey() const { return BaseTagKeyNested; }
 
 protected:
 // Variables that need to be accessed in subclasses
@@ -93,9 +93,10 @@ private:
    ///        (see \ref Print).
    int SQDepthLevel;
 
-   /// \brief A TagKey of a DocEntry nested in a sequence is prepended
-   ///        with this BaseTagKey.
-   BaseTagKey BaseTagKeyNested;
+   // waste time hunting
+   // / \brief A TagKey of a DocEntry nested in a sequence is prepended
+   // /        with this BaseTagKey.
+   //BaseTagKey BaseTagKeyNested;
 
    /// \brief SQ Item ordinal number 
    int SQItemNumber;