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