]> Creatis software - gdcm.git/commitdiff
* Add GetFirstValEntry + GetNexxtValEntry, for Python users
authorjpr <jpr>
Fri, 4 Feb 2005 14:49:01 +0000 (14:49 +0000)
committerjpr <jpr>
Fri, 4 Feb 2005 14:49:01 +0000 (14:49 +0000)
 * Some more Doxygenation + typo fixing

src/gdcmDocEntry.h
src/gdcmDocEntrySet.cxx
src/gdcmDocEntrySet.h
src/gdcmElementSet.cxx
src/gdcmElementSet.h
src/gdcmFileHelper.cxx
src/gdcmFileHelper.h
src/gdcmSQItem.cxx
src/gdcmSQItem.h
src/gdcmSeqEntry.h

index b77f294355f4539ed220c1a7402273de02747d0b..7571fd72260b497136e8a3ec4ea14b56dd9f58ef 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.h,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 16:18:48 $
-  Version:   $Revision: 1.45 $
+  Date:      $Date: 2005/02/04 14:49:01 $
+  Version:   $Revision: 1.46 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -41,6 +41,7 @@ class GDCM_EXPORT DocEntry : public Base
 {
 public:
    DocEntry(DictEntry*);
+   /// \brief Canonical Destructor
    virtual ~DocEntry() {};
 
    virtual void Print (std::ostream &os = std::cout, std::string const &indent = ""); 
index 6a4597f0944a11022eaf8148d218e02a3d95cddd..04dc3a1d9e0e7d3d696886a0ceb7e26672b2f5b9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 16:18:48 $
-  Version:   $Revision: 1.52 $
+  Date:      $Date: 2005/02/04 14:49:01 $
+  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
@@ -252,7 +252,7 @@ ValEntry *DocEntrySet::InsertValEntry(std::string const &value,
                                       TagName const &vr )
 {
    ValEntry *valEntry = 0;
-   DocEntry *currentEntry = GetDocEntry( group, elem);
+   DocEntry *currentEntry = GetDocEntry( group, elem );
    
    if (currentEntry)
    {
@@ -278,7 +278,7 @@ ValEntry *DocEntrySet::InsertValEntry(std::string const &value,
    // Create a new valEntry if necessary
    if( !valEntry )
    {
-      valEntry = NewValEntry(group, elem, vr);
+      valEntry = NewValEntry( group, elem, vr );
 
       if ( !AddEntry(valEntry) )
       {
@@ -294,11 +294,12 @@ ValEntry *DocEntrySet::InsertValEntry(std::string const &value,
    return valEntry;
 }
 
-/*
+/**
  * \brief   Modifies the value of a given Header Entry (Dicom Element)
  *          when it exists. Create it with the given value when unexistant.
  *          A copy of the binArea is made to be kept in the Document.
  * @param   binArea (binary) value to be set
+ * @param   lgth length of the Bin Area we want to set
  * @param   group   Group number of the Entry 
  * @param   elem  Element number of the Entry
  * @param   vr  V(alue) R(epresentation) of the Entry -if private Entry-
@@ -310,7 +311,7 @@ BinEntry *DocEntrySet::InsertBinEntry(uint8_t *binArea, int lgth,
                                       TagName const &vr )
 {
    BinEntry *binEntry = 0;
-   DocEntry *currentEntry = GetDocEntry( group, elem);
+   DocEntry *currentEntry = GetDocEntry( group, elem );
 
    // Verify the currentEntry
    if (currentEntry)
@@ -370,7 +371,7 @@ BinEntry *DocEntrySet::InsertBinEntry(uint8_t *binArea, int lgth,
    return binEntry;
 }  
 
-/*
+/**
  * \brief   Modifies the value of a given Header Entry (Dicom Element)
  *          when it exists. Creates it when unexistant.
  * @param   group   Group number of the Entry 
@@ -440,7 +441,7 @@ bool DocEntrySet::CheckIfEntryExist(uint16_t group, uint16_t elem )
  * @param   vr     VR of the new Entry 
  */
 ValEntry *DocEntrySet::NewValEntry(uint16_t group,uint16_t elem,
-                                   TagName const & vr) 
+                                   TagName const &vr) 
 {
    DictEntry *dictEntry = GetDictEntry(group, elem, vr);
    gdcmAssertMacro(dictEntry);
@@ -507,10 +508,10 @@ SeqEntry* DocEntrySet::NewSeqEntry(uint16_t group, uint16_t elem)
  * @param   vm    VM (Value Multiplicity)   of the underlying DictEntry
  * @param   name   english name
  */
-DictEntry* DocEntrySet::NewVirtualDictEntry( uint16_t group,uint16_t elem,
-                                             TagName const & vr,
-                                             TagName const & vm,
-                                             TagName const & name )
+DictEntry* DocEntrySet::NewVirtualDictEntry( uint16_t group, uint16_t elem,
+                                             TagName const &vr,
+                                             TagName const &vm,
+                                             TagName const &name )
 {
    return Global::GetDicts()->NewVirtualDictEntry(group,elem,vr,vm,name);
 }
index c1374a1bdab37dcdb8251153b2b63d9e1a02d5e0..4328fe1cc32013f99ddfdeab473146b5f1e1ec97 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.h,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 16:18:48 $
-  Version:   $Revision: 1.47 $
+  Date:      $Date: 2005/02/04 14:49:01 $
+  Version:   $Revision: 1.48 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -59,7 +59,9 @@ typedef std::string BaseTagKey;
 class GDCM_EXPORT DocEntrySet : public Base
 {
 public:
+   /// Canonical Constructor
    DocEntrySet() {};
+   /// Canonical Destructor
    virtual ~DocEntrySet() {};
 
    /// \brief write any type of entry to the entry set
@@ -73,10 +75,14 @@ public:
    virtual bool RemoveEntry(DocEntry *EntryToRemove) = 0;
    /// \brief Removes any type of entry out of the entry set, DOESN'T destroy it
    virtual bool RemoveEntryNoDestroy(DocEntry *EntryToRemove) = 0;
-
+   /// Gets the first entry of any type of set
    virtual DocEntry *GetFirstEntry()=0;
+   /// Gets the next entry of any type of set
    virtual DocEntry *GetNextEntry()=0;
-
+   /// Gets the first ValEntry of set (for Python users)
+   virtual ValEntry *GetFirstValEntry()=0;
+   /// Gets the next ValEntry of set  (for Python users)
+   virtual ValEntry *GetNextValEntry()=0;
    virtual std::string GetEntryValue(uint16_t group, uint16_t elem);
    virtual void *GetEntryBinArea(uint16_t group, uint16_t elem);   
    virtual int GetEntryLength(uint16_t group, uint16_t elem);
@@ -105,7 +111,7 @@ public:
                                     uint16_t group, uint16_t elem,
                                     TagName const &vr = GDCM_UNKNOWN);
    virtual SeqEntry *InsertSeqEntry(uint16_t group, uint16_t elem);
-
+   /// tells us if the set contains no entry
    virtual bool IsEmpty() = 0;
    virtual bool CheckIfEntryExist(uint16_t group, uint16_t elem);
 
index 1330a42f3f80195c40f52e2a8213c3367bb0329f..7b306ee2b41b65d3b805cd38920e15726d9bbcf2 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmElementSet.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 16:18:48 $
-  Version:   $Revision: 1.53 $
+  Date:      $Date: 2005/02/04 14:49:01 $
+  Version:   $Revision: 1.54 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -135,7 +135,8 @@ void ElementSet::ClearEntry()
 }
 
 /**
- * \brief   Get the first entry while visiting the DocEntrySet
+ * \brief   Get the first entry while visiting *the* 'zero level' DocEntrySet
+ *              (DocEntries out of any Sequence)
  * \return  The first DocEntry if found, otherwhise NULL
  */
 DocEntry *ElementSet::GetFirstEntry()
@@ -147,7 +148,8 @@ DocEntry *ElementSet::GetFirstEntry()
 }
 
 /**
- * \brief   Get the next entry while visiting the Hash table (TagHT)
+ * \brief   Get the next entry while visiting *the* 'zero level' DocEntrySet
+ *              (DocEntries out of any Sequence) 
  * \note : meaningfull only if GetFirstEntry already called 
  * \return  The next DocEntry if found, otherwhise NULL
  */
@@ -161,6 +163,45 @@ DocEntry *ElementSet::GetNextEntry()
    return NULL;
 }
 
+/**
+ * \brief   Get the first ValEntry while visiting *the* 'zero level' DocEntrySet
+ *              (DocEntries out of any Sequence)
+ *              This method is designed for Python users
+ * \return  The first ValEntry if found, otherwhise NULL
+ */
+ValEntry *ElementSet::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 
+   ItValEntryTagHT = ItTagHT;
+   if ( valEntry = dynamic_cast<gdcm::ValEntry*>(d)) 
+      return valEntry;
+   return  GetNextValEntry();  
+}
+
+/**
+ * \brief   Get the next ValEntry while visiting *the* 'zero level' DocEntrySet
+ *              (DocEntries out of any Sequence) 
+ * \note : meaningfull only if GetFirstValEntry already called 
+ * \return  The next ValEntry if found, otherwhise NULL
+ */
+ValEntry *ElementSet::GetNextValEntry()
+{
+   gdcm::ValEntry *valEntry;
+   gdcm::DocEntry *d = ItValEntryTagHT->second;
+   ++ItValEntryTagHT; 
+   while( d )
+   {
+      if ( valEntry = dynamic_cast<gdcm::ValEntry*>(d))
+         return valEntry;
+      else
+         return GetNextValEntry(); 
+   }
+   return 0;
+}
+
 /**
  * \brief  retrieves a Dicom Element using (group, element)
  * @param   group  Group number of the searched Dicom Element 
index dcf695ad0bb9845bd46b02b81621514191c96c9f..e5a60a0ea6d2b882bf71ca424447cf0cd1e08092 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmElementSet.h,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 16:18:48 $
-  Version:   $Revision: 1.41 $
+  Date:      $Date: 2005/02/04 14:49:01 $
+  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
@@ -58,9 +58,10 @@ public:
    
    DocEntry *GetFirstEntry();
    DocEntry *GetNextEntry();
-
+   ValEntry *GetFirstValEntry();
+   ValEntry *GetNextValEntry();
    DocEntry *GetDocEntry(uint16_t group, uint16_t elem);
-
+   /// Tells us if the ElementSet contains no entry
    bool IsEmpty() { return TagHT.empty(); };
 
 protected:
@@ -69,8 +70,10 @@ private:
 // Variables
    /// Hash Table (map), to provide fast access
    TagDocEntryHT TagHT;
-   /// Hash Table (map) iterator, used to visit the TagHT variable
-   TagDocEntryHT::iterator ItTagHT; 
+   /// iterator, used to visit the TagHT variable
+   TagDocEntryHT::iterator ItTagHT;
+   /// iterator, used to visit the TagHT variable, seeking only for ValEntries
+   TagDocEntryHT::iterator ItValEntryTagHT;
 };
 } // end namespace gdcm
 //-----------------------------------------------------------------------------
index 5e7ed07e8a2b9b2b44d2ce15b938b7edd1dea19c..bde7e0f936c1511c7ffaf8411c4a6e0c8239e8c7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFileHelper.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 16:18:48 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2005/02/04 14:49:01 $
+  Version:   $Revision: 1.12 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -133,7 +133,7 @@ FileHelper::~FileHelper()
  * @param   elem element number of the Dicom Element to modify
  */
 bool FileHelper::SetValEntry(std::string const &content,
-                    uint16_t group, uint16_t elem)
+                             uint16_t group, uint16_t elem)
 { 
    return FileInternal->SetValEntry(content,group,elem);
 }
@@ -149,7 +149,7 @@ bool FileHelper::SetValEntry(std::string const &content,
  * @param   elem element number of the Dicom Element to modify
  */
 bool FileHelper::SetBinEntry(uint8_t *content, int lgth,
-                                 uint16_t group, uint16_t elem)
+                             uint16_t group, uint16_t elem)
 {
    return FileInternal->SetBinEntry(content,lgth,group,elem);
 }
@@ -164,28 +164,29 @@ bool FileHelper::SetBinEntry(uint8_t *content, int lgth,
  *          failed).
  */ 
 ValEntry *FileHelper::InsertValEntry(std::string const &content,
-                                uint16_t group, uint16_t elem)
+                                     uint16_t group, uint16_t elem)
 {
    return FileInternal->InsertValEntry(content,group,elem);
 }
 
