]> Creatis software - gdcm.git/commitdiff
* src/gdcmBase.[h|cxx] : new base class. Contains the PrintLevel and an
authorregrain <regrain>
Thu, 16 Dec 2004 13:46:36 +0000 (13:46 +0000)
committerregrain <regrain>
Thu, 16 Dec 2004 13:46:36 +0000 (13:46 +0000)
     empty Print Method
   * Set the gdcm::Base class to some Printable classes
   -- BeNours

25 files changed:
ChangeLog
src/CMakeLists.txt
src/gdcmBase.cxx [new file with mode: 0644]
src/gdcmBase.h [new file with mode: 0644]
src/gdcmBinEntry.cxx
src/gdcmDicomDir.cxx
src/gdcmDicomDir.h
src/gdcmDicomDirElement.h
src/gdcmDicomDirMeta.cxx
src/gdcmDicomDirObject.h
src/gdcmDict.h
src/gdcmDictEntry.h
src/gdcmDictSet.h
src/gdcmDocEntry.cxx
src/gdcmDocEntry.h
src/gdcmDocEntrySet.h
src/gdcmDocument.cxx
src/gdcmElementSet.cxx
src/gdcmFile.cxx
src/gdcmFile.h
src/gdcmPixelReadConvert.h
src/gdcmPixelWriteConvert.h
src/gdcmSQItem.cxx
src/gdcmSeqEntry.cxx
src/gdcmValEntry.cxx

index 57662535c9cf3fbf560ef7b5ef5370bbe5de52d1..59c1a0e9e2c49593d2ad4445dafd1562f8eafd6f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-12-16 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
+   * src/gdcmBase.[h|cxx] : new base class. Contains the PrintLevel and an
+     empty Print Method
+   * Set the gdcm::Base class to some Printable classes
+
 2004-12-16 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
    * src/gdcmFile.[h|cxx] : add the Print method
    * src/gdcmPixelReadConvert.[h|cxx] : add the generalized Print method
