gdcmDicomEntry.h

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmDicomEntry.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/08/22 16:14:03 $
00007   Version:   $Revision: 1.13 $
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 _GDCMDICOMENTRY_H_
00020 #define _GDCMDICOMENTRY_H_
00021 
00022 #include "gdcmCommon.h"
00023 #include "gdcmRefCounter.h"
00024 #include "gdcmVRKey.h"
00025 #include "gdcmTagKey.h"
00026 
00027 namespace GDCM_NAME_SPACE
00028 {
00029 //-----------------------------------------------------------------------------
00042 class GDCM_EXPORT DicomEntry : public RefCounter
00043 {
00044    gdcmTypeMacro(DicomEntry);
00045 
00046 public:
00047 // Print
00048    void Print(std::ostream &os = std::cout, std::string const &indent = "");
00049 
00052    const uint16_t &GetGroup() const { return Tag[0]; }
00053 
00056    const uint16_t &GetElement() const { return Tag[1]; }
00057 
00060    const TagKey &GetKey() const { return Tag; }
00061    
00064    virtual void SetVR(VRKey const &vr) { VR = vr; }
00067    const VRKey &GetVR() const { return VR; }
00070    bool IsVRUnknown() const { return VR == GDCM_VRUNKNOWN; }
00071 
00072    const TagKey &GetKey() const { return Tag; }
00073 
00074 // Key creation
00075    static TagKey TranslateToKey(uint16_t group, uint16_t elem)
00076                                 { return TagKey(group,elem); }
00077 
00078 protected:
00079    DicomEntry(const uint16_t &group,const uint16_t &elt,
00080               const VRKey &vr = GDCM_VRUNKNOWN);
00081    ~DicomEntry();
00082 
00083 private:
00085    TagKey Tag;
00086 
00091    VRKey VR;
00092 };
00093 } // end namespace gdcm
00094 //-----------------------------------------------------------------------------
00095 #endif

Generated on Fri Aug 24 12:53:13 2007 for gdcm by  doxygen 1.4.6