]> Creatis software - gdcm.git/blobdiff - src/gdcmSQItem.cxx
Deal with NOSHADOWSEQ option
[gdcm.git] / src / gdcmSQItem.cxx
index 1b46a482946cdb1a6ae49a1c2f78d21b90d7270c..0a20785df97b2bc574e6c98d98b961f840404e0f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/04 14:49:01 $
-  Version:   $Revision: 1.67 $
+  Date:      $Date: 2005/07/03 12:47:23 $
+  Version:   $Revision: 1.72 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -147,15 +147,15 @@ bool SQItem::RemoveEntry( DocEntry *entryToRemove )
                               it != DocEntries.end();
                             ++it)
    {
-      if( *it == entryToRemove )
+      if ( *it == entryToRemove )
       {
          DocEntries.erase(it);
-         gdcmVerboseMacro( "One element erased: " << entryToRemove->GetKey() );
+         gdcmWarningMacro( "One element erased: " << entryToRemove->GetKey() );
          delete entryToRemove;
          return true;
       }
    }
-   gdcmVerboseMacro( "Entry not found: " << entryToRemove->GetKey() );
+   gdcmWarningMacro( "Entry not found: " << entryToRemove->GetKey() );
    return false ;
 }
 
@@ -170,16 +170,16 @@ bool SQItem::RemoveEntryNoDestroy(DocEntry *entryToRemove)
                               it != DocEntries.end();
                             ++it)
    {
-      if( *it == entryToRemove )
+      if ( *it == entryToRemove )
       {
          DocEntries.erase(it);
-         gdcmVerboseMacro( "One element erased, no destroyed: "
+         gdcmWarningMacro( "One element removed, no destroyed: "
                             << entryToRemove->GetKey() );
          return true;
       }
    }
                                                                                 
-   gdcmVerboseMacro( "Entry not found:" << entryToRemove->GetKey() );
+   gdcmWarningMacro( "Entry not found:" << entryToRemove->GetKey() );
    return false ;
 }
                                                                                 
@@ -204,7 +204,7 @@ void SQItem::ClearEntry()
 DocEntry *SQItem::GetFirstEntry()
 {
    ItDocEntries = DocEntries.begin();
-   if( ItDocEntries != DocEntries.end() )
+   if ( ItDocEntries != DocEntries.end() )
       return *ItDocEntries;
    return 0;   
 }
@@ -216,47 +216,11 @@ DocEntry *SQItem::GetFirstEntry()
 DocEntry *SQItem::GetNextEntry()
 {
    ++ItDocEntries;
-   if( ItDocEntries != DocEntries.end() )
+   if ( ItDocEntries != DocEntries.end() )
       return  *ItDocEntries;
    return NULL;
 }
 
-/**
- * \brief   Get the first ValEntry while visiting theSQItem
- *              This method is designed for Python users
- * \return  The first ValEntry if found, otherwhise NULL
- */
-ValEntry *SQItem::GetFirstValEntry()
-{
-   gdcm::ValEntry *valEntry;
-   gdcm::DocEntry *d = GetFirstEntry();
-   // an other iterator is needed to allow user iterate 
-   // at the same time both on DocEntries and ValEntries 
-   ItValEntries = ItDocEntries;
-   if ( valEntry = dynamic_cast<gdcm::ValEntry*>(d))
-      return valEntry;
-   return  GetNextValEntry();
-}
-                                                                                
-/**
- * \brief   Get the next ValEntry while visiting the SQItem
- * \return  The next ValEntry if found, otherwhise NULL
- */
-ValEntry *SQItem::GetNextValEntry()
-{
-   gdcm::ValEntry *valEntry;
-   gdcm::DocEntry *d = *ItValEntries;
-   ++ItValEntries; 
-   while( d )
-   {
-      if ( valEntry = dynamic_cast<gdcm::ValEntry*>(d))
-         return valEntry;
-      else
-     return GetNextValEntry(); 
-   }
-   return 0;
-}
-
 /**
  * \brief   Gets a Dicom Element inside a SQ Item Entry
  * @param   group   Group number of the Entry