]> Creatis software - gdcm.git/blob - src/gdcmRLEFramesInfo.cxx
* src/gdcmDocument.cxx ftell() return properly stored in a long (i.e.
[gdcm.git] / src / gdcmRLEFramesInfo.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmRLEFramesInfo.cxx,v $
5   Language:  C++
6   Date:      $Date: 2004/10/20 14:30:40 $
7   Version:   $Revision: 1.3 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18
19 #include "gdcmRLEFramesInfo.h"
20
21 namespace gdcm 
22 {
23
24 RLEFramesInfo::~RLEFramesInfo()
25 {
26    for(RLEFrameList::iterator it = Frames.begin(); it != Frames.end(); ++it)
27    {
28       delete (*it);
29    }
30    Frames.clear();
31 }
32
33 /**
34  * \brief        Print self.
35  * @param indent Indentation string to be prepended during printing.
36  * @param os     Stream to print to.
37  */
38 void RLEFramesInfo::Print( std::string indent, std::ostream &os )
39 {
40    os << indent
41       << "----------------- RLE frames --------------------------------"
42       << std::endl;
43    os << indent
44       << "Total number of Frames : " << Frames.size()
45       << std::endl;
46    int frameNumber = 0;
47    for(RLEFrameList::iterator it = Frames.begin(); it != Frames.end(); ++it)
48    {
49       os << indent
50          << "   frame number :" << frameNumber++
51          << std::endl;
52       (*it)->Print( indent + "   ", os );
53    }
54 }
55
56 } // end namespace gdcm