-// Print
-/**
- * \ingroup gdcmDocEntry
- * \brief Prints the common part of gdcmValEntry, gdcmBinEntry, gdcmSeqEntry
- */
-void gdcmDocEntry::PrintCommonPart(std::ostream & os) {
-
- printLevel=2; // FIXME
-
- size_t o;
- unsigned short int g, e;
- char st[20];
- TSKey v;
- std::string d2, vr;
- std::ostringstream s;
- guint32 lgth;
- char greltag[10]; //group element tag
-
- g = GetGroup();
- e = GetElement();
- o = GetOffset();
- vr = GetVR();
- sprintf(greltag,"%04x|%04x ",g,e);
- s << greltag ;
-
- if (printLevel>=2) {
- s << "lg : ";
- lgth = GetReadLength(); // ReadLength, as opposed to UsableLength
- if (lgth == 0xffffffff) {
- sprintf(st,"x(ffff)"); // I said : "x(ffff)" !
- s.setf(std::ios::left);
- s << std::setw(10-strlen(st)) << " ";
- s << st << " ";
- s.setf(std::ios::left);
- s << std::setw(8) << "-1";
- } else {
- sprintf(st,"x(%x)",lgth);
- s.setf(std::ios::left);
- s << std::setw(10-strlen(st)) << " ";
- s << st << " ";
- s.setf(std::ios::left);
- s << std::setw(8) << lgth;
- }
- s << " Off.: ";
- sprintf(st,"x(%x)",o);
- s << std::setw(10-strlen(st)) << " ";
- s << st << " ";
- s << std::setw(8) << o;
- }
-
- s << "[" << vr << "] ";
-
- if (printLevel>=1) {
- s.setf(std::ios::left);
- s << std::setw(66-GetName().length()) << " ";
- }
-
- s << "[" << GetName()<< "]";
- os << s.str();
-}
-
-/**
- * \ingroup gdcmDocEntry
- * \brief Writes the common part of any gdcmValEntry, gdcmBinEntry, gdcmSeqEntry
- */
-void gdcmDocEntry::Write(FILE *fp, FileType filetype) {
- std::cout << "gdcmDocEntry::Write : Is that what you wanted to do ? " << std::endl;
- WriteCommonPart(fp, filetype);
-}
-