]> Creatis software - gdcm.git/blob - src/gdcmBinEntry.h
* FIX : now, the DocEntries are all deleted in the gdcmElementSet.
[gdcm.git] / src / gdcmBinEntry.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmBinEntry.h,v $
5   Language:  C++
6   Date:      $Date: 2004/11/16 16:20:23 $
7   Version:   $Revision: 1.25 $
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 #ifndef GDCMBINENTRY_H
20 #define GDCMBINENTRY_H
21
22 #include "gdcmValEntry.h"
23
24 #include <iostream>
25
26 namespace gdcm 
27 {
28
29 //-----------------------------------------------------------------------------
30 /**
31  * \ingroup BinEntry
32  * \brief   The dicom header of a Dicom file contains a set of such entries
33  *          (when successfuly parsed against a given Dicom dictionary)
34  *          This one contains a 'string value'.
35  */
36 class GDCM_EXPORT BinEntry  : public ValEntry
37 {
38 public:
39    BinEntry( DictEntry* e );
40    BinEntry( DocEntry* d ); 
41
42    ~BinEntry();
43    
44    void Print( std::ostream &os = std::cout );
45    void Write( std::ofstream*, FileType );
46
47    /// \brief Returns the area value of the current Dicom Header Entry
48    ///  when it's not string-translatable (e.g : a LUT table)         
49    uint8_t* GetBinArea()  { return BinArea; }
50    void  SetBinArea( uint8_t* area, bool self = true );
51
52 private:
53    /// \brief unsecure memory area to hold 'non string' values 
54    ///       (ie : Lookup Tables, overlays, icons)   
55    uint8_t* BinArea;
56    bool SelfArea;
57 };
58 } // end namespace gdcm
59 //-----------------------------------------------------------------------------
60 #endif
61