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

gdcm::SeqEntry Class Reference

a SeqEntry (as opposed to a ValEntry) is a non elementary DocEntry. It is composed by a set of SQItems. Each SQItem is composed by a set of DocEntry A DocEntry may be a SeqEntry ... and so forth More...

#include <gdcmSeqEntry.h>

Inheritance diagram for gdcm::SeqEntry:

gdcm::DocEntry gdcm::Base List of all members.

Public Member Functions

 SeqEntry (DictEntry *e)
 Constructor from a given SeqEntry.

 SeqEntry (DocEntry *d, int depth)
 Constructor from a given DocEntry.

 ~SeqEntry ()
 Canonical destructor.

void Print (std::ostream &os=std::cout, std::string const &indent="")
 canonical Printer

void WriteContent (std::ofstream *fp, FileType filetype)
 Writes the common part of any ValEntry, BinEntry, SeqEntry.

void AddSQItem (SQItem *it, int itemNumber)
 adds the passed ITEM to the ITEM chained List for this SeQuence.

void ClearSQItem ()
 Remove all SQItem.

SQItemGetFirstSQItem ()
 Get the first entry while visiting the SeqEntry.

SQItemGetNextSQItem ()
 Get the next SQItem while visiting the SeqEntry.

SQItemGetSQItem (int itemNumber)
 return a pointer to the SQItem referenced by its ordinal number. Returns the first item when argument is negative. Returns the last item when argument is bigger than the total item number.

unsigned int GetNumberOfSQItems ()
 returns the number of SQItems within the current Sequence

void SetDelimitorMode (bool dm)
 Sets the delimitor mode.

void SetDelimitationItem (DocEntry *e)
 Sets the Sequence Delimitation Item.

DocEntryGetDelimitationItem ()
 Gets the Sequence Delimitation Item.

int GetDepthLevel () const
 Gets the depth level.

void SetDepthLevel (int depth)
 Sets the depth level of a Sequence Entry embedded in a SeQuence.

DictEntryGetDictEntry ()
 Gets the DicEntry of the current Dicom entry.

uint16_t GetGroup ()
 Returns the Dicom Group number of the current Dicom entry.

uint16_t GetElement ()
 Returns the Dicom Element number of the current Dicom entry.

void SetKey (TagKey const &key)
 Set the 'key' of the current Dicom entry.

std::string const & GetKey () const
 Returns the 'key' of the current Dicom entry.

std::string const & GetName () const
 Returns the 'Name' '(e.g. "Patient's Name") found in the Dicom Dictionnary of the current Dicom Header Entry.

std::string const & GetVR () const
 Returns the 'Value Representation' (e.g. "PN" : Person Name, "SL" : Signed Long), found in the Dicom header or in the Dicom Dictionnary, of the current Dicom entry.

std::string const & GetVM () const
 Returns the 'Value Multiplicity' (e.g. "1", "1-n", "6"), found in the Dicom entry or in the Dicom Dictionnary of the current Dicom entry.

void SetVM (TagName const &v)
 Sets the 'Value Multiplicity' of the current Dicom entry.

size_t GetOffset ()
 Returns offset (since the beginning of the file, including the File Preamble, if any) of the value of the current Dicom entry.

void SetReadLength (uint32_t l)
 Sets only 'Read Length' (*not* 'Usable Length') of the current Dicom entry.

uint32_t GetReadLength ()
 Returns the 'read length' of the current Dicom entry.

void SetLength (uint32_t l)
 Sets both 'Read Length' and 'Usable Length' of the current Dicom entry.

uint32_t GetLength ()
 Returns the actual value length of the current Dicom entry.

uint32_t GetFullLength ()
 Gets the full length of the elementary DocEntry (not only value length) depending on the VR.

void SetOffset (size_t of)
 Sets the offset of the Dicom entry.

void SetImplicitVR ()
 Sets to TRUE the ImplicitVr flag of the current Dicom entry.

bool IsImplicitVR ()
 Tells us if the current Dicom entry was checked as ImplicitVr.

bool IsVRUnknown ()
 Tells us if the VR of the current Dicom entry is Unknown.

