]> Creatis software - gdcm.git/commitdiff
* Reorder file content
authorregrain <regrain>
Wed, 2 Feb 2005 14:52:22 +0000 (14:52 +0000)
committerregrain <regrain>
Wed, 2 Feb 2005 14:52:22 +0000 (14:52 +0000)
   -- BeNours

src/gdcmDebug.cxx
src/gdcmDicomDir.cxx
src/gdcmDicomDir.h
src/gdcmDicomDirPatient.h
src/gdcmDicomDirSerie.h
src/gdcmDicomDirStudy.h

index 3e9ca4e2797183ffa7284b210725365f4c7c5d74..a075700c062eff9c44ee2460b079eb54d943336e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDebug.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 10:02:16 $
-  Version:   $Revision: 1.22 $
+  Date:      $Date: 2005/02/02 14:52:22 $
+  Version:   $Revision: 1.23 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -40,10 +40,6 @@ Debug::~Debug()
       DebugFile.close();     
 }
 
-//-----------------------------------------------------------------------------
-// Print
-
-
 //-----------------------------------------------------------------------------
 // Public
 /**
@@ -112,6 +108,7 @@ std::ofstream &Debug::GetDebugFile ()
 // Private
    
 //-----------------------------------------------------------------------------
-} // end namespace gdcm
-
+// Print
 
+//-----------------------------------------------------------------------------
+} // end namespace gdcm
index 1c205cb948b077e5556ed7f7147b6b8caa18273b..769ce05901da1ceb26b72674f8383b3a45a78d18 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 10:02:16 $
-  Version:   $Revision: 1.126 $
+  Date:      $Date: 2005/02/02 14:52:24 $
+  Version:   $Revision: 1.127 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -183,6 +183,91 @@ bool DicomDir::IsReadable()
    return true;
 }
 
+/**
+ * \brief   adds *the* Meta to a partially created DICOMDIR
+ */  
+DicomDirMeta *DicomDir::NewMeta()
+{
+   if( MetaElems )
+      delete MetaElems;
+
+   DocEntry *entry = GetFirstEntry();
+   if( entry )
+   { 
+      MetaElems = new DicomDirMeta(true);
+
+      entry = GetFirstEntry();
+      while( entry )
+      {
+         if( dynamic_cast<SeqEntry *>(entry) )
+            break;
+
+         RemoveEntryNoDestroy(entry);
+         MetaElems->AddEntry(entry);
+
+         entry = GetFirstEntry();
+      }
+   }
+   else  // after root directory parsing
+   {
+      MetaElems = new DicomDirMeta(false);
+   }
+   MetaElems->SetSQItemNumber(0); // To avoid further missprinting
+   return MetaElems;  
+}
+
+/**
+ * \brief   adds a new Patient (with the basic elements) to a partially created
+ *          DICOMDIR
+ */
+DicomDirPatient *DicomDir::NewPatient()
+{
+   DicomDirPatient *p = new DicomDirPatient();
+   AddPatientToEnd( p );
+   return p;
+}
+
+/**
+ * \brief   Remove all Patients
+ */
+void DicomDir::ClearPatient()
+{
+   for(ListDicomDirPatient::iterator cc = Patients.begin();
+                                     cc!= Patients.end();
+                                   ++cc)
+   {
+      delete *cc;
+   }
+   Patients.clear();
+}
+
+/**
+ * \brief   Get the first entry while visiting the DicomDirPatients
+ * \return  The first DicomDirPatient if found, otherwhise NULL
+ */ 
+DicomDirPatient *DicomDir::GetFirstPatient()
+{
+   ItPatient = Patients.begin();
+   if ( ItPatient != Patients.end() )
+      return *ItPatient;
+   return NULL;
+}
+
+/**
+ * \brief   Get the next entry while visiting the DicomDirPatients
+ * \note : meaningfull only if GetFirstEntry already called
+ * \return  The next DicomDirPatient if found, otherwhise NULL
+ */
+DicomDirPatient *DicomDir::GetNextPatient()
+{
+   gdcmAssertMacro (ItPatient != Patients.end());
+
+   ++ItPatient;
+   if ( ItPatient != Patients.end() )
+      return *ItPatient;
+   return NULL;
+}
+
 /**
  * \brief  fills the whole structure, starting from a root Directory
  */
@@ -213,17 +298,6 @@ void DicomDir::SetStartMethod( DicomDir::Method *method, void *arg,
    StartMethodArgDelete = argDelete;
 }
 
