14 #ifndef GDCMDATAELEMENT_H
15 #define GDCMDATAELEMENT_H
36 class SequenceOfItems;
37 class SequenceOfFragments;
74 const VL&
GetVL()
const {
return ValueLengthField; }
79 void SetVL(
const VL &vl) { ValueLengthField = vl; }
80 void SetVLToUndefined();
84 VR const &
GetVR()
const {
return VRField; }
103 bool IsEmpty()
const {
return ValueField == 0 || (GetByteValue() && GetByteValue()->IsEmpty()); }
106 void Empty() { ValueField = 0; ValueLengthField = 0; }
114 ValueLengthField = 0;
151 return ValueLengthField.IsUndefined();
164 return GetTag() < de.
GetTag();
203 template <
typename TDE>
205 return static_cast<const TDE*
>(
this)->GetLength();
208 template <
typename TDE,
typename TSwap>
209 std::istream &
Read(std::istream &is) {
210 return static_cast<TDE*
>(
this)->
template Read<TSwap>(is);
213 template <
typename TDE,
typename TSwap>
214 std::istream &
ReadOrSkip(std::istream &is, std::set<Tag>
const &skiptags) {
216 return static_cast<TDE*
>(
this)->
template Read<TSwap>(is);
219 template <
typename TDE,
typename TSwap>
220 std::istream &
ReadPreValue(std::istream &is, std::set<Tag>
const &skiptags) {
222 return static_cast<TDE*
>(
this)->
template ReadPreValue<TSwap>(is);
224 template <
typename TDE,
typename TSwap>
225 std::istream &
ReadValue(std::istream &is, std::set<Tag>
const &skiptags) {
227 return static_cast<TDE*
>(
this)->
template ReadValue<TSwap>(is);
229 template <
typename TDE,
typename TSwap>
232 return static_cast<TDE*
>(
this)->
template ReadValueWithLength<TSwap>(is, length);
235 template <
typename TDE,
typename TSwap>
237 return static_cast<TDE*
>(
this)->
template ReadWithLength<TSwap>(is,length);
240 template <
typename TDE,
typename TSwap>
241 const std::ostream &
Write(std::ostream &os)
const {
242 return static_cast<const TDE*
>(
this)->
template Write<TSwap>(os);
255 void SetValueFieldLength(
VL vl,
bool readvalues );
272 return ! ( lhs == rhs );
277 #endif //GDCMDATAELEMENT_H