GDCM_NAME_SPACE::DictEntry Class Reference

the DictEntry in an element contained by the Dict. It contains : More...

#include <gdcmDictEntry.h>

Inheritance diagram for GDCM_NAME_SPACE::DictEntry:

Inheritance graph
[legend]
Collaboration diagram for GDCM_NAME_SPACE::DictEntry:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void Print (std::ostream &os=std::cout, std::string const &indent="")
 Prints an entry of the Dicom DictionaryEntry.
const uint16_t & GetGroup () const
 Returns the Dicom Group Number.
const uint16_t & GetElement () const
 Returns the Dicom Element Number.
virtual void SetVR (VRKey const &vr)
 Set the Dicom Value Representation.
const VRKeyGetVR () const
 Returns the Dicom Value Representation.
bool IsVRUnknown () const
 tells if the V(alue) R(epresentation) is known (?!)
const TagKeyGetKey () const
const TagNameGetVM () const
 returns the VM field of the current DictEntry
virtual void SetVM (TagName const &vm)
 Set the VM field of the current DictEntry.
bool IsVMUnknown () const
 tells if the V(alue) M(ultiplicity) is known (?!)
const TagNameGetName () const
 Returns the Dicom Name of the current DictEntry e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010).
void Delete ()
 Delete the object.
void Register ()
 Register the object.
void Unregister ()
 Unregister the object.
const unsigned long & GetRefCount () const
 Get the reference counting.
void SetPrintLevel (int level)
 Sets the print level for the Dicom Header Elements.
int GetPrintLevel ()
 Gets the print level for the Dicom Entries.

Static Public Member Functions

static DictEntryNew (uint16_t group, uint16_t elem, VRKey const &vr=GDCM_VRUNKNOWN, TagName const &vm=GDCM_UNKNOWN, TagName const &name=GDCM_UNKNOWN)
 Class allocator.
static TagKey TranslateToKey (uint16_t group, uint16_t elem)
 concatenates 2 uint16_t (supposed to be a Dicom group number and a Dicom element number)

Protected Member Functions

 DictEntry (uint16_t group, uint16_t elem, VRKey const &vr=GDCM_VRUNKNOWN, TagName const &vm=GDCM_UNKNOWN, TagName const &name=GDCM_UNKNOWN)
 Constructor.
 ~DictEntry ()
 Destructor.

Protected Attributes

int PrintLevel
 Amount of printed details for each Dicom Entries : 0 : stands for the least detail level.

Private Member Functions

 gdcmTypeMacro (DictEntry)

Private Attributes

TagKey Tag
 Dicom TagKey. Contains Dicom Group number and Dicom Element number.
VRKey VR
 Value Representation i.e. some clue about the nature of the data represented e.g.
  • "FD" short for "Floating Point Double"(see VR)
  • "PN" short for "Person Name".

TagName VM
 Value Multiplicity (e.g. "1", "1-n", "2-n", "6").
TagName Name
 English name of the entry (e.g. "Patient's Name").

Detailed Description

the DictEntry in an element contained by the Dict. It contains :

Definition at line 42 of file gdcmDictEntry.h.


Constructor & Destructor Documentation

GDCM_NAME_SPACE::DictEntry::DictEntry uint16_t  group,
uint16_t  elem,
VRKey const &  vr = GDCM_VRUNKNOWN,
TagName const &  vm = GDCM_UNKNOWN,
TagName const &  name = GDCM_UNKNOWN
[protected]
 

Constructor.

Parameters:
group DICOM-Group Number
elem DICOM-Element Number
vr Value Representation
vm Value Multiplicity
name description of the element

Definition at line 39 of file gdcmDictEntry.cxx.

References Name, GDCM_NAME_SPACE::TagKey::SetElement(), GDCM_NAME_SPACE::TagKey::SetGroup(), Tag, and VM.

Referenced by New().

00043 {
00044    Tag.SetGroup(group);
00045    Tag.SetElement(elem);
00046    VR      = vr;
00047    VM      = vm;
00048    Name    = name;
00049 }

GDCM_NAME_SPACE::DictEntry::~DictEntry  )  [protected]
 

Destructor.

Definition at line 54 of file gdcmDictEntry.cxx.

00055 {
00056 }


Member Function Documentation

void GDCM_NAME_SPACE::RefCounter::Delete  )  [inline, inherited]
 

