-void gdcmBinEntry::Print(std::ostream &os = std::cout) {
- PrintCommonPart(os);
- std::cout << "gdcmBinEntry : Print, et alors ?" <<std::endl;
+void gdcmBinEntry::Print(std::ostream &os)
+{
+ gdcmDocEntry::Print(os);
+ std::ostringstream s;
+ void *voidArea = GetVoidArea();
+ if (voidArea != NULL)
+ {
+ s << " [gdcm::Binary data loaded with length is "
+ << GetLength() << "]";
+ }
+ else
+ {
+ if ( GetLength() == 0 )
+ s << " []";
+ else
+ {
+ s << " [gdcm::Binary data NOT loaded]";
+ }
+
+ }
+ os << s.str();
+}
+
+/*
+ * \brief canonical Writer
+ */
+void gdcmBinEntry::Write(FILE *fp, FileType filetype) {
+ gdcmDocEntry::Write(fp, filetype);
+ void *voidArea = GetVoidArea();
+ int lgr=GetLength();
+ if (voidArea != NULL)
+ { // there is a 'non string' LUT, overlay, etc
+ fwrite ( voidArea,(size_t)lgr ,(size_t)1 ,fp); // Elem value
+ return;
+ }