]> Creatis software - gdcm.git/blob - src/gdcmDicomDirImage.cxx
* Remove memory leaks on the DicomDir
[gdcm.git] / src / gdcmDicomDirImage.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirImage.cxx,v $
5   Language:  C++
6   Date:      $Date: 2004/12/03 17:13:18 $
7   Version:   $Revision: 1.14 $
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 "gdcmDicomDirImage.h"
20 #include "gdcmValEntry.h"
21
22 namespace gdcm 
23 {
24 //-----------------------------------------------------------------------------
25 // Constructor / Destructor
26 /**
27  * \ingroup DicomDirImage
28  * \brief  Constructor 
29  * @param ptagHT pointer to the HTable (DicomDirObject needs it 
30  *               to build the DocEntries)
31  */
32 DicomDirImage::DicomDirImage():
33    DicomDirObject()
34 {
35 }
36 /**
37  * \ingroup DicomDirImage
38  * \brief   Canonical destructor.
39  */
40 DicomDirImage::~DicomDirImage() 
41 {
42 }
43
44 //-----------------------------------------------------------------------------
45 // Print
46 /**
47  * \ingroup DicomDirImage
48  * \brief   Prints the Object
49  * @return
50  */ 
51 void DicomDirImage::Print(std::ostream &os)
52 {
53    os << "IMAGE : ";
54    for(ListDocEntry::iterator i = DocEntries.begin();
55                               i!= DocEntries.end();
56                               ++i)
57    {
58       if( (*i)->GetGroup() == 0x0004 && (*i)->GetElement() == 0x1500 )
59       {
60          os << ((ValEntry *)(*i))->GetValue(); //FIXME
61       }
62    }
63    os << std::endl;
64
65    DicomDirObject::Print(os);
66 }
67
68 //-----------------------------------------------------------------------------
69 // Public
70
71 //-----------------------------------------------------------------------------
72 // Protected
73
74 //-----------------------------------------------------------------------------
75 // Private
76
77 //-----------------------------------------------------------------------------
78 } // end namespace gdcm
79