-/**
- * \brief   Set the method to delete the argument
- *          The argument is destroyed when the method is changed or when the
- *          class is destroyed
- * @param   method Method to call to delete the argument
- */
-void DicomDir::SetStartMethodArgDelete( DicomDir::Method *method ) 
-{
-   StartMethodArgDelete = method;
-}
-
 /**
  * \brief   Set the progress method to call when the parsing of the
  *          directory progress
@@ -245,17 +319,6 @@ void DicomDir::SetProgressMethod( DicomDir::Method *method, void *arg,
    ProgressMethodArgDelete = argDelete;
 }
 
-/**
- * \brief   Set the method to delete the argument
- *          The argument is destroyed when the method is changed or when the 
- *          class is destroyed          
- * @param   method Method to call to delete the argument
- */
-void DicomDir::SetProgressMethodArgDelete( DicomDir::Method *method )
-{
-   ProgressMethodArgDelete = method;
-}
-
 /**
  * \brief   Set the end method to call when the parsing of the directory ends
  * @param   method Method to call
@@ -278,40 +341,35 @@ void DicomDir::SetEndMethod( DicomDir::Method *method, void *arg,
 
 /**
  * \brief   Set the method to delete the argument
- *          The argument is destroyed when the method is changed or when
- *          the class is destroyed
+ *          The argument is destroyed when the method is changed or when the
+ *          class is destroyed
  * @param   method Method to call to delete the argument
  */
-void DicomDir::SetEndMethodArgDelete( DicomDir::Method *method )
+void DicomDir::SetStartMethodArgDelete( DicomDir::Method *method ) 
 {
-   EndMethodArgDelete = method;
+   StartMethodArgDelete = method;
 }
 
 /**
- * \brief   Get the first entry while visiting the DicomDirPatients
- * \return  The first DicomDirPatient if found, otherwhise NULL
- */ 
-DicomDirPatient *DicomDir::GetFirstPatient()
+ * \brief   Set the method to delete the argument
+ *          The argument is destroyed when the method is changed or when the 
+ *          class is destroyed          
+ * @param   method Method to call to delete the argument
+ */
+void DicomDir::SetProgressMethodArgDelete( DicomDir::Method *method )
 {
-   ItPatient = Patients.begin();
-   if ( ItPatient != Patients.end() )
-      return *ItPatient;
-   return NULL;
+   ProgressMethodArgDelete = method;
 }
 
 /**
- * \brief   Get the next entry while visiting the DicomDirPatients
- * \note : meaningfull only if GetFirstEntry already called
- * \return  The next DicomDirPatient if found, otherwhise NULL
+ * \brief   Set the method to delete the argument
+ *          The argument is destroyed when the method is changed or when
+ *          the class is destroyed
+ * @param   method Method to call to delete the argument
  */
