GDCM 3.0.24
gdcmExplicitImplicitDataElement.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13=========================================================================*/
14#ifndef GDCMEXPLICITIMPLICITDATAELEMENT_H
15#define GDCMEXPLICITIMPLICITDATAELEMENT_H
16
17#include "gdcmDataElement.h"
18
19namespace gdcm
20{
21// Data Element (ExplicitImplicit)
30{
31public:
32 VL GetLength() const;
33
34 template <typename TSwap>
35 std::istream &Read(std::istream &is);
36
37 template <typename TSwap>
38 std::istream &ReadPreValue(std::istream &is);
39
40 template <typename TSwap>
41 std::istream &ReadValue(std::istream &is, bool readvalues = true);
42
43 template <typename TSwap>
44 std::istream &ReadWithLength(std::istream &is, VL & length)
45 {
46 (void)length;
47 return Read<TSwap>(is);
48 }
49
50 // PURPOSELY do not provide an implementation for writing !
51 //template <typename TSwap>
52 //const std::ostream &Write(std::ostream &os) const;
53};
54
55} // end namespace gdcm
56
57#include "gdcmExplicitImplicitDataElement.txx"
58
59#endif //GDCMEXPLICITIMPLICITDATAELEMENT_H
Class to represent a Data Element either Implicit or Explicit.
Definition gdcmDataElement.h:59
Class to read/write a DataElement as ExplicitImplicit Data Element.
Definition gdcmExplicitImplicitDataElement.h:30
std::istream & ReadPreValue(std::istream &is)
std::istream & Read(std::istream &is)
std::istream & ReadWithLength(std::istream &is, VL &length)
Definition gdcmExplicitImplicitDataElement.h:44
std::istream & ReadValue(std::istream &is, bool readvalues=true)
Value Length.
Definition gdcmVL.h:30
#define GDCM_EXPORT
Definition gdcmWin32.h:34
Definition gdcmASN1.h:21