]> Creatis software - gdcm.git/blob - src/gdcmDicomDirImage.cxx
Some normalizations :
[gdcm.git] / src / gdcmDicomDirImage.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirImage.cxx,v $
5   Language:  C++
6   Date:      $Date: 2005/01/23 10:12:33 $
7   Version:   $Revision: 1.20 $
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 #include "gdcmGlobal.h"
22
23 namespace gdcm 
24 {
25 //-----------------------------------------------------------------------------
26 // Constructor / Destructor
27 /**
28  * \brief  Constructor 
29  */
30 DicomDirImage::DicomDirImage(bool empty):
31    DicomDirObject()
32 {
33    if( !empty )
34    {
35       ListDicomDirImageElem const &elemList = 
36          Global::GetDicomDirElements()->GetDicomDirImageElements();
37       FillObject(elemList);
38    }
39 }
40
41 /**
42  * \brief   Canonical destructor.
43  */
44 DicomDirImage::~DicomDirImage() 
45 {
46 }
47
48 //-----------------------------------------------------------------------------
49 // Print
50 /**
51  * \brief   Prints the Object
52  * @param os ostream to write to
53  * @param indent Indentation string to be prepended during printing
54  * @return
55  */ 
56 void DicomDirImage::Print(std::ostream &os, std::string const & )
57 {
58    os << "IMAGE : ";
59    for(ListDocEntry::iterator i = DocEntries.begin();
60                               i!= DocEntries.end();
61                               ++i)
62    {
63       if( (*i)->GetGroup() == 0x0004 && (*i)->GetElement() == 0x1500 )
64       {
65          os << (dynamic_cast<ValEntry *>(*i))->GetValue(); //FIXME
66       }
67    }
68    os << std::endl;
69
70    DicomDirObject::Print(os);
71 }
72
73 //-----------------------------------------------------------------------------
74 // Public
75
76 //-----------------------------------------------------------------------------
77 // Protected
78
79 //-----------------------------------------------------------------------------
80 // Private
81
82 //-----------------------------------------------------------------------------
83 } // end namespace gdcm
84