Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | 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/11/29 12:48:46 $
00007   Version:   $Revision: 1.59 $
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 "gdcmRefCounter.h"
00023 #include "gdcmDictEntry.h"
00024 
00025 #include <iostream>
00026 #include <fstream>
00027 
00028 namespace gdcm 
00029 {
00030 class File;
00031 class SeqEntry;
00032 
00033 //-----------------------------------------------------------------------------
00038 class GDCM_EXPORT DocEntry : public RefCounter
00039 {
00040    gdcmTypeMacro(DocEntry);
00041 
00042 public:
00043    virtual void Print (std::ostream &os = std::cout, std::string const &indent = ""); 
00044    virtual void WriteContent(std::ofstream *fp, FileType filetype);
00045 
00048    DictEntry * GetDictEntry() { return DicomDict; } 
00049 
00051    const uint16_t &GetGroup() const   { return DicomDict->GetGroup();  }
00052 
00054    const uint16_t &GetElement() const { return DicomDict->GetElement();}
00055 
00057    TagKey GetKey() const { return DicomDict->GetKey(); }
00058 
00061    std::string const &GetName() const { return DicomDict->GetName(); }
00062 
00066    VRKey const &GetVR() const { return DicomDict->GetVR(); }
00067 
00071    std::string const &GetVM() const { return DicomDict->GetVM(); }
00072 
00074    void SetVM( TagName const &v) { DicomDict->SetVM(v); } 
00075 
00079    const size_t &GetOffset() const { return Offset; }
00080 
00083    void SetReadLength(uint32_t l) { ReadLength = l; }
00088    const uint32_t &GetReadLength() const { return ReadLength; }
00089 
00092    virtual void SetLength(uint32_t l) { Length = l; }
00096    const uint32_t &GetLength() const { return Length; }
00097 
00098    uint32_t GetFullLength();
00099    virtual uint32_t ComputeFullLength() = 0;
00100 
00101 // The following 3 members, for internal use only ! 
00105    void SetOffset(size_t of) { Offset = of; }
00106 
00108    void SetImplicitVR() { ImplicitVR = true; }
00109  
00112    bool IsImplicitVR() const { return ImplicitVR; }
00113 
00116    bool IsVRUnknown() const { return DicomDict->IsVRUnknown(); }
00117 
00120    bool IsVMUnknown() const { return DicomDict->IsVMUnknown(); }
00121 
00122    bool IsItemDelimitor();
00123    bool IsItemStarter();
00124    bool IsSequenceDelimitor();   
00125 
00126    virtual void Copy(DocEntry *doc);
00127 
00128 protected:
00129    DocEntry(DictEntry*);
00130    virtual ~DocEntry();
00131 
00133    DictEntry *DicomDict;
00134    
00137    uint32_t Length; 
00138   
00140    uint32_t ReadLength;
00141 
00145    bool ImplicitVR;
00146 
00148    size_t Offset; 
00149 
00150 private:
00151 };
00152 } // end namespace gdcm
00153 //-----------------------------------------------------------------------------
00154 #endif

Generated on Fri Jan 20 10:14:24 2006 for gdcm by  doxygen 1.4.4