X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=src%2FgdcmJPEGFragmentsInfo.cxx;h=06f331b3e6a3f27f8edd60fa9b60151dd929cdb8;hb=c42a0d560374ca98eb7f1531de835fd4cd1c59b0;hp=41f802d39dd9e34eb1a55605f81a1ab5e5e567fe;hpb=1d69b92978803204089d270599133917d944c651;p=gdcm.git diff --git a/src/gdcmJPEGFragmentsInfo.cxx b/src/gdcmJPEGFragmentsInfo.cxx index 41f802d3..06f331b3 100644 --- a/src/gdcmJPEGFragmentsInfo.cxx +++ b/src/gdcmJPEGFragmentsInfo.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJPEGFragmentsInfo.cxx,v $ Language: C++ - Date: $Date: 2004/10/12 04:35:46 $ - Version: $Revision: 1.2 $ + Date: $Date: 2004/10/20 14:30:40 $ + Version: $Revision: 1.3 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,6 +21,9 @@ namespace gdcm { +/** + * \brief Default destructor + */ JPEGFragmentsInfo::~JPEGFragmentsInfo() { for(JPEGFragmentsList::iterator it = Fragments.begin(); @@ -31,4 +34,31 @@ JPEGFragmentsInfo::~JPEGFragmentsInfo() } Fragments.clear(); } + +/** + * \brief Print self. + * @param indent Indentation string to be prepended during printing. + * @param os Stream to print to. + */ +void JPEGFragmentsInfo::Print( std::string indent, std::ostream &os ) +{ + os << indent + << "----------------- JPEG fragments --------------------------------" + << std::endl; + os << indent + << "Total number of fragments : " << Fragments.size() + << std::endl; + int fragmentNumber = 0; + for(JPEGFragmentsList::iterator it = Fragments.begin(); + it != Fragments.end(); + ++it) + { + os << indent + << " fragment number :" << fragmentNumber++; + (*it)->Print( indent + " ", os ); + os << std::endl; + } +} + + } // end namespace gdcm