-/*
+/**
  * \brief   Modifies the value of a given DocEntry (Dicom entry)
  *          when it exists. Create it with the given value when unexistant.
  *          A copy of the binArea is made to be kept in the Document.
  * @param   binArea (binary) value to be set
+ * @param   lgth new value length
  * @param   group   Group number of the Entry 
  * @param   elem  Element number of the Entry
  * \return  pointer to the modified/created Dicom entry (NULL when creation
  *          failed).
  */
 BinEntry *FileHelper::InsertBinEntry(uint8_t *binArea, int lgth,
-                                uint16_t group, uint16_t elem)
+                                     uint16_t group, uint16_t elem)
 {
    return FileInternal->InsertBinEntry(binArea,lgth,group,elem);
 }
 
-/*
+/**
  * \brief   Modifies the value of a given DocEntry (Dicom entry)
  *          when it exists. Create it with the given value when unexistant.
  *          A copy of the binArea is made to be kept in the Document.
@@ -235,9 +236,9 @@ size_t FileHelper::GetImageDataRawSize()
 }
 
 /**
- * \brief   - Allocates necessary memory, 
+ * \brief   - Allocates necessary memory,
  *          - Reads the pixels from disk (uncompress if necessary),
- *          - Transforms YBR pixels, if any, into RGB pixels
+ *          - Transforms YBR pixels, if any, into RGB pixels,
  *          - Transforms 3 planes R, G, B, if any, into a single RGB Plane
  *          - Transforms single Grey plane + 3 Palettes into a RGB Plane
  *          - Copies the pixel data (image[s]/volume[s]) to newly allocated zone.
@@ -347,9 +348,11 @@ size_t FileHelper::GetImageDataIntoVector (void *destination, size_t maxSize)
  *          'volume'Pixels are presented as C-like 3D arrays : plane per plane 
  * \warning Since the pixels are not copied, it is the caller's responsability
  *          not to deallocate its data before gdcm uses them (e.g. with
- *          the Write() method.
- * @param inData user supplied pixel area
- * @param expectedSize total image size, in Bytes
+ *          the Write() method )
+ * @param inData user supplied pixel area (uint8_t* is just for the compiler.
+ *               user is allowed to pass any kind of pixelsn since the size is
+ *               given in bytes) 
+ * @param expectedSize total image size, *in Bytes*
  *
  * @return boolean
  */