bool IsVMUnknown ()
 Tells us if the VM of the current Dicom entry is Unknown.

bool IsItemDelimitor ()
 tells us if entry is the last one of a 'no length' SequenceItem (fffe,e00d)

bool IsSequenceDelimitor ()
 tells us if entry is the last one of a 'no length' Sequence (fffe,e0dd)

virtual void Copy (DocEntry *e)
 Copies all the attributes from an other DocEntry.

void SetPrintLevel (int level)
 Sets the print level for the Dicom Header Elements.

int GetPrintLevel ()
 Gets the print level for the Dicom Entries.


Protected Attributes

DictEntryDicomDict
 pointer to the underlying Dicom dictionary element

uint32_t Length
 Correspond to the real length of the data This length might always be even.

uint32_t ReadLength
 Length to read in the file to obtain data.

bool ImplicitVR
 Even when reading explicit vr files, some elements happen to be implicit. Flag them here since we can't use the entry->vr without breaking the underlying dictionary.

size_t Offset
 Offset from the beginning of file for direct user access.

TagKey Key
 Generalized key of this DocEntry (for details on the generalized key refer to TagKey documentation).

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


Private Attributes

bool DelimitorMode
 If this Sequence is in delimitor mode (length =0xffffffff) or not.

ListSQItem Items
 Chained list of SQ Items.

ListSQItem::iterator ItSQItem
 iterator on the SQItems of the current SeqEntry

DocEntrySeqTerm
 sequence terminator item

int SQDepthLevel
 Defines the depth level of this SeqEntry inside the (optionaly) nested sequences. SQDepthLevel and its SQItem::SQDepthLevel counterpart are only defined on printing purposes (see Print).


Detailed Description

a SeqEntry (as opposed to a ValEntry) is a non elementary DocEntry. It is composed by a set of SQItems. Each SQItem is composed by a set of DocEntry A DocEntry may be a SeqEntry ... and so forth

Definition at line 40 of file gdcmSeqEntry.h.


Constructor & Destructor Documentation

gdcm::SeqEntry::SeqEntry DictEntry e  ) 
 

Constructor from a given SeqEntry.

Definition at line 38 of file gdcmSeqEntry.cxx.

References DelimitorMode, SeqTerm, and SQDepthLevel.

00039              : DocEntry(e)
00040 {
00041    Length       = 0;
00042    ReadLength   = 0xffffffff;
00043    SQDepthLevel = -1;
00044 
00045    DelimitorMode = false;
00046    SeqTerm  = NULL;
00047 }

gdcm::SeqEntry::SeqEntry DocEntry e,
int  depth
 

Constructor from a given DocEntry.

Parameters:
e Pointer to existing Doc entry
depth depth level of the current Seq entry

Definition at line 54 of file gdcmSeqEntry.cxx.

References gdcm::DocEntry::GetOffset(), gdcm::DocEntry::ImplicitVR, gdcm::DocEntry::IsImplicitVR(), SeqTerm, and SQDepthLevel.

00055              : DocEntry( e->GetDictEntry() )
00056 {
00057    Length       = 0;
00058    ReadLength   = 0xffffffff;
00059    SQDepthLevel = depth;
00060 
00061    ImplicitVR   = e->IsImplicitVR();
00062    Offset       = e->GetOffset();
00063    SeqTerm = NULL;
00064 }

gdcm::SeqEntry::~SeqEntry  ) 
 

Canonical destructor.

Definition at line 69 of file gdcmSeqEntry.cxx.

References ClearSQItem().

00070 {
00071    ClearSQItem();
00072 }


Member Function Documentation

void gdcm::SeqEntry::AddSQItem SQItem sqItem,
int  itemNumber
 

adds the passed ITEM to the ITEM chained List for this SeQuence.

Parameters:
sqItem SQItem to be pushed back in the SeqEntry
itemNumber ordinal number of the SQItem
Note:
NOT end-user intendend method !

Definition at line 111 of file gdcmSeqEntry.cxx.

References Items, and gdcm::SQItem::SetSQItemNumber().

