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