@@ -361,10 +364,15 @@ void FileHelper::SetImageData(uint8_t *inData, size_t expectedSize)
 /**
  * \brief   Set the image data defined by the user
  * \warning When writting the file, this data are get as default data to write
+ * @param inData user supplied pixel area (uint8_t* is just for the compiler.
+ *               user is allowed to pass any kind of pixelsn since the size is
+ *               given in bytes) 
+ * @param expectedSize total image size, *in Bytes*
  */
-void FileHelper::SetUserData(uint8_t *data, size_t expectedSize)
+void FileHelper::SetUserData(uint8_t *inData, size_t expectedSize)
 {
-   PixelWriteConverter->SetUserData(data,expectedSize);
+   PixelWriteConverter->SetUserData(inData,expectedSize);
 }
 
 /**
index 7c55cb41c7c036c69f6d5c9f2c8ce29173c78a80..18ab4bb9adc04d0c031ed024111de704f822783f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFileHelper.h,v $
   Language:  C++
-  Date:      $Date: 2005/02/03 10:03:07 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/02/04 14:49:01 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -95,17 +95,32 @@ public:
    uint8_t* GetLutRGBA();
 
    // Write mode
-   void SetWriteModeToRaw()           { SetWriteMode(WMODE_RAW);  };
+
+   /// \brief Tells the writer we want to write a Raw File (no header)
+  void SetWriteModeToRaw()           { SetWriteMode(WMODE_RAW);  };
+   /// \brief Tells the writer we want to write RGB image when possible
+   ///        (as opposite to 'Grey pixels + Palettes color')
    void SetWriteModeToRGB()           { SetWriteMode(WMODE_RGB);  };
+   /// \brief Sets the Write Mode ( )
    void SetWriteMode(FileMode mode)   { WriteMode = mode;         };
+   /// \brief Gets the Write Mode ( )
    FileMode GetWriteMode()            { return WriteMode;         };
 
    // Write format
+
+   /// \brief Tells the writer we want to write as Implicit VR
    void SetWriteTypeToDcmImplVR()     { SetWriteType(ImplicitVR); };
+   /// \brief Tells the writer we want to write as Explicit VR
    void SetWriteTypeToDcmExplVR()     { SetWriteType(ExplicitVR); };
+   /// \brief Tells the writer we want to write as ACR-NEMA
    void SetWriteTypeToAcr()           { SetWriteType(ACR);        };
+   /// \brief Tells the writer we want to write as LibIDO
    void SetWriteTypeToAcrLibido()     { SetWriteType(ACR_LIBIDO); };
+   /// \brief Tells the writer which format want to write
+   /// (ImplicitVR, ExplicitVR, ACR, ACR_LIBIDO)
    void SetWriteType(FileType format) { WriteType = format;       };
+   /// \brief Gets the format we want to write
+   ///   (ImplicitVR, ExplicitVR, ACR, ACR_LIBIDO)
    FileType GetWriteType()            { return WriteType;         };
 
    // Write pixels of ONE image on hard drive
@@ -153,15 +168,20 @@ private:
    /// Wether already parsed or not
    bool Parsed;
 
-   /// Utility pixel converter
+   // Utility pixel converter
+   /// \brief Pointer to the PixelReadConverter
    PixelReadConvert *PixelReadConverter;
+   /// \brief Pointer to the PixelWriteConverter
    PixelWriteConvert *PixelWriteConverter;
 
    // Utility header archive
+   /// \brief Pointer to the DocEntryArchive (used while writting process)
    DocEntryArchive *Archive;
 
    // Write variables
+   /// \brief (WMODE_RAW, WMODE_RGB)
    FileMode WriteMode;
+   /// \brief (ImplicitVR, ExplicitVR, ACR, ACR_LIBIDO)
    FileType WriteType;
 };
 } // end namespace gdcm
index e6b4e1c9cf145dd40fac7e17992e80063d91d2cd..1b46a482946cdb1a6ae49a1c2f78d21b90d7270c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 16:18:48 $
-  Version:   $Revision: 1.66 $
+  Date:      $Date: 2005/02/04 14:49:01 $
+  Version:   $Revision: 1.67 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -210,7 +210,7 @@ DocEntry *SQItem::GetFirstEntry()
 }
                                                                                 
 /**
- * \brief   Get the next Dicom entry while visiting the chained list
+ * \brief   Get the next Dicom entry while visiting the SQItem
  * \return  The next DocEntry if found, otherwhise NULL
  */
 DocEntry *SQItem::GetNextEntry()
