X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDocument.h;h=28996c2817506e42b261b940cc7d8e796ca54974;hb=01f14ba7d0d9eee2b8f0a768efd116e26023be12;hp=a30134513beab8b6c41c533e524cd78fb971fa9b;hpb=3f8964856e65c2447beab900b04a63d003192bf9;p=gdcm.git diff --git a/src/gdcmDocument.h b/src/gdcmDocument.h index a3013451..28996c28 100644 --- a/src/gdcmDocument.h +++ b/src/gdcmDocument.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.h,v $ Language: C++ - Date: $Date: 2005/11/15 10:30:46 $ - Version: $Revision: 1.131 $ + Date: $Date: 2006/05/30 08:10:19 $ + Version: $Revision: 1.141 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -23,6 +23,8 @@ #include "gdcmDict.h" #include "gdcmElementSet.h" #include "gdcmException.h" +#include "gdcmDebug.h" // for LEGACY +#include "gdcmCommandManager.h" #include #include @@ -46,7 +48,9 @@ public: // Loading //Deprecated : use SetFileName() + Load() - virtual bool Load( std::string const &filename ); +//#ifndef GDCM_LEGACY_REMOVE +// virtual bool Load( std::string const &filename ); +//#endif virtual bool Load( ); // Dictionaries @@ -81,11 +85,11 @@ public: bool CloseFile(); void WriteContent( std::ofstream *fp, FileType type ); -// Content entries +// Data entries virtual void LoadEntryBinArea(uint16_t group, uint16_t elem); virtual void LoadEntryBinArea(DataEntry *entry); - void LoadDocEntrySafe(DocEntry *entry); + void SetMaxSizeLoadEntry(long); void AddForceLoadElement(uint16_t group, uint16_t elem); // Ordering of Documents @@ -110,10 +114,16 @@ protected: // gdcm::DicomDir are meaningfull). Document(); virtual ~Document(); - + + virtual void CallStartMethod(); + virtual void CallProgressMethod(); + virtual void CallEndMethod(); + uint16_t ReadInt16() throw ( FormatError ); uint32_t ReadInt32() throw ( FormatError ); - void SkipBytes(uint32_t); + + /// \brief skips bytes inside the source file + void SkipBytes(uint32_t nBytes) { Fp->seekg((long)nBytes, std::ios::cur);} int ComputeGroup0002Length( ); // Variables @@ -175,7 +185,7 @@ protected: private: // Methods void Initialize(); - bool DoTheLoadingDocumentJob(); + bool DoTheLoadingDocumentJob(); // System access (meaning endian related !?) uint16_t SwapShort(uint16_t); @@ -206,7 +216,6 @@ private: bool CheckSwap(); void SwitchByteSwapCode(); - void SetMaxSizeLoadEntry(long); // DocEntry related utilities DocEntry *ReadNextDocEntry(); @@ -216,6 +225,11 @@ private: DocEntry *Backtrack(DocEntry *docEntry); // Variables +protected: + /// value of the ??? for any progress bar + float Progress; + mutable bool Abort; + /// Public dictionary used to parse this header Dict *RefPubDict; /// \brief Optional "shadow dictionary" (private elements) used to parse