-DicomDirPatient *DicomDir::GetNextPatient()
+void DicomDir::SetEndMethodArgDelete( DicomDir::Method *method )
 {
-   gdcmAssertMacro (ItPatient != Patients.end());
-
-   ++ItPatient;
-   if ( ItPatient != Patients.end() )
-      return *ItPatient;
-   return NULL;
+   EndMethodArgDelete = method;
 }
 
 /**
@@ -434,206 +492,6 @@ void DicomDir::CreateDicomDirChainedList(std::string const &path)
    }
 }
 
-/**
- * \brief   adds *the* Meta to a partially created DICOMDIR
- */  
-DicomDirMeta *DicomDir::NewMeta()
-{
-   if( MetaElems )
-      delete MetaElems;
-
-   DocEntry *entry = GetFirstEntry();
-   if( entry )
-   { 
-      MetaElems = new DicomDirMeta(true);
-
-      entry = GetFirstEntry();
-      while( entry )
-      {
-         if( dynamic_cast<SeqEntry *>(entry) )
-            break;
-
-         RemoveEntryNoDestroy(entry);
-         MetaElems->AddEntry(entry);
-
-         entry = GetFirstEntry();
-      }
-   }
-   else  // after root directory parsing
-   {
-      MetaElems = new DicomDirMeta(false);
-   }
-   MetaElems->SetSQItemNumber(0); // To avoid further missprinting
-   return MetaElems;  
-}
-
-/**
- * \brief   adds a new Patient (with the basic elements) to a partially created
- *          DICOMDIR
- */
-DicomDirPatient *DicomDir::NewPatient()
-{
-   DicomDirPatient *p = new DicomDirPatient();
-   AddPatientToEnd( p );
-   return p;
-}
-
-/**
- * \brief   Remove all Patients
- */
-void DicomDir::ClearPatient()
-{
-   for(ListDicomDirPatient::iterator cc = Patients.begin();
-                                     cc!= Patients.end();
-                                   ++cc)
-   {
-      delete *cc;
-   }
-   Patients.clear();
-}
-
-/**
- * \brief   adds to the HTable 
- *          the Entries (Dicom Elements) corresponding to the given type
- * @param   path full path file name (only used when type = GDCM_DICOMDIR_IMAGE
- * @param   type DicomDirObject type to create (GDCM_DICOMDIR_PATIENT,
- *          GDCM_DICOMDIR_STUDY, GDCM_DICOMDIR_SERIE ...)
- * @param   header Header of the current file
- */
-void DicomDir::SetElement(std::string const &path, DicomDirType type,
-                          Document *header)
-{
-   ListDicomDirElem elemList; //FIXME this is going to be a by copy operation
-   ListDicomDirElem::const_iterator it;
-   uint16_t tmpGr, tmpEl;
-   DictEntry *dictEntry;
-   ValEntry *entry;
-   std::string val;
-   SQItem *si;
-
-   switch( type )
-   {
-      case GDCM_DICOMDIR_IMAGE:
-         elemList = Global::GetDicomDirElements()->GetDicomDirImageElements();
-         si = new DicomDirImage(true);
-         if( !AddImageToEnd(static_cast<DicomDirImage *>(si)) )
-         {
-            delete si;
-            gdcmErrorMacro( "Add ImageToEnd failed");
-         }
-         break;
-      case GDCM_DICOMDIR_SERIE:
-         elemList = Global::GetDicomDirElements()->GetDicomDirSerieElements();
-         si = new DicomDirSerie(true);
-         if( !AddSerieToEnd(static_cast<DicomDirSerie *>(si)) )
-         {
-            delete si;
-            gdcmErrorMacro( "Add SerieToEnd failed");
-         }
-         break;
-      case GDCM_DICOMDIR_STUDY:
-         elemList = Global::GetDicomDirElements()->GetDicomDirStudyElements();
-         si = new DicomDirStudy(true);
-         if( !AddStudyToEnd(static_cast<DicomDirStudy *>(si)) )
-         {
-            delete si;
-            gdcmErrorMacro( "Add StudyToEnd failed");
-         }
-         break;
-      case GDCM_DICOMDIR_PATIENT:
-         elemList = Global::GetDicomDirElements()->GetDicomDirPatientElements();
-         si = new DicomDirPatient(true);
-         if( !AddPatientToEnd(static_cast<DicomDirPatient *>(si)) )
-         {
-            delete si;
-            gdcmErrorMacro( "Add PatientToEnd failed");
-         }
-         break;
-      case GDCM_DICOMDIR_META:
-         elemList = Global::GetDicomDirElements()->GetDicomDirMetaElements();
-         si = new DicomDirMeta(true);
-         if( MetaElems )
-         {
-            delete MetaElems;
-            gdcmErrorMacro( "MetaElements already exist, they will be destroyed");
-         }
-         MetaElems = static_cast<DicomDirMeta *>(si);
-         break;
-      default:
-         return;
-   }
-   // removed all the seems-to-be-useless stuff about Referenced Image Sequence
-   // to avoid further troubles
-   // imageElem 0008 1140 "" // Referenced Image Sequence
-   // imageElem fffe e000 "" // 'no length' item : length to be set to 0xffffffff later
-   // imageElem 0008 1150 "" // Referenced SOP Class UID    : to be set/forged later
-   // imageElem 0008 1155 "" // Referenced SOP Instance UID : to be set/forged later
-   // imageElem fffe e00d "" // Item delimitation : length to be set to ZERO later
-   // for all the relevant elements found in their own spot of the DicomDir.dic
-
-   // FIXME : troubles found when it's a SeqEntry
-
-   for( it = elemList.begin(); it != elemList.end(); ++it)
-   {
-      tmpGr     = it->Group;
-      tmpEl     = it->Elem;
-      dictEntry = GetPubDict()->GetEntry(tmpGr, tmpEl);
-
-      entry     = new ValEntry( dictEntry ); // Be sure it's never a BinEntry !
-
-      entry->SetOffset(0); // just to avoid further missprinting
-
-      if( header )
-      {
-         // NULL when we Build Up (ex nihilo) a DICOMDIR
-         //   or when we add the META elems
-         val = header->GetEntryValue(tmpGr, tmpEl);
-      }
-      else
-      {
-         val = GDCM_UNFOUND;
-      }
-
-      if( val == GDCM_UNFOUND) 
-      {
-         if( tmpGr == 0x0004 && tmpEl == 0x1130 ) // File-set ID
-         {
-           // force to the *end* File Name
-           val = Util::GetName( path );
-         }
-         else if( tmpGr == 0x0004 && tmpEl == 0x1500 ) // Only used for image
-         {
-            if( header->GetFileName().substr(0, path.length()) != path )
-            {
-               gdcmVerboseMacro( "The base path of file name is incorrect");
-               val = header->GetFileName();
-            }
-            else
-            {
-               val = &(header->GetFileName().c_str()[path.length()]);
-            }
-         }
-         else
-         {
-            val = it->Value;
-         }
-      }
-      else
-      {
-         if ( header->GetEntryLength(tmpGr,tmpEl) == 0 )
-            val = it->Value;
-      }
-
-      entry->SetValue( val ); // troubles expected when vr=SQ ...
-
-      if ( type == GDCM_DICOMDIR_META ) // fusible : should never print !
-      {
-         gdcmVerboseMacro("GDCM_DICOMDIR_META ?!? should never print that");
-      }
-      si->AddEntry(entry);
-   }
-}
-
 /**
  * \brief   CallStartMethod
  */
