]> Creatis software - gdcm.git/blob - src/gdcmRLEFrame.cxx
* FIX : remove so many friend between classes
[gdcm.git] / src / gdcmRLEFrame.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmRLEFrame.cxx,v $
5   Language:  C++
6   Date:      $Date: 2005/01/26 11:42:02 $
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 "gdcmRLEFrame.h"
20 #include "gdcmDebug.h"
21                                                                                 
22 namespace gdcm
23 {
24
25 /**
26  * \brief        Print self.
27  * @param indent Indentation string to be prepended during printing.
28  * @param os     Stream to print to.
29  */
30 void RLEFrame::Print( std::ostream &os, std::string indent )
31 {
32    os << indent
33       << "--- fragments"
34       << std::endl;
35    for ( unsigned int i = 0; i < NumberFragments; i++ )
36    {
37       os << indent
38          << "   offset : " <<  Offset[i]
39          << "   length : " <<  Length[i]
40          << std::endl;
41    }
42 }
43
44 void RLEFrame::SetOffset(unsigned int id,long offset)
45 {
46    gdcmAssertMacro(id<15);
47    Offset[id] = offset;
48 }
49
50 long RLEFrame::GetOffset(unsigned int id)
51 {
52    gdcmAssertMacro(id<15);
53    return Offset[id];
54 }
55
56 void RLEFrame::SetLength(unsigned int id,long length)
57 {
58    gdcmAssertMacro(id<15);
59    Length[id] = length;
60 }
61
62 long RLEFrame::GetLength(unsigned int id)
63 {
64    gdcmAssertMacro(id<15);
65    return Length[id];
66 }
67
68 } // end namespace gdcm
69