@@ -221,6 +221,42 @@ DocEntry *SQItem::GetNextEntry()
    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
index 88e1717f2c5574d67adc60a1cb9f32c9c01130f4..a6f8b75fc57a7b9420923a205aeed96e032935f4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.h,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 16:18:49 $
-  Version:   $Revision: 1.39 $
+  Date:      $Date: 2005/02/04 14:49:01 $
+  Version:   $Revision: 1.40 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -44,7 +44,7 @@ public:
    SQItem(int depthLevel);
    ~SQItem();
 
-   virtual void Print(std::ostream &os = std::cout, std::string const & indent = "" ); 
+   virtual void Print(std::ostream &os = std::cout, std::string const &indent = "" ); 
    void WriteContent(std::ofstream *fp, FileType filetype);
 
    bool AddEntry(DocEntry *Entry); // add to the List
@@ -55,6 +55,9 @@ public:
    DocEntry *GetFirstEntry();
    DocEntry *GetNextEntry();
 
+   ValEntry *GetFirstValEntry();
+   ValEntry *GetNextValEntry();
+
    DocEntry *GetDocEntry(uint16_t group, uint16_t elem);
 
    bool IsEmpty() { return DocEntries.empty(); };
@@ -77,12 +80,14 @@ public:
    BaseTagKey const &GetBaseTagKey() const { return BaseTagKeyNested; }
 
 protected:
