1 /*=========================================================================
4 Module: $RCSfile: gdcmDicomEntry.cxx,v $
6 Date: $Date: 2005/10/21 07:38:57 $
7 Version: $Revision: 1.3 $
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.
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.
17 =========================================================================*/
19 #include "gdcmDicomEntry.h"
20 #include "gdcmDebug.h"
23 #include <iomanip> // for std::ios::left, ...
25 #include <stdio.h> // for sprintf
29 //-----------------------------------------------------------------------------
30 // Constructor / Destructor
33 * @param group DICOM-Group Number
34 * @param elem DICOM-Element Number
35 * @param vr Value Representation
37 DicomEntry::DicomEntry(const uint16_t &group,const uint16_t &elem,
48 DicomEntry::~DicomEntry()
52 //-----------------------------------------------------------------------------
55 * \brief concatenates 2 uint16_t (supposed to be a Dicom group number
56 * and a Dicom element number)
57 * @param group the Dicom group number used to build the tag
58 * @param elem the Dicom element number used to build the tag
59 * @return the built tag
61 TagKey DicomEntry::TranslateToKey(uint16_t group, uint16_t elem)
63 // according to 'Purify', TranslateToKey is one of the most
64 // time consuming methods.
65 // Let's try to shorten it !
66 return TagKey(group,elem);
69 //-----------------------------------------------------------------------------
72 //-----------------------------------------------------------------------------
75 //-----------------------------------------------------------------------------
78 * \brief Prints an entry of the Dicom DictionaryEntry
79 * @param os ostream we want to print in
80 * @param indent Indentation string to be prepended during printing
82 void DicomEntry::Print(std::ostream &os, std::string const & )
85 os << " [" << VR << "] ";
88 //-----------------------------------------------------------------------------
89 } // end namespace gdcm