]> Creatis software - gdcm.git/blob - src/gdcmDicomDirImage.cxx
ENH: Guess what ! Still some cosmetic cleanup
[gdcm.git] / src / gdcmDicomDirImage.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirImage.cxx,v $
5   Language:  C++
6   Date:      $Date: 2004/08/01 02:39:09 $
7   Version:   $Revision: 1.8 $
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       {
63          os << ((gdcmValEntry *)(*i))->GetValue(); //FIXME
64       }
65    }
66    os << std::endl;
67
68    gdcmObject::Print(os);
69 }
70
71 //-----------------------------------------------------------------------------
72 // Public
73
74 //-----------------------------------------------------------------------------
75 // Protected
76
77 //-----------------------------------------------------------------------------
78 // Private
79
80 //-----------------------------------------------------------------------------