]> Creatis software - gdcm.git/blob - src/gdcmDicomDirImage.cxx
* Erroneous leading white fix:
[gdcm.git] / src / gdcmDicomDirImage.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirImage.cxx,v $
5   Language:  C++
6   Date:      $Date: 2004/06/20 18:08:47 $
7   Version:   $Revision: 1.7 $
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.htm 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 // Constructor / Destructor
23
24 /**
25  * \ingroup gdcmDicomDirImage
26  * \brief  Constructor 
27  * @param  s  SQ Item holdoing the elements
28  * @param ptagHT pointer to the HTable (gdcmObject needs it 
29  *               to build the gdcmDocEntries)
30  */
31 gdcmDicomDirImage::gdcmDicomDirImage(gdcmSQItem *s, TagDocEntryHT *ptagHT):
32    gdcmObject(ptagHT)
33 {
34    docEntries = s->GetDocEntries();
35 }
36
37 gdcmDicomDirImage::gdcmDicomDirImage(TagDocEntryHT *ptagHT):
38    gdcmObject(ptagHT)
39 {
40 }
41 /**
42  * \ingroup gdcmDicomDirImage
43  * \brief   Canonical destructor.
44  */
45 gdcmDicomDirImage::~gdcmDicomDirImage() 
46 {
47 }
48
49 //-----------------------------------------------------------------------------
50 // Print
51 /**
52  * \ingroup gdcmDicomDirImage
53  * \brief   Prints the Object
54  * @return
55  */ 
56 void gdcmDicomDirImage::Print(std::ostream &os)
57 {
58    os<<"IMAGE : ";
59    for(ListDocEntry::iterator i=docEntries.begin();i!=docEntries.end();++i)
60    {
61       if( ((*i)->GetGroup()==0x0004) && ((*i)->GetElement()==0x1500) )
62          os<<((gdcmValEntry *)(*i))->GetValue();
63    }
64    os<<std::endl;
65
66    gdcmObject::Print(os);
67 }
68
69 //-----------------------------------------------------------------------------
70 // Public
71
72 //-----------------------------------------------------------------------------
73 // Protected
74
75 //-----------------------------------------------------------------------------
76 // Private
77
78 //-----------------------------------------------------------------------------