]> Creatis software - gdcm.git/blob - src/gdcmDicomDirImage.cxx
-add method GetFirstEntry to replace call to InitTraversal+GetNextEntry
[gdcm.git] / src / gdcmDicomDirImage.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirImage.cxx,v $
5   Language:  C++
6   Date:      $Date: 2005/01/18 07:53:42 $
7   Version:   $Revision: 1.17 $
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  * \brief  Constructor 
28  */
29 DicomDirImage::DicomDirImage():
30    DicomDirObject()
31 {
32 }
33 /**
34  * \brief   Canonical destructor.
35  */
36 DicomDirImage::~DicomDirImage() 
37 {
38 }
39
40 //-----------------------------------------------------------------------------
41 // Print
42 /**
43  * \brief   Prints the Object
44  * @param os ostream to write to
45  * @return
46  */ 
47 void DicomDirImage::Print(std::ostream &os, std::string const & )
48 {
49    os << "IMAGE : ";
50    for(ListDocEntry::iterator i = DocEntries.begin();
51                               i!= DocEntries.end();
52                               ++i)
53    {
54       if( (*i)->GetGroup() == 0x0004 && (*i)->GetElement() == 0x1500 )
55       {
56          os << ((ValEntry *)(*i))->GetValue(); //FIXME
57       }
58    }
59    os << std::endl;
60
61    DicomDirObject::Print(os);
62 }
63
64 //-----------------------------------------------------------------------------
65 // Public
66
67 //-----------------------------------------------------------------------------
68 // Protected
69
70 //-----------------------------------------------------------------------------
71 // Private
72
73 //-----------------------------------------------------------------------------
74 } // end namespace gdcm
75