Delete the object.

Remarks:
The object is deleted only if its reference counting is to zero

Definition at line 41 of file gdcmRefCounter.h.

Referenced by GDCM_NAME_SPACE::SerieHelper::AddFileName(), GDCM_NAME_SPACE::Document::Backtrack(), GDCM_NAME_SPACE::FileHelper::CheckMandatoryElements(), GDCM_NAME_SPACE::FileHelper::CheckMandatoryEntry(), GDCM_NAME_SPACE::FileHelper::CopyMandatoryEntry(), GDCM_NAME_SPACE::Dict::DoTheLoadingJob(), GDCM_NAME_SPACE::FillDefaultDataDict(), GDCM_NAME_SPACE::DicomDirObject::FillObject(), vtkGdcmReader::GetFileInformation(), GDCM_NAME_SPACE::DocEntrySet::InsertEntryBinArea(), GDCM_NAME_SPACE::DocEntrySet::InsertEntryString(), GDCM_NAME_SPACE::DocEntrySet::InsertSeqEntry(), vtkGdcmReader::LoadFileInformation(), GDCM_NAME_SPACE::DicomDir::NewMeta(), GDCM_NAME_SPACE::DicomDirStudy::NewVisit(), GDCM_NAME_SPACE::Document::ReadNextDocEntry(), GDCM_NAME_SPACE::DicomDir::SetElement(), GDCM_NAME_SPACE::FileHelper::SetMandatoryEntry(), GDCM_NAME_SPACE::FileHelper::SetWriteFileTypeToExplicitVR(), GDCM_NAME_SPACE::FileHelper::SetWriteFileTypeToImplicitVR(), GDCM_NAME_SPACE::FileHelper::SetWriteFileTypeToJPEG(), GDCM_NAME_SPACE::FileHelper::SetWriteFileTypeToJPEG2000(), GDCM_NAME_SPACE::FileHelper::SetWriteToLibido(), GDCM_NAME_SPACE::DicomDir::~DicomDir(), GDCM_NAME_SPACE::DictSet::~DictSet(), and GDCM_NAME_SPACE::Global::~Global().

00041 { Unregister(); }

GDCM_NAME_SPACE::DictEntry::gdcmTypeMacro DictEntry   )  [private]
 

const uint16_t& GDCM_NAME_SPACE::DictEntry::GetElement  )  const [inline]
 

Returns the Dicom Element Number.

Returns:
the Dicom Element Number

Definition at line 61 of file gdcmDictEntry.h.

00061 { return Tag[1]; }   

const uint16_t& GDCM_NAME_SPACE::DictEntry::GetGroup  )  const [inline]
 

Returns the Dicom Group Number.

Returns:
the Dicom Group Number

Definition at line 57 of file gdcmDictEntry.h.

00057 { return Tag[0]; }

const TagKey& GDCM_NAME_SPACE::DictEntry::GetKey  )  const [inline]
 

Definition at line 73 of file gdcmDictEntry.h.

Referenced by GDCM_NAME_SPACE::Dict::AddEntry(), and Print().

00073 { return Tag; }

const TagName& GDCM_NAME_SPACE::DictEntry::GetName  )  const [inline]
 

Returns the Dicom Name of the current DictEntry e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010).

Returns:
the Dicom Name

Definition at line 91 of file gdcmDictEntry.h.

Referenced by GDCM_NAME_SPACE::DocEntry::GetName(), and Print().

00091 { return Name; } 

int GDCM_NAME_SPACE::Base::GetPrintLevel  )  [inline, inherited]
 

Gets the print level for the Dicom Entries.

Definition at line 50 of file gdcmBase.h.

00050 { return PrintLevel; }

const unsigned long& GDCM_NAME_SPACE::RefCounter::GetRefCount  )  const [inline, inherited]
 

Get the reference counting.

Returns:
Reference count

Definition at line 59 of file gdcmRefCounter.h.

00060    {
00061       return RefCount;
00062    }

const TagName& GDCM_NAME_SPACE::DictEntry::GetVM  )  const [inline]
 

returns the VM field of the current DictEntry

Returns:
The 'Value Multiplicity' field

Definition at line 80 of file gdcmDictEntry.h.

Referenced by GDCM_NAME_SPACE::DocEntry::GetVM().

00080 { return VM; } 

