]> Creatis software - gdcm.git/blob - src/gdcmDicomDirPrivate.cxx
Fix mistypings
[gdcm.git] / src / gdcmDicomDirPrivate.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirPrivate.cxx,v $
5   Language:  C++
6   Date:      $Date: 2007/05/23 14:18:08 $
7   Version:   $Revision: 1.2 $
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 "gdcmDicomDirPrivate.h"
20 #include "gdcmGlobal.h"
21 #include "gdcmDataEntry.h"
22
23 namespace GDCM_NAME_SPACE
24 {
25 //-----------------------------------------------------------------------------
26 // Constructor / Destructor
27 /**
28  * \brief  Constructor 
29  * \note End user must use : DicomDirSerie::NewPrivate()
30  */
31 DicomDirPrivate::DicomDirPrivate(bool empty):
32    DicomDirObject()
33 {
34    if ( !empty )
35    {
36       ListDicomDirPrivateElem const &elemList = 
37          Global::GetDicomDirElements()->GetDicomDirPrivateElements();
38       FillObject(elemList);
39    }
40 }
41
42 /**
43  * \brief   Canonical destructor.
44  */
45 DicomDirPrivate::~DicomDirPrivate() 
46 {
47 }
48
49 //-----------------------------------------------------------------------------
50 // Public
51
52 //-----------------------------------------------------------------------------
53 // Protected
54
55 //-----------------------------------------------------------------------------
56 // Private
57
58 //-----------------------------------------------------------------------------
59 // Print
60 /**
61  * \brief   Prints the Object
62  * @param os ostream to write to
63  * @param indent Indentation string to be prepended during printing
64  * @return
65  */ 
66 void DicomDirPrivate::Print(std::ostream &os, std::string const & )
67 {
68    os << "PRIVATE : ";
69    for(ListDocEntry::iterator i = DocEntries.begin();
70                               i!= DocEntries.end();
71                               ++i)
72    {
73       if ( (*i)->GetGroup() == 0x0004 && (*i)->GetElement() == 0x1500 )
74       {
75          if( dynamic_cast<DataEntry *>(*i) )
76             os << (dynamic_cast<DataEntry *>(*i))->GetString();
77       }
78    }
79    os << std::endl;
80
81    DicomDirObject::Print(os);
82 }
83
84 //-----------------------------------------------------------------------------
85 } // end namespace gdcm
86