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

gdcmDictEntry Class Reference

#include <gdcmDictEntry.h>

List of all members.

Public Member Functions

 gdcmDictEntry (guint16 group, guint16 element, std::string vr="Unknown", std::string fourth="Unknown", std::string name="Unknown")
 Constructor.

void SetVR (std::string)
 If-and only if-the V(alue) R(epresentation) \ is unset then overwrite it.

bool IsVRUnknown ()
 tells if the V(alue) R(epresentation) is known (?!)

guint16 GetGroup (void)
 returns the Dicom Group Number of the current gdcmDictEntry return the Dicom Group Number

guint16 GetElement (void)
 returns the Dicom Element Number of the current gdcmDictEntry return the Dicom Element Number

std::string GetVR (void)
 returns the Dicom Value Representation of the current gdcmDictEntry return the Dicom Value Representation

void SetKey (std::string k)
 sets the key of the current gdcmDictEntry

std::string GetFourth (void)
 returns the Fourth field of the current gdcmDictEntry

std::string GetName (void)
 returns the Dicom Name of the current gdcmDictEntry \ e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010) return the Dicom Name

std::string GetKey (void)
 Gets the key of the current gdcmDictEntry.


Static Public Member Functions

TagKey TranslateToKey (guint16 group, guint16 element)
 concatenates 2 guint16 (supposed to be a Dicom group number and a Dicom element number)


Private Attributes

guint16 group
guint16 element
std::string vr
std::string fourth
std::string name
TagKey key


Constructor & Destructor Documentation

gdcmDictEntry::gdcmDictEntry guint16  InGroup,
guint16  InElement,
std::string  InVr = "Unknown",
std::string  InFourth = "Unknown",
std::string  InName = "Unknown"
 

Constructor.

Parameters:
InGroup DICOM-Group Number
InElement DICOM-Element Number
InVr Value Representatiion
InFourth // DO NOT use any longer; NOT part of the Dicom Standard
InName description of the element

Definition at line 21 of file gdcmDictEntry.cxx.

References element, fourth, key, name, TranslateToKey(), and vr.

00023                                                 {
00024         group   = InGroup;
00025         element = InElement;
00026         vr      = InVr;
00027         fourth  = InFourth;
00028         name    = InName;
00029         key     = TranslateToKey(group, element);
00030 }


Member Function Documentation

guint16 gdcmDictEntry::GetElement void   )  [inline]
 

returns the Dicom Element Number of the current gdcmDictEntry return the Dicom Element Number

Definition at line 52 of file gdcmDictEntry.h.

Referenced by gdcmParser::GetEntryByName(), gdcmObject::GetEntryByName(), gdcmParser::GetEntryVRByName(), gdcmParser::GetHeaderEntryByName(), and gdcmParser::SetEntryByName().

00052 { return element; }

std::string gdcmDictEntry::GetFourth void   )  [inline]
 

returns the Fourth field of the current gdcmDictEntry

Warning:
NOT part of the Dicom Standard \ May be REMOVED an any time \ NEVER use it return the Fourth field

Definition at line 76 of file gdcmDictEntry.h.

00076 { return fourth; } 

guint16 gdcmDictEntry::GetGroup void   )  [inline]
 

returns the Dicom Group Number of the current gdcmDictEntry return the Dicom Group Number

Definition at line 45 of file gdcmDictEntry.h.

Referenced by gdcmParser::GetEntryByName(), gdcmObject::GetEntryByName(), gdcmParser::GetEntryVRByName(), gdcmParser::GetHeaderEntryByName(), and gdcmParser::SetEntryByName().

00045 { return group; }

std::string gdcmDictEntry::GetKey void   )  [inline]
 

Gets the key of the current gdcmDictEntry.

Returns:
the key .

Definition at line 91 of file gdcmDictEntry.h.

Referenced by gdcmDict::AddNewEntry(), and gdcmDict::ReplaceEntry().

00091 { return key; }

std::string gdcmDictEntry::GetName void   )  [inline]
 

returns the Dicom Name of the current gdcmDictEntry \ e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010) return the Dicom Name

Definition at line 84 of file gdcmDictEntry.h.

Referenced by gdcmDict::RemoveEntry().