index 9544053e854e4c375ab9576deee27209e143b438..64b436468a4423d47582daeb7cd9a41d4116bbaa 100644 (file)
@@ -13,6 +13,7 @@ INCLUDE_DIRECTORIES(
 )
 
 SET(libgdcm_la_SOURCES
+   gdcmBase.cxx
    gdcmBinEntry.cxx
    gdcmDebug.cxx
    gdcmDicomDir.cxx
diff --git a/src/gdcmBase.cxx b/src/gdcmBase.cxx
new file mode 100644 (file)
index 0000000..6f4c0d5
--- /dev/null
@@ -0,0 +1,63 @@
+  /*=========================================================================
+                                                                                
+  Program:   gdcm
+  Module:    $RCSfile: gdcmBase.cxx,v $
+  Language:  C++
+  Date:      $Date: 2004/12/16 13:46:38 $
+  Version:   $Revision: 1.1 $
+                                                                                
+  Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+  l'Image). All rights reserved. See Doc/License.txt or
+  http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
+                                                                                
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notices for more information.
+                                                                                
+=========================================================================*/
+
+#include "gdcmBase.h"
+
+namespace gdcm 
+{
+//-------------------------------------------------------------------------
+// Constructor / Destructor
+/**
+ * \brief canonical constructor
+ */
+Base::Base( )
+{
+   PrintLevel = 0;
+}
+
+/**
+ * \brief canonical destructor
+ * \note  If the Header was created by the File constructor,
+ *        it is destroyed by the File
+ */
+Base::~Base()
+{ 
+}
+
+//-----------------------------------------------------------------------------
+// Print
+/**
+ * \brief   Print all the object
+ * @param   os The output stream to be written to.
+ */
+void Base::Print(std::ostream &os)
+{
+}
+
+//-----------------------------------------------------------------------------
+// Public
+
+//-----------------------------------------------------------------------------
+// Protected
+
+//-----------------------------------------------------------------------------
+// Private
+
+//-----------------------------------------------------------------------------
+} // end namespace gdcm
+
diff --git a/src/gdcmBase.h b/src/gdcmBase.h
new file mode 100644 (file)
index 0000000..e7b7abc
--- /dev/null
@@ -0,0 +1,58 @@
+/*=========================================================================
+                                                                                
+  Program:   gdcm
+  Module:    $RCSfile: gdcmBase.h,v $
+  Language:  C++
+  Date:      $Date: 2004/12/16 13:46:38 $
+  Version:   $Revision: 1.1 $
+                                                                                
+  Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+  l'Image). All rights reserved. See Doc/License.txt or
+  http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
+                                                                                
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notices for more information.
+                                                                                
+=========================================================================*/
+
+#ifndef GDCMBASE_H
+#define GDCMBASE_H
+
+#include "gdcmCommon.h"
+#include <iostream>
+
+namespace gdcm 
+{
+//-----------------------------------------------------------------------------
+/*
+ * \brief Base class of all gdcm classes
+ *
+ * Contains all to correctly print
+ *  - Print method
+ *  - SetPrintLevel method
+ */
+class GDCM_EXPORT Base
+{
+public:
+   Base( );
+   virtual ~Base();
+
+   virtual void Print(std::ostream &os = std::cout); 
+
+   /// \brief Sets the print level for the Dicom Header Elements
+   /// \note 0 for Light Print; 1 for 'medium' Print, 2 for Heavy
+   void SetPrintLevel(int level) { PrintLevel = level; };
+
+   /// \brief Gets the print level for the Dicom Header Elements
+   int GetPrintLevel() { return PrintLevel; };
+
+protected:
+   /// \brief Amount of printed details for each Header Entry (Dicom Element):
+   /// 0 : stands for the least detail level.
+   int PrintLevel;
+};
+} // end namespace gdcm
+
+//-----------------------------------------------------------------------------
+#endif
index b27d35ccbea7875ad511c3ccfaeea0f1ab84dc40..991d3a0149e05728575e31fdc384f668faf332a0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmBinEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/30 16:29:01 $
-  Version:   $Revision: 1.41 $
+  Date:      $Date: 2004/12/16 13:46:36 $
+  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
@@ -46,7 +46,6 @@ BinEntry::BinEntry(DocEntry* e) : ValEntry(e->GetDictEntry())
    ReadLength   = e->GetReadLength();
    ImplicitVR   = e->IsImplicitVR();
    Offset       = e->GetOffset();
-   PrintLevel   = e->GetPrintLevel();
    //FIXME
    //SQDepthLevel = e->GetDepthLevel();
 
index e5cc92d0d2260d147984c2bba2a8f6325387bb38..45839d9f766f322b9fc652f75e18bd981b8f8dc9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/07 17:28:50 $
-  Version:   $Revision: 1.89 $
+  Date:      $Date: 2004/12/16 13:46:36 $
+  Version:   $Revision: 1.90 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -169,8 +169,8 @@ void DicomDir::Print(std::ostream &os)
                                      cc != Patients.end();
                                    ++cc)
    {
-     (*cc)->SetPrintLevel( PrintLevel );
-     (*cc)->Print( os );
+     (*cc)->SetPrintLevel(PrintLevel);
+     (*cc)->Print(os);
    }
 }
 
index 5aae1c919d2761d4da56707dab2a711650445c00..4594450a8a5f116cab55b9363d47861b171d7b5f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:57 $
-  Version:   $Revision: 1.41 $
+  Date:      $Date: 2004/12/16 13:46:36 $
+  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
@@ -56,7 +56,6 @@ public:
    ~DicomDir();
 
    /// \brief   canonical Printer 
-   /// \sa    SetPrintLevel
    void Print(std::ostream &os = std::cout);
 
    /// Informations contained in the parser
index 07bf7db38276a9201c6aa0d73d856b2ab396128a..859ce4076838d456075039a9e1ac087fcd094f4d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirElement.h,v $
   Language:  C++
-  Date:      $Date: 2004/11/03 18:08:56 $
-  Version:   $Revision: 1.15 $
+  Date:      $Date: 2004/12/16 13:46:36 $
+  Version:   $Revision: 1.16 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -58,7 +58,6 @@ public:
 
   /**
     * \brief   canonical Printer 
-    * \sa    SetPrintLevel
     */ 
    void Print(std::ostream &os);
 
