GDCM
2.2.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
Source
MessageExchangeDefinition
gdcmAbstractSyntax.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 GDCMABSTRACTSYNTAX_H
15
#define GDCMABSTRACTSYNTAX_H
16
17
#include "
gdcmTypes.h
"
18
#include "
gdcmUIDs.h
"
19
#include "
gdcmDataElement.h
"
20
21
namespace
gdcm
22
{
23
24
namespace
network
25
{
26
32
class
AbstractSyntax
33
{
34
public
:
35
AbstractSyntax
();
36
std::istream &
Read
(std::istream &is);
37
const
std::ostream &
Write
(std::ostream &os)
const
;
38
39
void
SetName
(
const
char
*name ) { UpdateName( name ); }
40
const
char
*
GetName
()
const
{
return
Name.c_str(); }
41
42
// accept a UIDs::TSType also...
43
void
SetNameFromUID
(
UIDs::TSName
tsname );
44
//now that the PresentationContext messes around with UIDs and returns a string
45
//use that string as well.
46
//void SetNameFromUIDString( const std::string& inUIDName );
47
48
size_t
Size
()
const
;
49
50
void
Print
(std::ostream &os)
const
;
51
52
bool
operator==
(
const
AbstractSyntax
& as)
const
53
{
54
return
Name == as.Name;
55
}
56
57
DataElement
GetAsDataElement
()
const
;
58
59
private
:
60
void
UpdateName(
const
char
*name );
61
static
const
uint8_t ItemType;
62
static
const
uint8_t Reserved2;
63
uint16_t ItemLength;
// len of
64
std::string
/*AbstractSyntax*/
Name;
// UID
65
};
66
67
}
// end namespace network
68
}
// end namespace gdcm
69
70
#endif //GDCMABSTRACTSYNTAX_H
Generated on Wed Jun 13 2012 20:40:37 for GDCM by
1.8.1