+ {
+ // FIXME : find a trick to know if current object is a
+ // gdcm::File or a gdcm::Document
+ //if ( dynamic_cast< File* > ( this ) ) { // ignore illegal groups }
+
+ // Skip 'Group Length' element, since it may be wrong.
+ // except for Group 0002
+ if ( (i->second)->GetElement() == 0x0000
+ && (i->second)->GetElement() != 0x0002 )
+ continue;
+
+ i->second->WriteContent(fp, filetype);