- gr = (*tag2)->GetGroup();
- el = (*tag2)->GetElement();
- lgr = (*tag2)->GetReadLength();
- val = (*tag2)->GetValue().c_str();
- vr = (*tag2)->GetVR();
+ // === Deal with the length
+ // --------------------
+ if(((*tag2)->GetLength())%2==1)
+ {
+ (*tag2)->SetValue((*tag2)->GetValue()+"\0");
+ (*tag2)->SetLength((*tag2)->GetLength()+1);
+ }
+
+ gr = (*tag2)->GetGroup();
+ el = (*tag2)->GetElement();
+ lgr = (*tag2)->GetReadLength();
+ val = (*tag2)->GetValue().c_str();
+ vr = (*tag2)->GetVR();