Referenced by gdcm::Document::ParseSQ().

00112 {
00113 // FIXME : SQItemNumber is supposed to be the ordinal number of the SQItem
00114 //         within the Sequence.
00115 //         Either only 'push_back' is allowed, 
00116 //                and we just have to do something like SeqEntry::lastNb++
00117 //         Or we can add (or remove) anywhere, and SQItemNumber will be broken
00118    sqItem->SetSQItemNumber(itemNumber);
00119    Items.push_back(sqItem);
00120 }

void gdcm::SeqEntry::ClearSQItem  ) 
 

Remove all SQItem.

Definition at line 125 of file gdcmSeqEntry.cxx.

References Items, and SeqTerm.

Referenced by ~SeqEntry().

00126 {
00127    for(ListSQItem::iterator cc = Items.begin(); cc != Items.end(); ++cc)
00128    {
00129       delete *cc;
00130    }
00131    if (SeqTerm)
00132    {
00133       delete SeqTerm;
00134    }
00135 }

void gdcm::DocEntry::Copy DocEntry doc  )  [virtual, inherited]
 

Copies all the attributes from an other DocEntry.

Parameters:
doc entry to copy from

Reimplemented in gdcm::ContentEntry.

Definition at line 193 of file gdcmDocEntry.cxx.

References gdcm::DocEntry::ImplicitVR, gdcm::DocEntry::Length, gdcm::DocEntry::Offset, and gdcm::DocEntry::ReadLength.

00194 {
00195    Length     = doc->Length;
00196    ReadLength = doc->ReadLength;
00197    ImplicitVR = doc->ImplicitVR;
00198    Offset     = doc->Offset;
00199 }

DocEntry* gdcm::SeqEntry::GetDelimitationItem  )  [inline]
 

Gets the Sequence Delimitation Item.

Definition at line 65 of file gdcmSeqEntry.h.

00065 { return SeqTerm;}

int gdcm::SeqEntry::GetDepthLevel  )  const [inline]
 

Gets the depth level.

Definition at line 68 of file gdcmSeqEntry.h.

Referenced by gdcm::Document::ParseSQ().

00068 { return SQDepthLevel; }

DictEntry* gdcm::DocEntry::GetDictEntry  )  [inline, inherited]
 

Gets the DicEntry of the current Dicom entry.

Returns:
The DicEntry of the current Dicom entry

Definition at line 52 of file gdcmDocEntry.h.

Referenced by gdcm::FileHelper::CopyBinEntry(), gdcm::FileHelper::CopyValEntry(), gdcm::DocEntryArchive::Push(), and gdcm::FileHelper::SetWriteToLibido().

00052 { return DicomDict; }; 

uint16_t gdcm::DocEntry::GetElement  )  [inline, inherited]
 

Returns the Dicom Element number of the current Dicom entry.

Definition at line 58 of file gdcmDocEntry.h.

Referenced by gdcm::SQItem::AddEntry(), gdcm::Document::ComputeGroup0002Length(), gdcm::Document::FixDocEntryFoundLength(), gdcm::Document::IsDocEntryAnInteger(), gdcm::DocEntry::IsItemDelimitor(), gdcm::DocEntry::IsSequenceDelimitor(), gdcm::Document::ParseDES(), gdcm::ValEntry::Print(), gdcm::DocEntry::Print(), gdcm::Document::ReadNextDocEntry(), and gdcm::DocEntry::WriteContent().

00058 { return DicomDict->GetElement();};

SQItem * gdcm::SeqEntry::GetFirstSQItem  ) 
 

Get the first entry while visiting the SeqEntry.

Returns:
The first SQItem if found, otherwhise NULL

Definition at line 141 of file gdcmSeqEntry.cxx.

References Items, and ItSQItem.

Referenced by gdcm::DicomDir::CreateDicomDir().

00142 {
00143    ItSQItem = Items.begin();
00144    if (ItSQItem != Items.end())
00145       return *ItSQItem;
00146    return NULL;
00147 } 

uint32_t gdcm::DocEntry::GetFullLength  )  [inherited]
 

