]> Creatis software - gdcm.git/blob - src/gdcmDicomDirImage.cxx
moved from gdcmParser to gdcmDocument.
[gdcm.git] / src / gdcmDicomDirImage.cxx
1 // gdcmDicomDirImage.cxx
2 //-----------------------------------------------------------------------------
3 #include "gdcmDicomDirImage.h"
4 #include "gdcmValEntry.h"
5 //-----------------------------------------------------------------------------
6 // Constructor / Destructor
7
8 /**
9  * \ingroup gdcmDicomDirImage
10  * \brief  Constructor 
11  * @param  s  SQ Item holdoing the elements
12  * @param ptagHT pointer to the HTable (gdcmObject needs it 
13  *               to build the gdcmDocEntries)
14  */
15 gdcmDicomDirImage::gdcmDicomDirImage(gdcmSQItem *s, TagDocEntryHT *ptagHT):
16    gdcmObject(ptagHT)
17 {
18    docEntries = s->GetDocEntries();
19 }
20
21 gdcmDicomDirImage::gdcmDicomDirImage(TagDocEntryHT *ptagHT):
22    gdcmObject(ptagHT)
23 {
24 }
25 /**
26  * \ingroup gdcmDicomDirImage
27  * \brief   Canonical destructor.
28  */
29 gdcmDicomDirImage::~gdcmDicomDirImage() 
30 {
31 }
32
33 //-----------------------------------------------------------------------------
34 // Print
35 /**
36  * \ingroup gdcmDicomDirImage
37  * \brief   Prints the Object
38  * @return
39  */ 
40 void gdcmDicomDirImage::Print(std::ostream &os)
41 {
42    os<<"IMAGE : ";
43    for(ListDocEntry::iterator i=docEntries.begin();i!=docEntries.end();++i)
44    {
45       if( ((*i)->GetGroup()==0x0004) && ((*i)->GetElement()==0x1500) )
46          os<<((gdcmValEntry *)(*i))->GetValue();
47    }
48    os<<std::endl;
49
50    gdcmObject::Print(os);
51 }
52
53 //-----------------------------------------------------------------------------
54 // Public
55
56 //-----------------------------------------------------------------------------
57 // Protected
58
59 //-----------------------------------------------------------------------------
60 // Private
61
62 //-----------------------------------------------------------------------------