]> Creatis software - gdcm.git/blob - src/gdcmDicomDirImage.cxx
ENH: Adding 'gdcm' namespace. Be nice with me this was a ~13000 lines patch. Also...
[gdcm.git] / src / gdcmDicomDirImage.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirImage.cxx,v $
5   Language:  C++
6   Date:      $Date: 2004/10/12 04:35:44 $
7   Version:   $Revision: 1.12 $
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 //-----------------------------------------------------------------------------
26 // Constructor / Destructor
27
28 /**
29  * \ingroup DicomDirImage
30  * \brief  Constructor 
31  * @param  s  SQ Item holding the elements
32  * @param ptagHT pointer to the HTable (DicomDirObject needs it 
33  *               to build the DocEntries)
34  */
35 DicomDirImage::DicomDirImage(SQItem *s, TagDocEntryHT *ptagHT):
36    DicomDirObject(ptagHT)
37 {
38    docEntries = s->GetDocEntries();
39 }
40
41 /**
42  * \ingroup DicomDirImage
43  * \brief  Constructor 
44  * @param ptagHT pointer to the HTable (DicomDirObject needs it 
45  *               to build the DocEntries)
46  */
47 DicomDirImage::DicomDirImage(TagDocEntryHT *ptagHT):
48    DicomDirObject(ptagHT)
49 {
50 }
51 /**
52  * \ingroup DicomDirImage
53  * \brief   Canonical destructor.
54  */
55 DicomDirImage::~DicomDirImage() 
56 {
57 }
58
59 //-----------------------------------------------------------------------------
60 // Print
61 /**
62  * \ingroup DicomDirImage
63  * \brief   Prints the Object
64  * @return
65  */ 
66 void DicomDirImage::Print(std::ostream &os)
67 {
68    os << "IMAGE : ";
69    for(ListDocEntry::iterator i=docEntries.begin();i!=docEntries.end();++i)
70    {
71       if( (*i)->GetGroup() == 0x0004 && (*i)->GetElement() == 0x1500 )
72       {
73          os << ((ValEntry *)(*i))->GetValue(); //FIXME
74       }
75    }
76    os << std::endl;
77
78    DicomDirObject::Print(os);
79 }
80
81 //-----------------------------------------------------------------------------
82 // Public
83
84 //-----------------------------------------------------------------------------
85 // Protected
86
87 //-----------------------------------------------------------------------------
88 // Private
89
90 //-----------------------------------------------------------------------------
91 } // end namespace gdcm
92