Gets the full length of the elementary DocEntry (not only value length) depending on the VR.

Definition at line 150 of file gdcmDocEntry.cxx.

References gdcm::DocEntry::GetReadLength(), gdcm::DocEntry::GetVR(), and gdcm::DocEntry::IsImplicitVR().

00151 {
00152    uint32_t l = GetReadLength();
00153    if ( IsImplicitVR() )
00154    {
00155       l = l + 8;  // 2 (gr) + 2 (el) + 4 (lgth) 
00156    }
00157    else
00158    {
00159       if ( GetVR()=="OB" || GetVR()=="OW" || GetVR()=="SQ" )
00160       {
00161          l = l + 12; // 2 (gr) + 2 (el) + 2 (vr) + 2 (unused) + 4 (lgth)
00162       }
00163       else
00164       {
00165          l = l + 8;  // 2 (gr) + 2 (el) + 2 (vr) + 2 (lgth)
00166       }
00167    }
00168    return l;
00169 }

uint16_t gdcm::DocEntry::GetGroup  )  [inline, inherited]
 

Returns the Dicom Group number of the current Dicom entry.

Definition at line 55 of file gdcmDocEntry.h.

Referenced by gdcm::SQItem::AddEntry(), gdcm::Document::ComputeGroup0002Length(), gdcm::Document::FixDocEntryFoundLength(), gdcm::Document::IsDocEntryAnInteger(), gdcm::DocEntry::IsItemDelimitor(), gdcm::DocEntry::IsSequenceDelimitor(), gdcm::Document::LoadDocEntry(), gdcm::Document::ParseDES(), gdcm::ValEntry::Print(), gdcm::DocEntry::Print(), gdcm::Document::ReadNextDocEntry(), gdcm::Document::SkipToNextDocEntry(), gdcm::ValEntry::WriteContent(), gdcm::DocEntry::WriteContent(), and gdcm::BinEntry::WriteContent().

00055 { return DicomDict->GetGroup();  };

std::string const& gdcm::DocEntry::GetKey  )  const [inline, inherited]
 

Returns the 'key' of the current Dicom entry.

Definition at line 63 of file gdcmDocEntry.h.

Referenced by gdcm::ElementSet::AddEntry(), gdcm::Document::ParseDES(), gdcm::Document::ParseSQ(), gdcm::SQItem::RemoveEntry(), gdcm::ElementSet::RemoveEntry(), gdcm::SQItem::RemoveEntryNoDestroy(), and gdcm::ElementSet::RemoveEntryNoDestroy().

00063 { return Key; }

uint32_t gdcm::DocEntry::GetLength  )  [inline, inherited]
 

Returns the actual value length of the current Dicom entry.

Warning:
this value is not *always* the one stored in the Dicom header in case of well knowned bugs

Definition at line 102 of file gdcmDocEntry.h.

Referenced by gdcm::File::AnonymizeNoLoad(), gdcm::Document::ComputeGroup0002Length(), gdcm::Document::GetDocEntryValue(), gdcm::DocEntrySet::GetEntryLength(), gdcm::File::GetPixelAreaLength(), gdcm::Document::IsDocEntryAnInteger(), gdcm::Document::LoadDocEntry(), gdcm::Document::LoadEntryBinArea(), gdcm::ValEntry::Print(), gdcm::BinEntry::Print(), gdcm::Document::SkipDocEntry(), gdcm::ValEntry::WriteContent(), gdcm::DocEntry::WriteContent(), and gdcm::BinEntry::WriteContent().

00102 { return Length; };

std::string const& gdcm::DocEntry::GetName  )  const [inline, inherited]
 

Returns the 'Name' '(e.g. "Patient's Name") found in the Dicom Dictionnary of the current Dicom Header Entry.

Definition at line 67 of file gdcmDocEntry.h.

Referenced by gdcm::DocEntry::Print().

00067 { return DicomDict->GetName(); };

SQItem * gdcm::SeqEntry::GetNextSQItem  ) 
 

Get the next SQItem while visiting the SeqEntry.

Note:
: meaningfull only if GetFirstEntry already called
Returns:
The next SQItem if found, otherwhise NULL

Definition at line 155 of file gdcmSeqEntry.cxx.

References gdcmAssertMacro, Items, and ItSQItem.

Referenced by gdcm::DicomDir::CreateDicomDir().

00156 {
00157    gdcmAssertMacro (ItSQItem != Items.end())
00158    {
00159       ++ItSQItem;
00160       if (ItSQItem != Items.end())
00161          return *ItSQItem;
00162    }
00163    return NULL;
00164 }

unsigned int gdcm::SeqEntry::GetNumberOfSQItems  ) 
 

returns the number of SQItems within the current Sequence

Definition at line 194 of file gdcmSeqEntry.cxx.

References Items.

00195 {
00196    return Items.size();
00197 }

size_t gdcm::DocEntry::GetOffset  )  [inline, inherited]
 

Returns offset (since the beginning of the file, including the File Preamble, if any) of the value of the current Dicom entry.

Warning:
offset of the *value*, not of the Dicom entry

Definition at line 85 of file gdcmDocEntry.h.

Referenced by gdcm::File::AnonymizeNoLoad(), gdcm::File::File(), gdcm::File::GetPixelOffset(), gdcm::Document::LoadDocEntry(), gdcm::Document::LoadEntryBinArea(), gdcm::Document::ParseDES(), gdcm::DocEntry::Print(), SeqEntry(), and gdcm::Document::SkipToNextDocEntry().

00085 { return Offset; };

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

Gets the print level for the Dicom Entries.

Definition at line 48 of file gdcmBase.h.

00048 { return PrintLevel; };

uint32_t gdcm::DocEntry::GetReadLength  )  [inline, inherited]
 

Returns the 'read length' of the current Dicom entry.

Warning:
this value is the one stored in the Dicom header but not mandatoryly the one thats's used (in case on SQ, or delimiters, the usable length is set to zero)

Definition at line 94 of file gdcmDocEntry.h.

Referenced by gdcm::DocEntry::GetFullLength(), gdcm::Document::ParseDES(), gdcm::Document::ParseSQ(), Print(), gdcm::DocEntry::Print(), and gdcm::Document::SkipToNextDocEntry().

00094 { return ReadLength; };

SQItem * gdcm::SeqEntry::GetSQItem int  nb  ) 
 

return a pointer to the SQItem referenced by its ordinal number. Returns the first item when argument is negative. Returns the last item when argument is bigger than the total item number.

Definition at line 172 of file gdcmSeqEntry.cxx.

References Items.

00173 {
00174    if (nb<0)
00175    {
00176       return *(Items.begin());
00177    }
00178    int count = 0 ;
00179    for(ListSQItem::iterator cc = Items.begin();
00180                            cc != Items.end();
00181                            count ++, ++cc)
00182    {
00183       if (count == nb)
00184       {
00185          return *cc;
00186       }
00187    }
00188    return *(Items.end());
00189 }

std::string const& gdcm::DocEntry::GetVM  )  const [inline, inherited]
 

Returns the 'Value Multiplicity' (e.g. "1", "1-n", "6"), found in the Dicom entry or in the Dicom Dictionnary of the current Dicom entry.

Definition at line 77 of file gdcmDocEntry.h.

00077 { return DicomDict->GetVM(); };

std::string const& gdcm::DocEntry::GetVR  )  const [inline, inherited]
 

Returns the 'Value Representation' (e.g. "PN" : Person Name, "SL" : Signed Long), found in the Dicom header or in the Dicom Dictionnary, of the current Dicom entry.

Definition at line 72 of file gdcmDocEntry.h.

Referenced by gdcm::Document::ComputeGroup0002Length(), gdcm::FileHelper::CopyBinEntry(), gdcm::File::File(), gdcm::Document::FixDocEntryFoundLength(), gdcm::Document::GetDocEntryUnvalue(), gdcm::Document::GetDocEntryValue(), gdcm::DocEntrySet::GetEntryVR(), gdcm::DocEntry::GetFullLength(), gdcm::DocEntrySet::InsertBinEntry(), gdcm::DocEntrySet::InsertValEntry(), gdcm::Document::IsDocEntryAnInteger(), gdcm::Document::LoadDocEntry(), gdcm::Document::ParseDES(), gdcm::ValEntry::Print(), gdcm::DocEntry::Print(), gdcm::ValEntry::SetValue(), gdcm::ValEntry::WriteContent(), gdcm::DocEntry::WriteContent(), and gdcm::BinEntry::WriteContent().

00072 { return DicomDict->GetVR(); };

bool gdcm::DocEntry::IsImplicitVR  )  [inline, inherited]
 

Tells us if the current Dicom entry was checked as ImplicitVr.

Returns:
true if the current Dicom entry was checked as ImplicitVr

Definition at line 117 of file gdcmDocEntry.h.

References gdcm::ImplicitVR.

Referenced by gdcm::Document::GetDocEntryUnvalue(), gdcm::Document::GetDocEntryValue(), gdcm::DocEntry::GetFullLength(), and SeqEntry().

00117 { return ImplicitVR; };

bool gdcm::DocEntry::IsItemDelimitor  )  [inherited]
 

tells us if entry is the last one of a 'no length' SequenceItem (fffe,e00d)

Definition at line 175 of file gdcmDocEntry.cxx.

References gdcm::DocEntry::GetElement(), and gdcm::DocEntry::GetGroup().

Referenced by gdcm::Document::ParseDES().

00176 {
00177    return (GetGroup() == 0xfffe && GetElement() == 0xe00d);
00178 }

bool gdcm::DocEntry::IsSequenceDelimitor  )  [inherited]
 

tells us if entry is the last one of a 'no length' Sequence (fffe,e0dd)

Definition at line 184 of file gdcmDocEntry.cxx.

References gdcm::DocEntry::GetElement(), and gdcm::DocEntry::GetGroup().

Referenced by gdcm::Document::ParseSQ().

00185 {
00186    return (GetGroup() == 0xfffe && GetElement() == 0xe0dd);
00187 }

bool gdcm::DocEntry::IsVMUnknown  )  [inline, inherited]
 

Tells us if the VM of the current Dicom entry is Unknown.

Returns:
true if the VM is unknown

Definition at line 125 of file gdcmDocEntry.h.

00125 { return DicomDict->IsVMUnknown(); };

bool gdcm::DocEntry::IsVRUnknown  )  [inline, inherited]
 

Tells us if the VR of the current Dicom entry is Unknown.

Returns:
true if the VR is unknown

Definition at line 121 of file gdcmDocEntry.h.

00121 { return DicomDict->IsVRUnknown(); };

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

canonical Printer

Reimplemented from gdcm::DocEntry.

Definition at line 227 of file gdcmSeqEntry.cxx.

References DelimitorMode, gdcmWarningMacro, gdcm::DocEntry::GetReadLength(), Items, gdcm::DocEntry::Print(), SeqTerm, gdcm::Base::SetPrintLevel(), and SQDepthLevel.

00228 {
00229    // First, Print the Dicom Element itself.
00230    os << "S ";
00231    DocEntry::Print(os);
00232    os << std::endl;
00233 
00234    if (GetReadLength() == 0)
00235       return;
00236 
00237    // Then, Print each SQ Item   
00238    for(ListSQItem::iterator cc = Items.begin(); cc != Items.end(); ++cc)
00239    {
00240       (*cc)->SetPrintLevel(PrintLevel);
00241       (*cc)->Print(os);   
00242    }
00243 
00244    // at end, print the sequence terminator item, if any
00245    if (DelimitorMode)
00246    {
00247       for ( int i = 0; i < SQDepthLevel; i++ )
00248       {
00249          os << "   | " ;
00250       }
00251       if (SeqTerm != NULL)
00252       {
00253          SeqTerm->SetPrintLevel(PrintLevel);
00254          SeqTerm->Print(os);
00255          os << std::endl;
00256       } 
00257       else 
00258       {
00259          // fuse
00260          gdcmWarningMacro("  -------- should have a sequence terminator item");
00261       }
00262    }
00263 }

void gdcm::SeqEntry::SetDelimitationItem DocEntry e  )  [inline]
 

Sets the Sequence Delimitation Item.

Definition at line 61 of file gdcmSeqEntry.h.

Referenced by gdcm::Document::ParseSQ().

00061 { SeqTerm = e;   }

void gdcm::SeqEntry::SetDelimitorMode bool  dm  )  [inline]
 

Sets the delimitor mode.

Definition at line 58 of file gdcmSeqEntry.h.

Referenced by gdcm::Document::ParseDES().

00058 { DelimitorMode = dm; }

void gdcm::SeqEntry::SetDepthLevel int  depth  )  [inline]
 

Sets the depth level of a Sequence Entry embedded in a SeQuence.

Definition at line 70 of file gdcmSeqEntry.h.

Referenced by gdcm::Document::ParseDES().

00070 { SQDepthLevel = depth; }

void gdcm::DocEntry::SetImplicitVR  )  [inline, inherited]
 

Sets to TRUE the ImplicitVr flag of the current Dicom entry.

Definition at line 113 of file gdcmDocEntry.h.

References gdcm::ImplicitVR.

Referenced by gdcm::Document::ReadNextDocEntry().

00113 { ImplicitVR = true; };

void gdcm::DocEntry::SetKey TagKey const &  key  )  [inline, inherited]
 

Set the 'key' of the current Dicom entry.

Definition at line 61 of file gdcmDocEntry.h.

References gdcm::TagKey.

Referenced by gdcm::DocEntry::DocEntry(), and gdcm::Document::ParseDES().

00061 { Key = key; }

void gdcm::DocEntry::SetLength uint32_t  l  )  [inline, inherited]
 

Sets both 'Read Length' and 'Usable Length' of the current Dicom entry.

Definition at line 98 of file gdcmDocEntry.h.

Referenced by gdcm::Document::FixDocEntryFoundLength(), gdcm::DocEntrySet::SetBinEntry(), gdcm::ValEntry::SetValue(), gdcm::FileHelper::SetWriteToRaw(), and gdcm::FileHelper::SetWriteToRGB().

00098 { Length = l; };

void gdcm::DocEntry::SetOffset size_t  of  )  [inline, inherited]
 

Sets the offset of the Dicom entry.

Warning:
use with caution !
Parameters:
of offset to be set

Definition at line 110 of file gdcmDocEntry.h.

Referenced by gdcm::DicomDirObject::FillObject(), gdcm::Document::ReadNextDocEntry(), and gdcm::DicomDir::SetElement().

00110 { Offset = of; };

void gdcm::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

Definition at line 45 of file gdcmBase.h.

Referenced by gdcm::SQItem::Print(), Print(), gdcm::FileHelper::Print(), gdcm::ElementSet::Print(), and gdcm::DicomDir::Print().

00045 { PrintLevel = level; };

void gdcm::DocEntry::SetReadLength uint32_t  l  )  [inline, inherited]
 

Sets only 'Read Length' (*not* 'Usable Length') of the current Dicom entry.

Definition at line 89 of file gdcmDocEntry.h.

Referenced by gdcm::Document::FixDocEntryFoundLength().

00089 { ReadLength = l; };

void gdcm::DocEntry::SetVM TagName const &  v  )  [inline, inherited]
 

Sets the 'Value Multiplicity' of the current Dicom entry.

Definition at line 80 of file gdcmDocEntry.h.

References gdcm::TagName.

00080 { DicomDict->SetVM(v); }; 

void gdcm::SeqEntry::WriteContent std::ofstream *  fp,
FileType  filetype
[virtual]
 

Writes the common part of any ValEntry, BinEntry, SeqEntry.

Parameters:
fp already open ofstream pointer
filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...)

Reimplemented from gdcm::DocEntry.

Definition at line 81 of file gdcmSeqEntry.cxx.

References gdcm::binary_write(), and Items.

