14 #ifndef vtkDICOMTagPath_h
15 #define vtkDICOMTagPath_h
17 #include "vtkSystemIncludes.h"
18 #include "vtkDICOMModule.h"
19 #include "vtkDICOMTag.h"
35 : Size(2), Head(seqTag), Index(i), Tail(tag), List(nullptr) {}
40 : Size(3), Head(seqTag), Index(i), Tail(tag) {
41 Last.Index = j; Last.Tag.Key = tag2.
GetKey(); }
49 : Size(1), Head(tag), Index(0), Tail(), List(nullptr) {}
53 : Size(o.Size), Head(o.Head), Index(o.Index), Tail(o.Tail) {
55 this->Last = o.Last; }
57 this->List = vtkDICOMTagPath::CopyList(o.List, o.Size - 2); } }
63 if (this->Size > 3) {
delete [] this->List; } }
72 bool HasTail()
const {
74 return (this->Size > 1); }
115 unsigned int n, Pair *l) :
116 Size(n+2), Head(seqTag), Index(i), Tail(tag), List(l) {}
118 static Pair *CopyList(
const Pair *o,
unsigned int n);
130 VTKDICOM_EXPORT ostream& operator<<(ostream& o,
const vtkDICOMTagPath& a);
A tag path for digging values out of sequence items.
Definition: vtkDICOMTagPath.h:27
vtkDICOMTagPath(const vtkDICOMTagPath &path, unsigned int i, vtkDICOMTag tag)
Construct a tag path by adding to an existing tag path.
vtkDICOMTagPath(vtkDICOMTag tag)
Construct a tag path from just a single tag.
Definition: vtkDICOMTagPath.h:48
vtkDICOMTag GetHead() const
Get the path head, which should be a sequence if HasTail() is true.
Definition: vtkDICOMTagPath.h:77
vtkDICOMTag GetTag(unsigned int i) const
Get the nth tag in the path.
vtkDICOMTagPath(vtkDICOMTag seqTag, unsigned int i, vtkDICOMTag tag, unsigned int j, vtkDICOMTag tag2)
Construct a tag path that goes two levels deep.
Definition: vtkDICOMTagPath.h:38
vtkDICOMTagPath(const vtkDICOMTagPath &o)
Copy constructor.
Definition: vtkDICOMTagPath.h:52
vtkDICOMTagPath(vtkDICOMTag seqTag, unsigned int i, vtkDICOMTag tag)
Construct a tag path from a sequence tag, item index, and item tag.
Definition: vtkDICOMTagPath.h:34
unsigned int GetIndex() const
Get the index of the item within the sequence.
Definition: vtkDICOMTagPath.h:81
unsigned int GetSize() const
Get the number of tags in the path.
Definition: vtkDICOMTagPath.h:91
vtkDICOMTagPath GetTail() const
Get the remainder of the path (after Head and Index).
unsigned int GetIndex(unsigned int i) const
Get the nth index in the path.
A (group,element) identifier tag for DICOM attributes.
Definition: vtkDICOMTag.h:23
unsigned int GetKey() const
Get the tag as a 32-bit key.
Definition: vtkDICOMTag.h:56
A struct that provides static storage for a DICOM tag.
Definition: vtkDICOMTag.h:27