const VRKey& GDCM_NAME_SPACE::DictEntry::GetVR  )  const [inline]
 

Returns the Dicom Value Representation.

Returns:
the Dicom Value Representation

Definition at line 68 of file gdcmDictEntry.h.

Referenced by GDCM_NAME_SPACE::DocEntrySet::InsertEntryString(), and GDCM_NAME_SPACE::Document::ReadNextDocEntry().

00068 { return VR; }

bool GDCM_NAME_SPACE::DictEntry::IsVMUnknown  )  const [inline]
 

tells if the V(alue) M(ultiplicity) is known (?!)

Returns:

Definition at line 86 of file gdcmDictEntry.h.

References GDCM_NAME_SPACE::GDCM_UNKNOWN.

00086 { return VM == GDCM_UNKNOWN; }

bool GDCM_NAME_SPACE::DictEntry::IsVRUnknown  )  const [inline]
 

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

Returns:

Definition at line 71 of file gdcmDictEntry.h.

References GDCM_NAME_SPACE::GDCM_VRUNKNOWN.

00071 { return VR == GDCM_VRUNKNOWN; }

DictEntry * GDCM_NAME_SPACE::DictEntry::New uint16_t  group,
uint16_t  elem,
VRKey const &  vr = GDCM_VRUNKNOWN,
TagName const &  vm = GDCM_UNKNOWN,
TagName const &  name = GDCM_UNKNOWN
[static]
 

Class allocator.

Parameters:
group DICOM-Group Number
elem DICOM-Element Number
vr Value Representation
vm Value Multiplicity
name description of the element

Definition at line 67 of file gdcmDictEntry.cxx.

References DictEntry().

Referenced by GDCM_NAME_SPACE::Dict::DoTheLoadingJob(), and GDCM_NAME_SPACE::FillDefaultDataDict().

00071 {
00072    return new DictEntry(group,elem,vr,vm,name);
00073 }

void GDCM_NAME_SPACE::DictEntry::Print std::ostream &  os = std::cout,
std::string const &  indent = ""
[virtual]
 

Prints an entry of the Dicom DictionaryEntry.

Parameters:
os ostream we want to print in
indent Indentation string to be prepended during printing

Reimplemented from GDCM_NAME_SPACE::Base.

Definition at line 103 of file gdcmDictEntry.cxx.

References GetKey(), GetName(), and GDCM_NAME_SPACE::Base::PrintLevel.

00104 {
00105    os << GetKey(); 
00106    os << " [" << VR  << "] ";
00107 
00108    std::ostringstream s;
00109 
00110    if ( PrintLevel >= 1 )
00111    {
00112       s.setf(std::ios::left);
00113       s << std::setw(66-GetName().length()) << " ";
00114    }
00115 
00116    s << "[" << GetName()<< "]";
00117    os << s.str() << std::endl;
00118 }

void GDCM_NAME_SPACE::RefCounter::Register  )  [inline, inherited]
 

Register the object.

Remarks:
It increments the reference counting

Definition at line 46 of file gdcmRefCounter.h.

Referenced by GDCM_NAME_SPACE::SQItem::AddEntry(), GDCM_NAME_SPACE::SeqEntry::AddSQItem(), GDCM_NAME_SPACE::SeqEntry::Copy(), GDCM_NAME_SPACE::DicomDir::Copy(), GDCM_NAME_SPACE::FileHelper::FileHelper(), GDCM_NAME_SPACE::DocEntrySet::GetDictEntry(), GDCM_NAME_SPACE::DocEntry::GetName(), GDCM_NAME_SPACE::DocEntry::GetVM(), GDCM_NAME_SPACE::DocEntrySet::InsertEntryString(), GDCM_NAME_SPACE::CommandManager::InSetCommand(), GDCM_NAME_SPACE::DocEntryArchive::Push(), and GDCM_NAME_SPACE::SeqEntry::SetDelimitationItem().

00046 { RefCount++; }

void GDCM_NAME_SPACE::Base::SetPrintLevel int  level  )  [inline, inherited]
 

Sets the print level for the Dicom Header Elements.

Note:
0 for Light Print; 1 for 'medium' Print, 2 for Heavy Print

Definition at line 47 of file gdcmBase.h.

Referenced by GDCM_NAME_SPACE::FileHelper::Print(), and GDCM_NAME_SPACE::DicomDir::Print().

00047 { PrintLevel = level; }

virtual void GDCM_NAME_SPACE::DictEntry::SetVM TagName const &  vm  )  [inline, virtual]
 

Set the VM field of the current DictEntry.

Parameters:
vm the'Value Multiplicity'

Definition at line 83 of file gdcmDictEntry.h.

00083 { VM = vm; }

virtual void GDCM_NAME_SPACE::DictEntry::SetVR VRKey const &  vr  )  [inline, virtual]
 

Set the Dicom Value Representation.

Parameters:
vr the Dicom Value Representation

Definition at line 65 of file gdcmDictEntry.h.

00065 { VR = vr; }

TagKey GDCM_NAME_SPACE::DictEntry::TranslateToKey uint16_t  group,
uint16_t  elem
[static]
 

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

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

Definition at line 82 of file gdcmDictEntry.cxx.

Referenced by GDCM_NAME_SPACE::ElementSet::GetDocEntry(), GDCM_NAME_SPACE::Dict::GetEntry(), GDCM_NAME_SPACE::DocEntry::Print(), GDCM_NAME_SPACE::DicomDirElement::Print(), GDCM_NAME_SPACE::File::ReadTag(), GDCM_NAME_SPACE::File::ReadTagLength(), and GDCM_NAME_SPACE::Dict::RemoveEntry().

00083 {
00084    // according to 'Purify', TranslateToKey is one of the most
00085    // time consuming methods.
00086    // Let's try to shorten it !
00087    return TagKey(group,elem);
00088 }

void GDCM_NAME_SPACE::RefCounter::Unregister  )  [inline, inherited]
 

Unregister the object.

Remarks:
It decrements the reference counting

Definition at line 50 of file gdcmRefCounter.h.

Referenced by GDCM_NAME_SPACE::Document::ReadNextDocEntry(), GDCM_NAME_SPACE::SQItem::RemoveEntry(), GDCM_NAME_SPACE::ElementSet::RemoveEntry(), and GDCM_NAME_SPACE::FileHelper::~FileHelper().

00051    {
00052 //std::cout <<"================Unreg " << typeid(*this).name() << std::endl;
00053       RefCount--;
00054       if(RefCount<=0)
00055         delete this;
00056    }


Member Data Documentation

TagName GDCM_NAME_SPACE::DictEntry::Name [private]
 

English name of the entry (e.g. "Patient's Name").

Definition at line 115 of file gdcmDictEntry.h.

Referenced by DictEntry().

int GDCM_NAME_SPACE::Base::PrintLevel [protected, inherited]
 

Amount of printed details for each Dicom Entries : 0 : stands for the least detail level.

Definition at line 55 of file gdcmBase.h.

Referenced by GDCM_NAME_SPACE::SeqEntry::Print(), GDCM_NAME_SPACE::FileHelper::Print(), GDCM_NAME_SPACE::ElementSet::Print(), GDCM_NAME_SPACE::DocEntry::Print(), Print(), GDCM_NAME_SPACE::DicomDirStudy::Print(), GDCM_NAME_SPACE::DicomDirSerie::Print(), GDCM_NAME_SPACE::DicomDirPatient::Print(), GDCM_NAME_SPACE::DicomDirMeta::Print(), GDCM_NAME_SPACE::DicomDir::Print(), and GDCM_NAME_SPACE::DataEntry::Print().

TagKey GDCM_NAME_SPACE::DictEntry::Tag [private]
 

Dicom TagKey. Contains Dicom Group number and Dicom Element number.

Definition at line 103 of file gdcmDictEntry.h.

Referenced by DictEntry().

TagName GDCM_NAME_SPACE::DictEntry::VM [private]
 

Value Multiplicity (e.g. "1", "1-n", "2-n", "6").

Definition at line 112 of file gdcmDictEntry.h.

Referenced by DictEntry().

VRKey GDCM_NAME_SPACE::DictEntry::VR [private]
 

Value Representation i.e. some clue about the nature of the data represented e.g.

  • "FD" short for "Floating Point Double"(see VR)
  • "PN" short for "Person Name".

Definition at line 109 of file gdcmDictEntry.h.


The documentation for this class was generated from the following files:
Generated on Fri Aug 24 13:01:38 2007 for gdcm by  doxygen 1.4.6