@@ -934,6 +792,148 @@ void DicomDir::SetElements(std::string const & path, VectDocument const &list)
    }
 }
 
+/**
+ * \brief   adds to the HTable 
+ *          the Entries (Dicom Elements) corresponding to the given type
+ * @param   path full path file name (only used when type = GDCM_DICOMDIR_IMAGE
+ * @param   type DicomDirObject type to create (GDCM_DICOMDIR_PATIENT,
+ *          GDCM_DICOMDIR_STUDY, GDCM_DICOMDIR_SERIE ...)
+ * @param   header Header of the current file
+ */
+void DicomDir::SetElement(std::string const &path, DicomDirType type,
+                          Document *header)
+{
+   ListDicomDirElem elemList; //FIXME this is going to be a by copy operation
+   ListDicomDirElem::const_iterator it;
+   uint16_t tmpGr, tmpEl;
+   DictEntry *dictEntry;
+   ValEntry *entry;
+   std::string val;
+   SQItem *si;
+
+   switch( type )
+   {
+      case GDCM_DICOMDIR_IMAGE:
+         elemList = Global::GetDicomDirElements()->GetDicomDirImageElements();
+         si = new DicomDirImage(true);
+         if( !AddImageToEnd(static_cast<DicomDirImage *>(si)) )
+         {
+            delete si;
+            gdcmErrorMacro( "Add ImageToEnd failed");
+         }
+         break;
+      case GDCM_DICOMDIR_SERIE:
+         elemList = Global::GetDicomDirElements()->GetDicomDirSerieElements();
+         si = new DicomDirSerie(true);
+         if( !AddSerieToEnd(static_cast<DicomDirSerie *>(si)) )
+         {
+            delete si;
+            gdcmErrorMacro( "Add SerieToEnd failed");
+         }
+         break;
+      case GDCM_DICOMDIR_STUDY:
+         elemList = Global::GetDicomDirElements()->GetDicomDirStudyElements();
+         si = new DicomDirStudy(true);
+         if( !AddStudyToEnd(static_cast<DicomDirStudy *>(si)) )
+         {
+            delete si;
+            gdcmErrorMacro( "Add StudyToEnd failed");
+         }
+         break;
+      case GDCM_DICOMDIR_PATIENT:
+         elemList = Global::GetDicomDirElements()->GetDicomDirPatientElements();
+         si = new DicomDirPatient(true);
+         if( !AddPatientToEnd(static_cast<DicomDirPatient *>(si)) )
+         {
+            delete si;
+            gdcmErrorMacro( "Add PatientToEnd failed");
+         }
+         break;
+      case GDCM_DICOMDIR_META:
+         elemList = Global::GetDicomDirElements()->GetDicomDirMetaElements();
+         si = new DicomDirMeta(true);
+         if( MetaElems )
+         {
+            delete MetaElems;
+            gdcmErrorMacro( "MetaElements already exist, they will be destroyed");
+         }
+         MetaElems = static_cast<DicomDirMeta *>(si);
+         break;
+      default:
+         return;
+   }
+   // removed all the seems-to-be-useless stuff about Referenced Image Sequence
+   // to avoid further troubles
+   // imageElem 0008 1140 "" // Referenced Image Sequence
+   // imageElem fffe e000 "" // 'no length' item : length to be set to 0xffffffff later
+   // imageElem 0008 1150 "" // Referenced SOP Class UID    : to be set/forged later
+   // imageElem 0008 1155 "" // Referenced SOP Instance UID : to be set/forged later
+   // imageElem fffe e00d "" // Item delimitation : length to be set to ZERO later
+   // for all the relevant elements found in their own spot of the DicomDir.dic
+
+   // FIXME : troubles found when it's a SeqEntry
+
+   for( it = elemList.begin(); it != elemList.end(); ++it)
+   {
+      tmpGr     = it->Group;
+      tmpEl     = it->Elem;
+      dictEntry = GetPubDict()->GetEntry(tmpGr, tmpEl);
+
+      entry     = new ValEntry( dictEntry ); // Be sure it's never a BinEntry !
+
+      entry->SetOffset(0); // just to avoid further missprinting
+
+      if( header )
+      {
+         // NULL when we Build Up (ex nihilo) a DICOMDIR
+         //   or when we add the META elems
+         val = header->GetEntryValue(tmpGr, tmpEl);
+      }
+      else
+      {
+         val = GDCM_UNFOUND;
+      }
+
+      if( val == GDCM_UNFOUND) 
+      {
+         if( tmpGr == 0x0004 && tmpEl == 0x1130 ) // File-set ID
+         {
+           // force to the *end* File Name
+           val = Util::GetName( path );
+         }
+         else if( tmpGr == 0x0004 && tmpEl == 0x1500 ) // Only used for image
+         {
+            if( header->GetFileName().substr(0, path.length()) != path )
+            {
+               gdcmVerboseMacro( "The base path of file name is incorrect");
+               val = header->GetFileName();
+            }
+            else
+            {
+               val = &(header->GetFileName().c_str()[path.length()]);
+            }
+         }
+         else
+         {
+            val = it->Value;
+         }
+      }
+      else
+      {
+         if ( header->GetEntryLength(tmpGr,tmpEl) == 0 )
+            val = it->Value;
+      }
+
+      entry->SetValue( val ); // troubles expected when vr=SQ ...
+
+      if ( type == GDCM_DICOMDIR_META ) // fusible : should never print !
+      {
+         gdcmVerboseMacro("GDCM_DICOMDIR_META ?!? should never print that");
+      }
+      si->AddEntry(entry);
+   }
+}
+
 /**
  * \brief   Move the content of the source SQItem to the destination SQItem
  *          Only DocEntry's are moved
index 6d70471cccd8c294e066ffcce052a0246e137110..e7c6808feb714d6d9df6c731ca28682b2f652a44 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.h,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 13:11:49 $
-  Version:   $Revision: 1.52 $
+  Date:      $Date: 2005/02/02 14:52:25 $
+  Version:   $Revision: 1.53 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -56,16 +56,26 @@ public:
                    
    ~DicomDir();
 
-   /// \brief   canonical Printer 
    void Print(std::ostream &os = std::cout, std::string const & indent = "" );
 
-   
-   /// Informations contained in the parser
+   // Informations contained in the parser
    virtual bool IsReadable();
 
-   /// Parsing
+   // Meta
+   DicomDirMeta    *NewMeta();
+   /// Returns a pointer to the DicomDirMeta for this DICOMDIR. 
+   DicomDirMeta* GetMeta() { return MetaElems; };
+
+   // Patients
+   DicomDirPatient *NewPatient();
+   void ClearPatient();
+
+   DicomDirPatient *GetFirstPatient();
+   DicomDirPatient *GetNextPatient();
+
+   // Parsing
    void ParseDirectory();
-   
+
    // Note: the DicomDir:: namespace prefix is needed by Swig in the 
    //       following method declarations. Refer to gdcmPython/gdcm.i
    //       for the reasons of this unecessary notation at C++ level.
@@ -81,6 +91,7 @@ public:
    void SetStartMethodArgDelete( DicomDir::Method *m );
    void SetProgressMethodArgDelete( DicomDir::Method *m );
    void SetEndMethodArgDelete( DicomDir::Method *m );
+
    /// GetProgress GetProgress
    float GetProgress()  { return Progress; };
    /// AbortProgress AbortProgress
@@ -88,21 +99,7 @@ public:
    /// IsAborted IsAborted
    bool  IsAborted() { return Abort; };
 
-   /// Returns a pointer to the DicomDirMeta for this DICOMDIR. 
-   DicomDirMeta* GetMeta() { return MetaElems; };
-
-   // should avoid exposing internal mechanism
-   DicomDirPatient *GetFirstPatient();
-   DicomDirPatient *GetNextPatient();
-
-   /// Adding
-   DicomDirMeta    *NewMeta();
-   DicomDirPatient *NewPatient();
-
-   /// Removing
-   void ClearPatient();
-
-   /// Write  
+   // Write
    bool WriteDicomDir(std::string const &fileName);
 
    /// Types of the DicomDirObject within the DicomDir
index 5ef17805aa867d0bb9346d1faad6f32c5733c9f6..3ef9dca7f83e0d038d2d5b338588c6db27920ea9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirPatient.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 11:11:58 $
-  Version:   $Revision: 1.23 $
+  Date:      $Date: 2005/02/02 14:52:25 $
+  Version:   $Revision: 1.24 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -42,17 +42,15 @@ public:
    void Print(std::ostream &os = std::cout, std::string const & indent = "" );
    void WriteContent(std::ofstream *fp, FileType t);
   
-   // should avoid exposing internal mechanism
+   // Patient methods
+   void AddStudy(DicomDirStudy *obj) { Studies.push_back(obj); };
+   DicomDirStudy *NewStudy(); 
+   void ClearStudy();
+
    DicomDirStudy *GetFirstStudy();
    DicomDirStudy *GetNextStudy();
    DicomDirStudy *GetLastStudy();
 
-   /// adds the passed STUDY to the STUDY chained List for this PATIENT.
-   void AddStudy(DicomDirStudy *obj) { Studies.push_back(obj); };
-   DicomDirStudy *NewStudy(); 
-
-   void ClearStudy();
-         
 private:
 
    /// chained list of DicomDirStudy  (to be exploited recursively)
index 21a68c55e762eb1e6d0bbb0ef306994d84dbe415..d4b2c1e30f6f28fc5e2aa7679d7cf23da32b71f9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirSerie.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/28 17:01:29 $
-  Version:   $Revision: 1.25 $
+  Date:      $Date: 2005/02/02 14:52:26 $
+  Version:   $Revision: 1.26 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -40,17 +40,15 @@ public:
 
    void Print( std::ostream &os = std::cout, std::string const & indent = "" );
    void WriteContent( std::ofstream *fp, FileType t );
-   // should avoid exposing internal mechanism
-   DicomDirImage *GetFirstImage();
-   DicomDirImage *GetNextImage();
-        
-   /// adds the passed IMAGE to the IMAGE chained List for this SERIE.    
-   void AddImage(DicomDirImage *obj) { Images.push_back(obj); };
-   DicomDirImage *NewImage();
 
+   // Image methods
+   DicomDirImage *NewImage();
+   void AddImage(DicomDirImage *obj) { Images.push_back(obj); };
    void ClearImage();
 
+   DicomDirImage *GetFirstImage();
+   DicomDirImage *GetNextImage();
+
 private:
 
    ///chained list of DicomDirImages (to be exploited recursively)
index 0e38bf5c6711d6be75597a3f13c7cd2ec2c59fc2..2d94b737676bda5561efe0dd85e125e49c0bf644 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirStudy.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 11:11:58 $
-  Version:   $Revision: 1.22 $
+  Date:      $Date: 2005/02/02 14:52:26 $
+  Version:   $Revision: 1.23 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -41,16 +41,14 @@ public:
    void Print(std::ostream &os = std::cout, std::string const & indent = "" );
    void WriteContent(std::ofstream *fp, FileType t);
 
-   // should avoid exposing internal mechanism
+   // Serie methods
+   DicomDirSerie* NewSerie();
+   void AddSerie(DicomDirSerie *obj) { Series.push_back(obj); };
+   void ClearSerie();
+
    DicomDirSerie *GetFirstSerie();
    DicomDirSerie *GetNextSerie();
    DicomDirSerie *GetLastSerie();
-
-   /// adds the passed SERIE to the SERIE chained List for this STUDY.
-   void AddSerie(DicomDirSerie *obj) { Series.push_back(obj); };
-   DicomDirSerie* NewSerie();
-
-   void ClearSerie();
     
 private: