Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GDCMPRINTER_H
00016 #define GDCMPRINTER_H
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #include "gdcmFile.h"
00048 #include "gdcmDataElement.h"
00049
00050 namespace gdcm
00051 {
00052
00053 class DataSet;
00054 class DictEntry;
00055 class Dicts;
00059
00060 class GDCM_EXPORT Printer
00061 {
00062 public:
00063 Printer();
00064 ~Printer();
00065
00066 void SetFile(File const &f) { F = &f; }
00067
00068 void SetColor(bool c);
00069
00070 typedef enum {
00071 VERBOSE_STYLE = 0,
00072 CONDENSED_STYLE,
00073
00074 XML
00075 } PrintStyles;
00076
00077 void SetStyle(PrintStyles ps) {
00078 PrintStyle = ps;
00079 }
00080 PrintStyles GetPrintStyle() const {
00081 return PrintStyle;
00082 }
00083
00084 void Print(std::ostream& os);
00085
00086 protected:
00087 void PrintDataSetOld(std::ostream &os, const DataSet &ds);
00088 void PrintElement(std::ostream& os, const DataElement &xde, const DictEntry &entry);
00089 void PrintDataSet(const DataSet &ds, std::ostream& os, const std::string &s = "");
00090 VR PrintDataElement(std::ostringstream & os, const Dicts &dicts, const DataSet & ds, const DataElement &de, std::ostream &out, std::string const & indent );
00091 void PrintSQ(const SequenceOfItems *sqi, std::ostream & os, std::string const & indent);
00092
00093 PrintStyles PrintStyle;
00094 const File *F;
00095 VL MaxPrintLength;
00096 };
00097
00098 }
00099
00100 #endif //GDCMPRINTER_H