Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

gdcmDocEntry.h

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmDocEntry.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/02/04 14:49:01 $
00007   Version:   $Revision: 1.46 $
00008                                                                                 
00009   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
00010   l'Image). All rights reserved. See Doc/License.txt or
00011   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
00012                                                                                 
00013      This software is distributed WITHOUT ANY WARRANTY; without even
00014      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00015      PURPOSE.  See the above copyright notices for more information.
00016                                                                                 
00017 =========================================================================*/
00018 
00019 #ifndef GDCMDOCENTRY_H
00020 #define GDCMDOCENTRY_H
00021 
00022 #include "gdcmBase.h"
00023 #include "gdcmDictEntry.h"
00024 
00025 #include <iostream>
00026 #include <fstream>
00027 
00028 namespace gdcm 
00029 {
00030 class File;
00031 class ValEntry;
00032 class BinEntry;
00033 class SeqEntry;
00034 
00035 //-----------------------------------------------------------------------------
00040 class GDCM_EXPORT DocEntry : public Base
00041 {
00042 public:
00043    DocEntry(DictEntry*);
00045    virtual ~DocEntry() {};
00046 
00047    virtual void Print (std::ostream &os = std::cout, std::string const &indent = ""); 
00048    virtual void WriteContent(std::ofstream *fp, FileType filetype);
00049 
00052    DictEntry * GetDictEntry() { return DicomDict; }; 
00053 
00055    uint16_t      GetGroup()     { return DicomDict->GetGroup();  };
00056 
00058    uint16_t      GetElement()   { return DicomDict->GetElement();};
00059 
00061    void  SetKey( TagKey const &key ) { Key = key; }
00063    std::string const &GetKey() const { return Key; }
00064 
00067    std::string const &GetName() const { return DicomDict->GetName(); };
00068 
00072    std::string const &GetVR() const { return DicomDict->GetVR(); };
00073 
00077    std::string const &GetVM() const { return DicomDict->GetVM(); };
00078 
00080    void SetVM( TagName const &v) { DicomDict->SetVM(v); }; 
00081 
00085    size_t GetOffset() { return Offset; };
00086 
00089    void SetReadLength(uint32_t l) { ReadLength = l; };
00094    uint32_t GetReadLength() { return ReadLength; };
00095 
00098    void SetLength(uint32_t l) { Length = l; };
00102    uint32_t GetLength() { return Length; };
00103 
00104    uint32_t GetFullLength();
00105 
00106 // The following 3 members, for internal use only ! 
00110    void SetOffset(size_t of) { Offset = of; };
00111 
00113    void SetImplicitVR() { ImplicitVR = true; };
00114  
00117    bool IsImplicitVR() { return ImplicitVR; };
00118 
00121    bool IsVRUnknown() { return DicomDict->IsVRUnknown(); };
00122 
00125    bool IsVMUnknown() { return DicomDict->IsVMUnknown(); };
00126 
00127    bool IsItemDelimitor();
00128    bool IsSequenceDelimitor();   
00129    
00130    virtual void Copy(DocEntry *e);
00131 
00132 protected:
00134    DictEntry *DicomDict;
00135    
00138    uint32_t Length; 
00139   
00141    uint32_t ReadLength;
00142 
00146    bool ImplicitVR;
00147 
00149    size_t Offset; 
00150 
00153    TagKey Key;
00154 
00155 private:
00156 };
00157 } // end namespace gdcm
00158 //-----------------------------------------------------------------------------
00159 #endif

Generated on Thu Feb 10 22:17:30 2005 for gdcm by doxygen 1.3.6