+ gdcmTypeMacro(CommandStart);
+ gdcmNewMacro(CommandStart);
+
+public :
+ virtual void Execute()
+ {
+ std::cerr << "Start parsing" << std::endl;
+ }
+
+protected :
+ CommandStart() {}
+};
+
+class CommandEnd : public GDCM_NAME_SPACE::Command
+{
+ gdcmTypeMacro(CommandEnd);
+ gdcmNewMacro(CommandEnd);
+
+public :
+ virtual void Execute()
+ {
+ std::cerr << "End parsing" << std::endl;
+ }
+
+protected :
+ CommandEnd() {}
+};
+
+class CommandProgress : public GDCM_NAME_SPACE::Command
+{
+ gdcmTypeMacro(CommandProgress);
+ gdcmNewMacro(CommandProgress);
+
+public :
+ virtual void Execute()
+ {
+ GDCM_NAME_SPACE::DicomDir *dd=dynamic_cast<GDCM_NAME_SPACE::DicomDir *>(GetObject());
+
+ if(dd)
+ std::cerr << "Progress parsing (" << dd->GetProgress() << ")" << std::endl;
+ else
+ std::cerr << "Progress parsing (NULL)" << std::endl;
+ }
+
+protected :
+ CommandProgress() {}
+};