index 3942ee83b06c4041ca1d9506fd761057545cb1f4..9c4a3cc882b68f8d1e40537ac4e135f4a851f57d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirMeta.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/06 11:37:38 $
-  Version:   $Revision: 1.18 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  Version:   $Revision: 1.19 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -56,6 +56,7 @@ void DicomDirMeta::Print(std::ostream& os)
         i != DocEntries.end();
         ++i)
    {
+      (*i)->SetPrintLevel(PrintLevel);
       (*i)->Print();
       os << std::endl;
    }
index efa3742b6bea0dd48cd8447374df6a7697d3a8ac..52633eb5cd61af5b9debd8f0186753ee36998f78 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirObject.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:57 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -39,28 +39,15 @@ class GDCM_EXPORT DicomDirObject : public SQItem
 {
 typedef std::list<DicomDirObject *> ListContent;
 public:
-
-   DicomDirObject(int depth = 1);
-   ~DicomDirObject();
-
-   /**
-    * \brief   Sets the print level for the Dicom Header 
-    * \note    0 for Light Print; 1 for 'medium' Print, 2 for Heavy
-    */
-   void SetPrintLevel(int level) { PrintLevel = level; };
-   
    TagDocEntryHT GetEntry();
    void FillObject(ListDicomDirMetaElem const & elemList);
 
 protected:
-
    // Constructor and destructor are protected to avoid end user to
    // instanciate from this class. 
    // NO ! DicomDir needs to instanciate it!
-
-// Members :
-   ///\brief detail level to be printed 
-   int PrintLevel;
+   DicomDirObject(int depth = 1);
+   ~DicomDirObject();
 };
 } // end namespace gdcm
 
index 6764bbd40da206df1ec9259f1b147bff5d215f4b..b7c3c5bc0da29b9d4bfc4168d6b6d545537f8682 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDict.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:57 $
-  Version:   $Revision: 1.24 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  Version:   $Revision: 1.25 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -19,6 +19,7 @@
 #ifndef GDCMDICT_H
 #define GDCMDICT_H
 
+#include "gdcmBase.h"
 #include "gdcmDictEntry.h"
 
 #include <iostream>
@@ -46,7 +47,7 @@ typedef std::map<std::string,
  *           combined with all software versions...
  * \see DictSet
  */
