From: regrain Date: Thu, 16 Dec 2004 13:46:36 +0000 (+0000) Subject: * src/gdcmBase.[h|cxx] : new base class. Contains the PrintLevel and an X-Git-Tag: Version1.0.bp~490 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=f5c7e83afd484a025285c64a09a89bd227087245;p=gdcm.git * src/gdcmBase.[h|cxx] : new base class. Contains the PrintLevel and an empty Print Method * Set the gdcm::Base class to some Printable classes -- BeNours --- diff --git a/ChangeLog b/ChangeLog index 57662535..59c1a0e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-12-16 Benoit Regrain + * 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 * src/gdcmFile.[h|cxx] : add the Print method * src/gdcmPixelReadConvert.[h|cxx] : add the generalized Print method diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9544053e..64b43646 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 index 00000000..6f4c0d55 --- /dev/null +++ b/src/gdcmBase.cxx @@ -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 index 00000000..e7b7abcc --- /dev/null +++ b/src/gdcmBase.h @@ -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 + +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 diff --git a/src/gdcmBinEntry.cxx b/src/gdcmBinEntry.cxx index b27d35cc..991d3a01 100644 --- a/src/gdcmBinEntry.cxx +++ b/src/gdcmBinEntry.cxx @@ -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(); diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index e5cc92d0..45839d9f 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -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); } } diff --git a/src/gdcmDicomDir.h b/src/gdcmDicomDir.h index 5aae1c91..4594450a 100644 --- a/src/gdcmDicomDir.h +++ b/src/gdcmDicomDir.h @@ -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 diff --git a/src/gdcmDicomDirElement.h b/src/gdcmDicomDirElement.h index 07bf7db3..859ce407 100644 --- a/src/gdcmDicomDirElement.h +++ b/src/gdcmDicomDirElement.h @@ -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); diff --git a/src/gdcmDicomDirMeta.cxx b/src/gdcmDicomDirMeta.cxx index 3942ee83..9c4a3cc8 100644 --- a/src/gdcmDicomDirMeta.cxx +++ b/src/gdcmDicomDirMeta.cxx @@ -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; } diff --git a/src/gdcmDicomDirObject.h b/src/gdcmDicomDirObject.h index efa3742b..52633eb5 100644 --- a/src/gdcmDicomDirObject.h +++ b/src/gdcmDicomDirObject.h @@ -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 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 diff --git a/src/gdcmDict.h b/src/gdcmDict.h index 6764bbd4..b7c3c5bc 100644 --- a/src/gdcmDict.h +++ b/src/gdcmDict.h @@ -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 @@ -46,7 +47,7 @@ typedef std::map @@ -37,7 +38,7 @@ typedef std::map 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(); diff --git a/src/gdcmDocEntry.cxx b/src/gdcmDocEntry.cxx index fcd2db28..db3461fe 100644 --- a/src/gdcmDocEntry.cxx +++ b/src/gdcmDocEntry.cxx @@ -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 } diff --git a/src/gdcmDocEntry.h b/src/gdcmDocEntry.h index 62757c34..52707ee1 100644 --- a/src/gdcmDocEntry.h +++ b/src/gdcmDocEntry.h @@ -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 @@ -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; diff --git a/src/gdcmDocEntrySet.h b/src/gdcmDocEntrySet.h index 6c3cae41..32d99e19 100644 --- a/src/gdcmDocEntrySet.h +++ b/src/gdcmDocEntrySet.h @@ -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 @@ -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 diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index e5e627e4..6d5841a8 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -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); } diff --git a/src/gdcmElementSet.cxx b/src/gdcmElementSet.cxx index fa33af29..1f99df65 100644 --- a/src/gdcmElementSet.cxx +++ b/src/gdcmElementSet.cxx @@ -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(entry) ) { (void)seqEntry; diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index 336713c6..ae7e2ab2 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -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); } diff --git a/src/gdcmFile.h b/src/gdcmFile.h index 859a9949..d646cd01 100644 --- a/src/gdcmFile.h +++ b/src/gdcmFile.h @@ -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 -#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(); diff --git a/src/gdcmPixelReadConvert.h b/src/gdcmPixelReadConvert.h index da8d8d0f..140a2857 100644 --- a/src/gdcmPixelReadConvert.h +++ b/src/gdcmPixelReadConvert.h @@ -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(); diff --git a/src/gdcmPixelWriteConvert.h b/src/gdcmPixelWriteConvert.h index 6f070e55..c82cfd5b 100644 --- a/src/gdcmPixelWriteConvert.h +++ b/src/gdcmPixelWriteConvert.h @@ -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(); diff --git a/src/gdcmSQItem.cxx b/src/gdcmSQItem.cxx index a95d8d16..399c466f 100644 --- a/src/gdcmSQItem.cxx +++ b/src/gdcmSQItem.cxx @@ -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(Entry) ) { diff --git a/src/gdcmSeqEntry.cxx b/src/gdcmSeqEntry.cxx index f7669d36..25a2c267 100644 --- a/src/gdcmSeqEntry.cxx +++ b/src/gdcmSeqEntry.cxx @@ -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; } diff --git a/src/gdcmValEntry.cxx b/src/gdcmValEntry.cxx index a3f17d80..6c10af84 100644 --- a/src/gdcmValEntry.cxx +++ b/src/gdcmValEntry.cxx @@ -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(); }