-// Variables that need to be access in subclasses
-   /// \brief Chained list of (Elementary) Doc Entries
+// Variables that need to be accessed in subclasses
+   /// \brief Chained list of Doc Entries
    ListDocEntry DocEntries;
-   /// Chained list iterator, used to visit the TagHT variable
+   /// Iterator, used to visit the entries
    ListDocEntry::iterator ItDocEntries;
-   
+   /// Iterator, used to visit the Val Entries (for Python users)
+   ListDocEntry::iterator ItValEntries;
+  
 private:
    /// \brief Sequences can be nested. This \ref SQDepthLevel represents
    ///        the level of the nesting of instances of this class.
index f3919280a2a05aa28682fd31c74246b1bbfdc6d8..621c0614fd5ef87d18ffc082eb1069ab8c3752d1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSeqEntry.h,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 16:18:49 $
-  Version:   $Revision: 1.32 $
+  Date:      $Date: 2005/02/04 14:49:01 $
+  Version:   $Revision: 1.33 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -44,7 +44,7 @@ public:
    SeqEntry( DocEntry *d, int depth );
    ~SeqEntry();
    
-   void Print(std::ostream &os = std::cout, std::string const & indent = "" ); 
+   void Print(std::ostream &os = std::cout, std::string const &indent = "" ); 
    void WriteContent(std::ofstream *fp, FileType filetype);
 
    void AddSQItem(SQItem *it, int itemNumber);
@@ -58,7 +58,8 @@ public:
    void SetDelimitorMode(bool dm) { DelimitorMode = dm; }
 
    /// Sets the Sequence Delimitation Item
-   void SetDelimitationItem(DocEntry *e) { SeqTerm = e;}
+   void SetDelimitationItem(DocEntry *e) { SeqTerm = e;   }
+   /// Gets the Sequence Delimitation Item
    DocEntry *GetDelimitationItem()       { return SeqTerm;}
 
    /// Gets the depth level