X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmJPEGFragmentsInfo.cxx;h=7a1ad3972eb2b29e534b0973295d3fe620433f48;hb=575572bc10483ad3116ad7fb73197fa2c3f2ee34;hp=f981336bb4695f64d732574b55621e493b631fd3;hpb=da6bc02a3bb5627685bd70f5503305a7f9b3d7cd;p=gdcm.git diff --git a/src/gdcmJPEGFragmentsInfo.cxx b/src/gdcmJPEGFragmentsInfo.cxx index f981336b..7a1ad397 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/10 16:44:00 $ - Version: $Revision: 1.1 $ + Date: $Date: 2004/10/28 22:21:57 $ + Version: $Revision: 1.4 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -18,13 +18,47 @@ #include "gdcmJPEGFragmentsInfo.h" -gdcmJPEGFragmentsInfo::~gdcmJPEGFragmentsInfo() +namespace gdcm +{ + +/** + * \brief Default destructor + */ +JPEGFragmentsInfo::~JPEGFragmentsInfo() { for(JPEGFragmentsList::iterator it = Fragments.begin(); it != Fragments.end(); ++it ) { - delete (*it); + delete *it; } 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