-class GDCM_EXPORT Dict
+class GDCM_EXPORT Dict : public Base
 {
 public:
    Dict(std::string const & filename);
index 9a255cd28aaeb0c06aa515b9e91d6b72a011a676..37c602ef56373dace397679ee297fe77312de0cf 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictEntry.h,v $
   Language:  C++
-  Date:      $Date: 2004/10/18 02:35:35 $
-  Version:   $Revision: 1.20 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  Version:   $Revision: 1.21 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -19,7 +19,7 @@
 #ifndef GDCMDICTENTRY_H
 #define GDCMDICTENTRY_H
 
-#include "gdcmCommon.h"
+#include "gdcmBase.h"
 
 namespace gdcm 
 {
@@ -35,7 +35,7 @@ namespace gdcm
  *  - the owner group
  *  - etc.
  */
-class GDCM_EXPORT DictEntry 
+class GDCM_EXPORT DictEntry : public Base
 {
 public:
    DictEntry(uint16_t group, 
index 2d7789ab4c0eeb2ced2007386d12c32473a197a7..b2be826a7490b2410b9fc0e2eefdc4f612eb2ff3 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictSet.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:57 $
-  Version:   $Revision: 1.29 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  Version:   $Revision: 1.30 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -19,6 +19,7 @@
 #ifndef GDCMDICTSET_H
 #define GDCMDICTSET_H
 
+#include "gdcmBase.h"
 #include "gdcmDict.h"
 
 #include <map>
@@ -37,7 +38,7 @@ typedef std::map<DictKey, Dict*> DictSetHT;
  * \par    having many in memory representations of the same dictionary
  *        (saving memory).
  */
-class GDCM_EXPORT DictSet
+class GDCM_EXPORT DictSet : public Base
 {
 public:
    DictSet();
index fcd2db28b0edb4480db26844cacab23a6f81effd..db3461fe04fcf541021e1ba28cfa0065b0df53df 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:57 $
-  Version:   $Revision: 1.34 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  Version:   $Revision: 1.35 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -48,7 +48,6 @@ DocEntry::DocEntry(DictEntry* in)
    // init some variables
    ReadLength = 0;
    UsableLength = 0;
-   PrintLevel = 0;
 }
 
 //-----------------------------------------------------------------------------
@@ -60,8 +59,6 @@ DocEntry::DocEntry(DictEntry* in)
  */
 void DocEntry::Print(std::ostream& os)
 {
-   PrintLevel = 2; // FIXME
-   
    size_t o;
    std::string st;
    TSKey v;
@@ -252,7 +249,6 @@ void DocEntry::Copy (DocEntry* e)
    ReadLength   = e->ReadLength;
    ImplicitVR   = e->ImplicitVR;
    Offset       = e->Offset;
-   PrintLevel   = e->PrintLevel;
    // TODO : remove DocEntry SQDepth
 }
 
index 62757c34d1c88d70dd88739fcbe5f91ffa934650..52707ee18d17733f724079e26467456cb5160133 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:58 $
-  Version:   $Revision: 1.32 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  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
@@ -19,6 +19,7 @@
 #ifndef GDCMDOCENTRY_H
 #define GDCMDOCENTRY_H
 
+#include "gdcmBase.h"
 #include "gdcmDictEntry.h"
 
 #include <iostream>
@@ -36,7 +37,7 @@ class SeqEntry;
  * \brief   The dicom header of a Dicom file contains a set of such entries
  *          (when successfuly parsed against a given Dicom dictionary)
  */
-class GDCM_EXPORT DocEntry
+class GDCM_EXPORT DocEntry : public Base
 {
 public:
    DocEntry(DictEntry*);
@@ -119,15 +120,7 @@ public:
    /// \brief  Gets the DicEntry of the current Dicom Element
    /// @return The DicEntry of the current Dicom Element
    DictEntry * GetDictEntry() { return DicomDict; }; 
-
-   /// \brief Sets the print level for the Dicom Header Elements
-   /// \note 0 for Light Print; 1 for 'medium' Print, 2 for Heavy
-   void SetPrintLevel(int level) { PrintLevel = level; };
-
-   /// \brief Gets the print level for the Dicom Header Elements
-   int GetPrintLevel() { return PrintLevel; };
    
-   virtual void Print (std::ostream & os = std::cout); 
    virtual void WriteContent(std::ofstream *fp, FileType filetype);
    
    uint32_t GetFullLength();
@@ -137,6 +130,8 @@ public:
    bool IsItemDelimitor();
    bool IsSequenceDelimitor();   
 
+   virtual void Print (std::ostream & os = std::cout); 
+
 private:
    // FIXME: In fact we should be more specific and use :
    // friend DocEntry * Header::ReadNextElement(void);
@@ -165,9 +160,6 @@ protected:
    /// Offset from the begining of file for direct user access
    size_t Offset; 
 
-   /// How many details are to be printed (value : 0,1,2)      
-   int PrintLevel;
-
    /// \brief Generalized key of this DocEntry (for details on
    ///        the generalized key refer to \ref TagKey documentation).
    TagKey Key;
index 6c3cae411de043a786dca11aa64270e8887da1a9..32d99e194f08bda303cfae377822ba1672d954c9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 11:37:02 $
-  Version:   $Revision: 1.28 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  Version:   $Revision: 1.29 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -19,6 +19,7 @@
 #ifndef GDCMDOCENTRYSET_H
 #define GDCMDOCENTRYSET_H
 
+#include "gdcmBase.h"
 #include "gdcmException.h"
 #include <fstream>
 
@@ -54,18 +55,13 @@ typedef std::string BaseTagKey;
  *       members to this class since this class is designed as an adapter 
  *       in the form of an abstract base class.
  */
-class GDCM_EXPORT DocEntrySet
+class GDCM_EXPORT DocEntrySet : public Base
 {
 friend class File;
 public:
    DocEntrySet() {};
    virtual ~DocEntrySet() {};
 
-   /// \brief prints any type of entry to the entry set (pure vitual)
-   virtual void Print (std::ostream & os = std::cout) = 0;// pure virtual
-   /// Accessor to \ref PrintLevel
-   void SetPrintLevel(int level) { PrintLevel = level; }
-
    /// \brief adds any type of entry to the entry set (pure vitual)
    virtual bool AddEntry(DocEntry *Entry) = 0; // pure virtual
    virtual bool RemoveEntry(DocEntry *EntryToRemove)=0; // pure virtual
@@ -103,10 +99,6 @@ protected:
 // DictEntry  related utilities
    DictEntry *GetDictEntryByName  (TagName const & name);
    DictEntry *GetDictEntryByNumber(uint16_t, uint16_t);
-
-   /// \brief Amount of printed details for each Header Entry (Dicom Element):
-   /// 0 : stands for the least detail level.
-   int PrintLevel;
 };
 
 } // end namespace gdcm
index e5e627e436fe4b9390379491fc5f5c4a84e05339..6d5841a82f76ac4fbafeece947c4b0ac0ec2595e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/10 13:49:07 $
-  Version:   $Revision: 1.150 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  Version:   $Revision: 1.151 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -182,8 +182,6 @@ Document::Document( std::string const & filename ) : ElementSet(-1)
          SetEntryByNumber(rows   , 0x0028, 0x0011);
    }
    // ----------------- End of ACR-LibIDO kludge ------------------ 
-
-   PrintLevel = 1;  // 'Medium' print level by default
 }
 
 /**
@@ -198,7 +196,6 @@ Document::Document() : ElementSet(-1)
    Initialise();
    SwapCode = 0;
    Filetype = ExplicitVR;
-   PrintLevel = 1;  // 'Medium' print level by default
 }
 
 /**
@@ -222,6 +219,7 @@ Document::~Document ()
   */  
 void Document::PrintPubDict(std::ostream & os)
 {
+   RefPubDict->SetPrintLevel(PrintLevel);
    RefPubDict->Print(os);
 }
 
@@ -231,6 +229,7 @@ void Document::PrintPubDict(std::ostream & os)
   */
 void Document::PrintShaDict(std::ostream & os)
 {
+   RefShaDict->SetPrintLevel(PrintLevel);
    RefShaDict->Print(os);
 }
 
index fa33af292edb4988e759195859730f6abb3c35db..1f99df65691608fc99cd3f32b30297d768cdefd7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmElementSet.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 11:37:02 $
-  Version:   $Revision: 1.34 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  Version:   $Revision: 1.35 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -66,7 +66,10 @@ void ElementSet::Print(std::ostream& os)
    for( TagDocEntryHT::const_iterator i = TagHT.begin(); i != TagHT.end(); ++i)
    {
       DocEntry* entry = i->second;
+
+      entry->SetPrintLevel(PrintLevel);
       entry->Print(os);   
+
       if ( SeqEntry* seqEntry = dynamic_cast<SeqEntry*>(entry) )
       {
          (void)seqEntry;
index 336713c68cd5028d031927657ba75806ff3d1168..ae7e2ab2104f1676f472fbac18f1c5e91d80760a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 11:37:03 $
-  Version:   $Revision: 1.178 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  Version:   $Revision: 1.179 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -129,6 +129,8 @@ void File::Print(std::ostream &os)
 {
    HeaderInternal->SetPrintLevel(PrintLevel);
    HeaderInternal->Print(os);
+
+   PixelReadConverter->SetPrintLevel(PrintLevel);
    PixelReadConverter->Print(os);
 }
 
index 859a9949362d951071aaf670d00d7bb51bdd789a..d646cd01d8bb6137aaeec74e8c100b80718ee003 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 11:37:03 $
-  Version:   $Revision: 1.88 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  Version:   $Revision: 1.89 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -20,7 +20,7 @@
 #define GDCMFILE_H
 
 #include <iostream>
-#include "gdcmCommon.h"
+#include "gdcmBase.h"
 
 namespace gdcm 
 {
@@ -36,7 +36,7 @@ class DocEntryArchive;
  * for accessing the image/volume content. One can also use it to
  * write Dicom/ACR-NEMA/RAW files.
  */
-class GDCM_EXPORT File
+class GDCM_EXPORT File : public Base
 {
 public:
    enum FileMode
@@ -53,8 +53,6 @@ public:
    virtual ~File();
 
    void Print(std::ostream &os = std::cout); 
-   /// Accessor to \ref PrintLevel
-   void SetPrintLevel(int level) { PrintLevel = level; }
 
    /// Accessor to \ref Header
    Header* GetHeader() { return HeaderInternal; }
@@ -133,10 +131,6 @@ protected:
    ValEntry* CopyValEntry(uint16_t group,uint16_t element);
    BinEntry* CopyBinEntry(uint16_t group,uint16_t element);
 
-   /// \brief Amount of printed details for each Header Entry (Dicom Element):
-   /// 0 : stands for the least detail level.
-   int PrintLevel;
-
 private:
    void Initialise();
 
index da8d8d0fcd245d1dcfadf7491aa9bc1ef31c31bd..140a285700176c170d3ea587c9232fd815985b03 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelReadConvert.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/16 11:37:03 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  Version:   $Revision: 1.7 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -21,6 +21,7 @@
 #define GDCMPIXELREADCONVERT_H
 
 #include "gdcmCommon.h"
+#include "gdcmBase.h"
 #include "gdcmException.h"
 
 namespace gdcm
@@ -32,7 +33,7 @@ class JPEGFragmentsInfo;
  * \brief Utility container for gathering the various forms the pixel data
  *        migth take during the user demanded processes.
  */
-class GDCM_EXPORT PixelReadConvert
+class GDCM_EXPORT PixelReadConvert : public Base
 {
 public:
    PixelReadConvert();
index 6f070e5587f0cdaf9511119f2437bf0cd1bf67a8..c82cfd5b4bbfd5661866ba9dd2abbebabcf13b30 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelWriteConvert.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/07 09:32:24 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -21,6 +21,7 @@
 #define GDCMPIXELWRITECONVERT_H
 
 #include "gdcmCommon.h"
+#include "gdcmBase.h"
 
 namespace gdcm
 {
@@ -28,7 +29,7 @@ namespace gdcm
  * \brief Utility container for gathering the various forms the pixel data
  *        migth take during the user demanded processes.
  */
-class GDCM_EXPORT PixelWriteConvert
+class GDCM_EXPORT PixelWriteConvert : public Base
 {
 public:
    PixelWriteConvert();
index a95d8d16201296d1b01dba8971be46552d92fc8e..399c466f942ec3e43cde9b207791dec2d7ab2660 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/07 13:39:33 $
-  Version:   $Revision: 1.42 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  Version:   $Revision: 1.43 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -80,7 +80,7 @@ void SQItem::Print(std::ostream& os)
       bool PrintEndLine = true;
 
       os << s.str();
-      Entry->SetPrintLevel(2);
+      Entry->SetPrintLevel(PrintLevel);
       Entry->Print(os); 
       if ( SeqEntry* seqEntry = dynamic_cast<SeqEntry*>(Entry) )
       {
index f7669d3660d15a1b71542719fa90724704c1ac7e..25a2c2679d5d36d39e1a81717ca90ed3c05ce141 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSeqEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/02 15:14:18 $
-  Version:   $Revision: 1.39 $
+  Date:      $Date: 2004/12/16 13:46:37 $
+  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
@@ -84,8 +84,6 @@ SeqEntry::~SeqEntry()
 void SeqEntry::Print( std::ostream &os )
 {
    // First, Print the Dicom Element itself.
-   SetPrintLevel(2);   
-
    os << "S ";
    DocEntry::Print(os);
    os << std::endl;
@@ -96,6 +94,7 @@ void SeqEntry::Print( std::ostream &os )
    // Then, Print each SQ Item   
    for(ListSQItem::iterator cc = Items.begin(); cc != Items.end(); ++cc)
    {
+      (*cc)->SetPrintLevel(PrintLevel);
       (*cc)->Print(os);   
    }
 
@@ -108,6 +107,7 @@ void SeqEntry::Print( std::ostream &os )
       }
       if (SeqTerm != NULL)
       {
+         SeqTerm->SetPrintLevel(PrintLevel);
          SeqTerm->Print(os);
          os << std::endl;
       } 
index a3f17d8003475362dbbd9acddaaf415554e44ea6..6c10af843efc49b02aa7abf87c35f407a9df0b8e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmValEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/07 17:28:50 $
-  Version:   $Revision: 1.40 $
+  Date:      $Date: 2004/12/16 13:46:38 $
+  Version:   $Revision: 1.41 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -51,7 +51,6 @@ ValEntry::ValEntry(DocEntry* e)
    ReadLength   = e->GetReadLength();
    ImplicitVR   = e->IsImplicitVR();
    Offset       = e->GetOffset();
-   PrintLevel   = e->GetPrintLevel();
 }