00082 {
00083    uint16_t seq_term_gr = 0xfffe;
00084    uint16_t seq_term_el = 0xe0dd;
00085    uint32_t seq_term_lg = 0xffffffff;
00086 
00087    //uint16_t item_term_gr = 0xfffe;
00088    //uint16_t item_term_el = 0xe00d;
00089    
00090    DocEntry::WriteContent(fp, filetype);
00091    for(ListSQItem::iterator cc  = Items.begin();
00092                             cc != Items.end();
00093                           ++cc)
00094    {        
00095       (*cc)->WriteContent(fp, filetype);
00096    }
00097    
00098    // we force the writting of a Sequence Delimitation item
00099    // because we wrote the Sequence as a 'no Length' sequence
00100    binary_write(*fp, seq_term_gr);
00101    binary_write(*fp, seq_term_el);
00102    binary_write(*fp, seq_term_lg);
00103 }


Member Data Documentation

bool gdcm::SeqEntry::DelimitorMode [private]
 

If this Sequence is in delimitor mode (length =0xffffffff) or not.

Definition at line 77 of file gdcmSeqEntry.h.

Referenced by Print(), and SeqEntry().

DictEntry* gdcm::DocEntry::DicomDict [protected, inherited]
 

pointer to the underlying Dicom dictionary element

Definition at line 134 of file gdcmDocEntry.h.

Referenced by gdcm::DocEntry::DocEntry().

bool gdcm::DocEntry::ImplicitVR [protected, inherited]
 

Even when reading explicit vr files, some elements happen to be implicit. Flag them here since we can't use the entry->vr without breaking the underlying dictionary.

Definition at line 146 of file gdcmDocEntry.h.

Referenced by gdcm::DocEntry::Copy(), gdcm::DocEntry::DocEntry(), and SeqEntry().

ListSQItem gdcm::SeqEntry::Items [private]
 

Chained list of SQ Items.

Definition at line 80 of file gdcmSeqEntry.h.

Referenced by AddSQItem(), ClearSQItem(), GetFirstSQItem(), GetNextSQItem(), GetNumberOfSQItems(), GetSQItem(), Print(), and WriteContent().

ListSQItem::iterator gdcm::SeqEntry::ItSQItem [private]
 

iterator on the SQItems of the current SeqEntry

Definition at line 82 of file gdcmSeqEntry.h.

Referenced by GetFirstSQItem(), and GetNextSQItem().

TagKey gdcm::DocEntry::Key [protected, inherited]
 

Generalized key of this DocEntry (for details on the generalized key refer to TagKey documentation).

Definition at line 153 of file gdcmDocEntry.h.

uint32_t gdcm::DocEntry::Length [protected, inherited]
 

Correspond to the real length of the data This length might always be even.

Definition at line 138 of file gdcmDocEntry.h.

Referenced by gdcm::DocEntry::Copy(), and gdcm::DocEntry::DocEntry().

size_t gdcm::DocEntry::Offset [protected, inherited]
 

Offset from the beginning of file for direct user access.

Definition at line 149 of file gdcmDocEntry.h.

Referenced by gdcm::DocEntry::Copy(), and gdcm::DocEntry::DocEntry().

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

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

Definition at line 53 of file gdcmBase.h.

Referenced by gdcm::Base::Base().

uint32_t gdcm::DocEntry::ReadLength [protected, inherited]
 

Length to read in the file to obtain data.

Definition at line 141 of file gdcmDocEntry.h.

Referenced by gdcm::DocEntry::Copy(), and gdcm::DocEntry::DocEntry().

DocEntry* gdcm::SeqEntry::SeqTerm [private]
 

sequence terminator item

Definition at line 85 of file gdcmSeqEntry.h.

Referenced by ClearSQItem(), Print(), and SeqEntry().

int gdcm::SeqEntry::SQDepthLevel [private]
 

Defines the depth level of this SeqEntry inside the (optionaly) nested sequences. SQDepthLevel and its SQItem::SQDepthLevel counterpart are only defined on printing purposes (see Print).

Definition at line 91 of file gdcmSeqEntry.h.

Referenced by Print(), and SeqEntry().


The documentation for this class was generated from the following files:
Generated on Thu Feb 10 22:18:11 2005 for gdcm by doxygen 1.3.6