15 #ifndef GDCMPERSONNAME_H
16 #define GDCMPERSONNAME_H
32 static const unsigned int MaxNumberOfComponents = 5;
33 static const unsigned int MaxLength = 64;
34 char Component[MaxNumberOfComponents][MaxLength+1];
35 static const char Separator =
'^';
36 static const char Padding =
' ';
40 for(
unsigned int i = 0; i < 5; ++i) {
41 if( *Component[i] !=
'\0' ) r = i;
46 void SetBlob(
const std::vector<char>& v) {
51 const char *comp2 =
"",
52 const char *comp3 =
"",
53 const char *comp4 =
"",
54 const char *comp5 =
"") {
55 const char *components[5] = { comp1, comp2, comp3, comp4, comp5 };
56 SetComponents( components );
59 for(
unsigned int i = 0; i < 5; ++i) {
61 assert( strlen(components[i]) < GetMaxLength() );
62 strcpy(Component[i], components[i]);
63 assert( strlen(Component[i]) < GetMaxLength() );
66 void Print(std::ostream &os)
const
73 os << Component[0] <<
'^';
74 os << Component[1] <<
'^';
75 os << Component[2] <<
'^';
76 os << Component[3] <<
'^';
83 #endif //GDCMPERSONNAME_H
unsigned int GetMaxLength() const
Definition: gdcmPersonName.h:45
PersonName class.
Definition: gdcmPersonName.h:29
void SetComponents(const char *comp1="", const char *comp2="", const char *comp3="", const char *comp4="", const char *comp5="")
Definition: gdcmPersonName.h:50
unsigned int GetNumberOfComponents() const
Definition: gdcmPersonName.h:38
#define GDCM_EXPORT
Definition: gdcmWin32.h:34
void SetComponents(const char *components[])
Definition: gdcmPersonName.h:58
void Print(std::ostream &os) const
Definition: gdcmPersonName.h:66
void SetBlob(const std::vector< char > &v)
Definition: gdcmPersonName.h:46