00084 { return name; } 

std::string gdcmDictEntry::GetVR void   )  [inline]
 

returns the Dicom Value Representation of the current gdcmDictEntry return the Dicom Value Representation

Definition at line 59 of file gdcmDictEntry.h.

Referenced by gdcmDicomDir::SetElement(), and gdcmParser::UpdateShaEntries().

00059 { return vr; }

bool gdcmDictEntry::IsVRUnknown  )  [inline]
 

tells if the V(alue) R(epresentation) is known (?!)

Returns:

Definition at line 38 of file gdcmDictEntry.h.

Referenced by gdcmHeaderEntry::IsVRUnknown(), and SetVR().

00038 {return vr == "??"; }

void gdcmDictEntry::SetKey std::string  k  )  [inline]
 

sets the key of the current gdcmDictEntry

Parameters:
k New key to be set.

Definition at line 66 of file gdcmDictEntry.h.

00066 { key = k; }

void gdcmDictEntry::SetVR std::string  NewVr  ) 
 

If-and only if-the V(alue) R(epresentation) \ is unset then overwrite it.

Parameters:
NewVr New V(alue) R(epresentation) to be set.

Definition at line 63 of file gdcmDictEntry.cxx.

References dbg, gdcmDebug::Error(), IsVRUnknown(), and vr.

00064 {
00065         if ( IsVRUnknown() )
00066                 vr = NewVr;
00067         else 
00068    {
00069                 dbg.Error(true, "gdcmDictEntry::SetVR",
00070                           "Overwriting vr might compromise a dictionary");
00071         }
00072 }

TagKey gdcmDictEntry::TranslateToKey guint16  group,
guint16  element
[static]
 

concatenates 2 guint16 (supposed to be a Dicom group number and a Dicom element number)

Parameters:
group the Dicom group number used to build the tag
element the Dicom element number used to build the tag
Returns:
the built tag

Definition at line 46 of file gdcmDictEntry.cxx.

References key, and TagKey.

Referenced by gdcmParser::CheckIfEntryExistByNumber(), gdcmDictEntry(), gdcmHeader::gdcmHeader(), gdcmParser::GenerateFreeTagKeyInGroup(), gdcmDict::GetDictEntryByNumber(), gdcmParser::GetEntryByNumber(), gdcmParser::GetHeaderEntryByNumber(), gdcmParser::GetHeaderEntrySameNumber(), gdcmHeader::GetPixelAreaLength(), gdcmHeader::GetPixelOffset(), gdcmDictSet::NewVirtualDictEntry(), gdcmParser::SetEntryByNumber(), gdcmParser::SetEntryLengthByNumber(), gdcmParser::SetEntryVoidAreaByNumber(), and gdcmFile::WriteBase().

00046                                                                    {
00047         char trash[10];
00048         TagKey key;
00049         // CLEAN ME: better call the iostream<< with the hex manipulator on.
00050         // This requires some reading of the stdlibC++ sources to make the
00051         // proper call (or copy).
00052         sprintf(trash, "%04x|%04x", group , element);
00053         key = trash;  // Convertion through assignement
00054         return key;
00055 }


Member Data Documentation

guint16 gdcmDictEntry::element [private]
 

Definition at line 98 of file gdcmDictEntry.h.

Referenced by gdcmDictEntry().

std::string gdcmDictEntry::fourth [private]
 

Definition at line 103 of file gdcmDictEntry.h.

Referenced by gdcmDictEntry().

guint16 gdcmDictEntry::group [private]
 

Definition at line 97 of file gdcmDictEntry.h.

TagKey gdcmDictEntry::key [private]
 

Definition at line 106 of file gdcmDictEntry.h.

Referenced by gdcmDictEntry(), and TranslateToKey().

std::string gdcmDictEntry::name [private]
 

Definition at line 105 of file gdcmDictEntry.h.

Referenced by gdcmDictEntry().

std::string gdcmDictEntry::vr [private]
 

Definition at line 99 of file gdcmDictEntry.h.

Referenced by gdcmDictEntry(), and SetVR().


The documentation for this class was generated from the following files:
Generated on Mon Feb 14 16:13:37 2005 for gdcm by doxygen 1.3.6