1 /*=========================================================================
4 Module: $RCSfile: gdcmUtil.cxx,v $
6 Date: $Date: 2005/02/05 01:37:09 $
7 Version: $Revision: 1.132 $
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 =========================================================================*/
20 #include "gdcmDebug.h"
23 // For GetCurrentDate, GetCurrentTime
25 #include <sys/types.h>
28 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__)
29 #include <sys/timeb.h>
34 #include <stdarg.h> //only included in implementation file
35 #include <stdio.h> //only included in implementation file
37 #if defined(_MSC_VER) || defined(__MINGW32__)
38 #include <winsock.h> // for gethostname and gethostbyname
42 #include <unistd.h> // for gethostname
43 #include <netdb.h> // for gethostbyname
55 #include <sys/types.h>
58 #ifdef CMAKE_HAVE_SYS_IOCTL_H
59 #include <sys/ioctl.h> // For SIOCGIFCONF on Linux
61 #ifdef CMAKE_HAVE_SYS_SOCKET_H
62 #include <sys/socket.h>
64 #ifdef CMAKE_HAVE_SYS_SOCKIO_H
65 #include <sys/sockio.h> // For SIOCGIFCONF on SunOS
67 #ifdef CMAKE_HAVE_NET_IF_H
70 #ifdef CMAKE_HAVE_NETINET_IN_H
71 #include <netinet/in.h> //For IPPROTO_IP
73 #ifdef CMAKE_HAVE_NET_IF_DL_H
74 #include <net/if_dl.h>
76 #if defined(CMAKE_HAVE_NET_IF_ARP_H) && defined(__sun)
77 // This is absolutely necessary on SunOS
78 #include <net/if_arp.h>
81 // For GetCurrentThreadID()
83 #include <sys/types.h>
84 #include <linux/unistd.h>
92 //-------------------------------------------------------------------------
93 const std::string Util::GDCM_UID = "1.2.826.0.1.3680043.2.1143";
94 std::string Util::RootUID = GDCM_UID;
96 //-------------------------------------------------------------------------
99 * \brief Provide a better 'c++' approach for sprintf
100 * For example c code is:
101 * sprintf(trash, "%04x|%04x", group , elem);
104 * std::ostringstream buf;
105 * buf << std::right << std::setw(4) << std::setfill('0') << std::hex
106 * << group << "|" << std::right << std::setw(4) << std::setfill('0')
107 * << std::hex << elem;
111 * Format("%04x|%04x", group , elem);
113 std::string Util::Format(const char *format, ...)
117 va_start(args, format);
118 vsprintf(buffer, format, args); //might be a security flaw
119 va_end(args); // Each invocation of va_start should be matched
120 // by a corresponding invocation of va_end
121 // args is then 'undefined'
127 * \brief Because not available in C++ (?)
129 void Util::Tokenize (const std::string &str,
130 std::vector<std::string> &tokens,
131 const std::string &delimiters)
133 std::string::size_type lastPos = str.find_first_not_of(delimiters,0);
134 std::string::size_type pos = str.find_first_of (delimiters,lastPos);
135 while (std::string::npos != pos || std::string::npos != lastPos)
137 tokens.push_back(str.substr(lastPos, pos - lastPos));
138 lastPos = str.find_first_not_of(delimiters, pos);
139 pos = str.find_first_of (delimiters, lastPos);
144 * \brief Because not available in C++ (?)
145 * Counts the number of occurences of a substring within a string
148 int Util::CountSubstring (const std::string &str,
149 const std::string &subStr)
151 int count = 0; // counts how many times it appears
152 std::string::size_type x = 0; // The index position in the string
156 x = str.find(subStr,x); // Find the substring
157 if (x != std::string::npos) // If present
159 count++; // increase the count
160 x += subStr.length(); // Skip this word
163 while (x != std::string::npos); // Carry on until not present
169 * \brief Weed out a string from the non-printable characters (in order
170 * to avoid corrupting the terminal of invocation when printing)
171 * @param s string to remove non printable characters from
173 std::string Util::CreateCleanString(std::string const &s)
177 for(unsigned int i=0; i<str.size(); i++)
179 if(!isprint((unsigned char)str[i]))
187 if(!isprint((unsigned char)s[str.size()-1]))
189 if(s[str.size()-1] == 0)
191 str[str.size()-1] = ' ';
200 * \brief Add a SEPARATOR to the end of the name is necessary
201 * @param pathname file/directory name to normalize
203 std::string Util::NormalizePath(std::string const &pathname)
205 const char SEPARATOR_X = '/';
206 const char SEPARATOR_WIN = '\\';
207 const std::string SEPARATOR = "/";
208 std::string name = pathname;
209 int size = name.size();
211 if( name[size-1] != SEPARATOR_X && name[size-1] != SEPARATOR_WIN )
219 * \brief Get the (directory) path from a full path file name
220 * @param fullName file/directory name to extract Path from
222 std::string Util::GetPath(std::string const &fullName)
224 std::string res = fullName;
225 int pos1 = res.rfind("/");
226 int pos2 = res.rfind("\\");
240 * \brief Get the (last) name of a full path file name
241 * @param fullName file/directory name to extract end name from
243 std::string Util::GetName(std::string const &fullName)
245 std::string filename = fullName;
247 std::string::size_type slash_pos = filename.rfind("/");
248 std::string::size_type backslash_pos = filename.rfind("\\");
249 slash_pos = slash_pos > backslash_pos ? slash_pos : backslash_pos;
250 if(slash_pos != std::string::npos)
252 return filename.substr(slash_pos + 1);
261 * \brief Get the current date of the system in a dicom string
263 std::string Util::GetCurrentDate()
268 strftime(tmp,512,"%Y%m%d", localtime(&tloc) );
273 * \brief Get the current time of the system in a dicom string
275 std::string Util::GetCurrentTime()
280 strftime(tmp,512,"%H%M%S", localtime(&tloc) );
285 * \brief Get both the date and time at the same time to avoid problem
286 * around midnight where two call could be before and after midnight
288 std::string Util::GetCurrentDateTime()
294 // We need implementation specific functions to obtain millisecond precision
295 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__)
299 milliseconds = tb.millitm;
302 gettimeofday (&tv, NULL);
304 // Compute milliseconds from microseconds.
305 milliseconds = tv.tv_usec / 1000;
307 // Obtain the time of day, and convert it to a tm struct.
308 struct tm *ptm = localtime (&timep);
309 // Format the date and time, down to a single second.
310 strftime (tmp, sizeof (tmp), "%Y%m%d%H%M%S", ptm);
314 r += Format("%03ld", milliseconds);
319 unsigned int Util::GetCurrentThreadID()
321 // FIXME the implementation is far from complete
322 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__)
323 return (unsigned int)GetCurrentThreadId();
327 // Doesn't work on fedora, but is in the man page...
328 //return (unsigned int)gettid();
331 return (unsigned int)thr_self();
333 //default implementation
338 unsigned int Util::GetCurrentProcessID()
340 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__)
341 // NOTE: There is also a _getpid()...
342 return (unsigned int)GetCurrentProcessId();
344 // get process identification, POSIX
345 return (unsigned int)getpid();
350 * \brief tells us if the processor we are working with is BigEndian or not
352 bool Util::IsCurrentProcessorBigEndian()
354 #ifdef GDCM_WORDS_BIGENDIAN
362 * \brief Create a /DICOM/ string:
363 * It should a of even length (no odd length ever)
364 * It can contain as many (if you are reading this from your
365 * editor the following character is is backslash followed by zero
366 * that needed to be escaped with an extra backslash for doxygen) \\0
369 std::string Util::DicomString(const char *s, size_t l)
371 std::string r(s, s+l);
372 gdcmAssertMacro( !(r.size() % 2) ); // == basically 'l' is even
377 * \brief Create a /DICOM/ string:
378 * It should a of even length (no odd length ever)
379 * It can contain as many (if you are reading this from your
380 * editor the following character is is backslash followed by zero
381 * that needed to be escaped with an extra backslash for doxygen) \\0
383 * This function is similar to DicomString(const char*),
384 * except it doesn't take a length.
385 * It only pad with a null character if length is odd
387 std::string Util::DicomString(const char *s)
389 size_t l = strlen(s);
394 std::string r(s, s+l);
395 gdcmAssertMacro( !(r.size() % 2) );
400 * \brief Safely compare two Dicom String:
401 * - Both string should be of even length
402 * - We allow padding of even length string by either a null
403 * character of a space
405 bool Util::DicomStringEqual(const std::string &s1, const char *s2)
407 // s2 is the string from the DICOM reference: 'MONOCHROME1'
408 std::string s1_even = s1; //Never change input parameter
409 std::string s2_even = DicomString( s2 );
410 if( s1_even[s1_even.size()-1] == ' ')
412 s1_even[s1_even.size()-1] = '\0'; //replace space character by null
414 return s1_even == s2_even;
418 typedef BOOL(WINAPI * pSnmpExtensionInit) (
419 IN DWORD dwTimeZeroReference,
420 OUT HANDLE * hPollForTrapEvent,
421 OUT AsnObjectIdentifier * supportedView);
423 typedef BOOL(WINAPI * pSnmpExtensionTrap) (
424 OUT AsnObjectIdentifier * enterprise,
425 OUT AsnInteger * genericTrap,
426 OUT AsnInteger * specificTrap,
427 OUT AsnTimeticks * timeStamp,
428 OUT RFC1157VarBindList * variableBindings);
430 typedef BOOL(WINAPI * pSnmpExtensionQuery) (
432 IN OUT RFC1157VarBindList * variableBindings,
433 OUT AsnInteger * errorStatus,
434 OUT AsnInteger * errorIndex);
436 typedef BOOL(WINAPI * pSnmpExtensionInitEx) (
437 OUT AsnObjectIdentifier * supportedView);
441 int GetMacAddrSys ( unsigned char *addr )
445 if (WSAStartup(MAKEWORD(2, 0), &WinsockData) != 0)
447 std::cerr << "This program requires Winsock 2.x!" << std::endl;
451 HANDLE PollForTrapEvent;
452 AsnObjectIdentifier SupportedView;
453 UINT OID_ifEntryType[] = { 1, 3, 6, 1, 2, 1, 2, 2, 1, 3 };
454 UINT OID_ifEntryNum[] = { 1, 3, 6, 1, 2, 1, 2, 1 };
455 UINT OID_ipMACEntAddr[] = { 1, 3, 6, 1, 2, 1, 2, 2, 1, 6 };
456 AsnObjectIdentifier MIB_ifMACEntAddr = {
457 sizeof(OID_ipMACEntAddr) / sizeof(UINT), OID_ipMACEntAddr };
458 AsnObjectIdentifier MIB_ifEntryType = {
459 sizeof(OID_ifEntryType) / sizeof(UINT), OID_ifEntryType };
460 AsnObjectIdentifier MIB_ifEntryNum = {
461 sizeof(OID_ifEntryNum) / sizeof(UINT), OID_ifEntryNum };
462 RFC1157VarBindList varBindList;
463 RFC1157VarBind varBind[2];
464 AsnInteger errorStatus;
465 AsnInteger errorIndex;
466 AsnObjectIdentifier MIB_NULL = { 0, 0 };
471 // Load the SNMP dll and get the addresses of the functions necessary
472 HINSTANCE m_hInst = LoadLibrary("inetmib1.dll");
473 if (m_hInst < (HINSTANCE) HINSTANCE_ERROR)
477 pSnmpExtensionInit m_Init =
478 (pSnmpExtensionInit) GetProcAddress(m_hInst, "SnmpExtensionInit");
479 pSnmpExtensionQuery m_Query =
480 (pSnmpExtensionQuery) GetProcAddress(m_hInst, "SnmpExtensionQuery");
481 m_Init(GetTickCount(), &PollForTrapEvent, &SupportedView);
483 /* Initialize the variable list to be retrieved by m_Query */
484 varBindList.list = varBind;
485 varBind[0].name = MIB_NULL;
486 varBind[1].name = MIB_NULL;
488 // Copy in the OID to find the number of entries in the
490 varBindList.len = 1; // Only retrieving one item
491 SNMP_oidcpy(&varBind[0].name, &MIB_ifEntryNum);
492 m_Query(ASN_RFC1157_GETNEXTREQUEST, &varBindList, &errorStatus,
494 // printf("# of adapters in this system : %i\n",
495 // varBind[0].value.asnValue.number);
498 // Copy in the OID of ifType, the type of interface
499 SNMP_oidcpy(&varBind[0].name, &MIB_ifEntryType);
501 // Copy in the OID of ifPhysAddress, the address
502 SNMP_oidcpy(&varBind[1].name, &MIB_ifMACEntAddr);
506 // Submit the query. Responses will be loaded into varBindList.
507 // We can expect this call to succeed a # of times corresponding
508 // to the # of adapters reported to be in the system
509 ret = m_Query(ASN_RFC1157_GETNEXTREQUEST, &varBindList, &errorStatus,
517 // Confirm that the proper type has been returned
518 ret = SNMP_oidncmp(&varBind[0].name, &MIB_ifEntryType,
519 MIB_ifEntryType.idLength);
524 dtmp = varBind[0].value.asnValue.number;
526 // Type 6 describes ethernet interfaces
529 // Confirm that we have an address here
530 ret = SNMP_oidncmp(&varBind[1].name, &MIB_ifMACEntAddr,
531 MIB_ifMACEntAddr.idLength);
532 if ( !ret && varBind[1].value.asnValue.address.stream != NULL )
534 if ( (varBind[1].value.asnValue.address.stream[0] == 0x44)
535 && (varBind[1].value.asnValue.address.stream[1] == 0x45)
536 && (varBind[1].value.asnValue.address.stream[2] == 0x53)
537 && (varBind[1].value.asnValue.address.stream[3] == 0x54)
538 && (varBind[1].value.asnValue.address.stream[4] == 0x00) )
540 // Ignore all dial-up networking adapters
541 std::cerr << "Interface #" << j << " is a DUN adapter\n";
544 if ( (varBind[1].value.asnValue.address.stream[0] == 0x00)
545 && (varBind[1].value.asnValue.address.stream[1] == 0x00)
546 && (varBind[1].value.asnValue.address.stream[2] == 0x00)
547 && (varBind[1].value.asnValue.address.stream[3] == 0x00)
548 && (varBind[1].value.asnValue.address.stream[4] == 0x00)
549 && (varBind[1].value.asnValue.address.stream[5] == 0x00) )
551 // Ignore NULL addresses returned by other network
553 std::cerr << "Interface #" << j << " is a NULL address\n";
556 memcpy( addr, varBind[1].value.asnValue.address.stream, 6);
563 SNMP_FreeVarBind(&varBind[0]);
564 SNMP_FreeVarBind(&varBind[1]);
566 #endif //Win32 version
569 // implementation for POSIX system
571 //The POSIX version is broken anyway on Solaris, plus would require full
573 struct arpreq parpreq;
574 struct sockaddr_in *psa;
575 struct hostent *phost;
576 char hostname[MAXHOSTNAMELEN];
580 if(gethostname(hostname, MAXHOSTNAMELEN) != 0)
582 perror("gethostname");
585 phost = gethostbyname(hostname);
586 paddrs = phost->h_addr_list;
588 sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
594 memset(&parpreq, 0, sizeof(struct arpreq));
595 psa = (struct sockaddr_in *) &parpreq.arp_pa;
597 memset(psa, 0, sizeof(struct sockaddr_in));
598 psa->sin_family = AF_INET;
599 memcpy(&psa->sin_addr, *paddrs, sizeof(struct in_addr));
601 status = ioctl(sock, SIOCGARP, &parpreq);
607 memcpy(addr, parpreq.arp_ha.sa_data, 6);
611 #ifdef CMAKE_HAVE_NET_IF_H
613 struct ifreq ifr, *ifrp;
618 #if defined(AF_LINK) && (!defined(SIOCGIFHWADDR) && !defined(SIOCGENADDR))
619 struct sockaddr_dl *sdlp;
623 // BSD 4.4 defines the size of an ifreq to be
624 // max(sizeof(ifreq), sizeof(ifreq.ifr_name)+ifreq.ifr_addr.sa_len
625 // However, under earlier systems, sa_len isn't present, so the size is
626 // just sizeof(struct ifreq)
627 // We should investiage the use of SIZEOF_ADDR_IFREQ
631 #define max(a,b) ((a) > (b) ? (a) : (b))
633 #define ifreq_size(i) max(sizeof(struct ifreq),\
634 sizeof((i).ifr_name)+(i).ifr_addr.sa_len)
636 #define ifreq_size(i) sizeof(struct ifreq)
637 #endif // HAVE_SA_LEN
639 if( (sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP)) < 0 )
643 memset(buf, 0, sizeof(buf));
644 ifc.ifc_len = sizeof(buf);
646 if (ioctl (sd, SIOCGIFCONF, (char *)&ifc) < 0)
652 for (i = 0; i < n; i+= ifreq_size(*ifrp) )
654 ifrp = (struct ifreq *)((char *) ifc.ifc_buf+i);
655 strncpy(ifr.ifr_name, ifrp->ifr_name, IFNAMSIZ);
657 if (ioctl(sd, SIOCGIFHWADDR, &ifr) < 0)
659 a = (unsigned char *) &ifr.ifr_hwaddr.sa_data;
662 // In theory this call should also work on Sun Solaris, but apparently
663 // SIOCGENADDR is not implemented properly thus the call
664 // ioctl(sd, SIOCGENADDR, &ifr) always returns errno=2
665 // (No such file or directory)
666 // Furthermore the DLAPI seems to require full root access
667 if (ioctl(sd, SIOCGENADDR, &ifr) < 0)
669 a = (unsigned char *) ifr.ifr_enaddr;
672 sdlp = (struct sockaddr_dl *) &ifrp->ifr_addr;
673 if ((sdlp->sdl_family != AF_LINK) || (sdlp->sdl_alen != 6))
675 a = (unsigned char *) &sdlp->sdl_data[sdlp->sdl_nlen];
677 perror("No way to access hardware");
681 #endif // SIOCGENADDR
682 #endif // SIOCGIFHWADDR
683 if (!a[0] && !a[1] && !a[2] && !a[3] && !a[4] && !a[5]) continue;
694 // Not implemented platforms
695 perror("There was a configuration problem on your plateform");
702 * Mini function to return the last digit from a number express in base 256
703 * pre condition data contain an array of 6 unsigned char
704 * post condition carry contain the last digit
706 inline int getlastdigit(unsigned char *data)
708 int extended, carry = 0;
711 extended = (carry << 8) + data[i];
712 data[i] = extended / 10;
713 carry = extended % 10;
719 * \brief Encode the mac address on a fixed lenght string of 15 characters.
720 * we save space this way.
722 std::string Util::GetMACAddress()
724 // This code is the result of a long internet search to find something
725 // as compact as possible (not OS independant). We only have to separate
726 // 3 OS: Win32, SunOS and 'real' POSIX
727 // http://groups-beta.google.com/group/comp.unix.solaris/msg/ad36929d783d63be
728 // http://bdn.borland.com/article/0,1410,26040,00.html
729 unsigned char addr[6];
731 int stat = GetMacAddrSys(addr);
734 // We need to convert a 6 digit number from base 256 to base 10, using integer
735 // would requires a 48bits one. To avoid this we have to reimplement the div + modulo
742 res = getlastdigit(addr);
743 sres.insert(sres.begin(), '0' + res);
744 zero = (addr[0] == 0) && (addr[1] == 0) && (addr[2] == 0) && (addr[3] == 0) && (addr[4] == 0) && (addr[5] == 0);
751 gdcmWarningMacro("Problem in finding the MAC Address");
757 * \brief Creates a new UID. As stipulate in the DICOM ref
758 * each time a DICOM image is create it should have
759 * a unique identifier (URI)
760 * @param root is the DICOM prefix assigned by IOS group
762 std::string Util::CreateUniqueUID(const std::string &root)
768 // gdcm UID prefix, as supplied by http://www.medicalconnections.co.uk
776 // A root was specified use it to forge our new UID:
778 append += Util::GetMACAddress();
780 append += Util::GetCurrentDateTime();
782 //Also add a mini random number just in case:
783 int r = (int) (100.0*rand()/RAND_MAX);
784 append += Format("%02d", r);
786 // If append is too long we need to rehash it
787 if( (prefix + append).size() > 64 )
789 gdcmErrorMacro( "Size of UID is too long." );
790 // we need a hash function to truncate this number
791 // if only md5 was cross plateform
795 return prefix + append;
798 void Util::SetRootUID(const std::string &root)
806 const std::string &Util::GetRootUID()
811 //-------------------------------------------------------------------------
814 * @param os ostream to write to
818 std::ostream &binary_write(std::ostream &os, const T &val)
820 return os.write(reinterpret_cast<const char*>(&val), sizeof val);
824 * \brief binary_write binary_write
825 * @param os ostream to write to
828 std::ostream &binary_write(std::ostream &os, const uint16_t &val)
830 #ifdef GDCM_WORDS_BIGENDIAN
832 swap = ((( val << 8 ) & 0xff00 ) | (( val >> 8 ) & 0x00ff ) );
833 return os.write(reinterpret_cast<const char*>(&swap), 2);
835 return os.write(reinterpret_cast<const char*>(&val), 2);
836 #endif //GDCM_WORDS_BIGENDIAN
840 * \brief binary_write binary_write
841 * @param os ostream to write to
844 std::ostream &binary_write(std::ostream &os, const uint32_t &val)
846 #ifdef GDCM_WORDS_BIGENDIAN
848 swap = ( ((val<<24) & 0xff000000) | ((val<<8) & 0x00ff0000) |
849 ((val>>8) & 0x0000ff00) | ((val>>24) & 0x000000ff) );
850 return os.write(reinterpret_cast<const char*>(&swap), 4);
852 return os.write(reinterpret_cast<const char*>(&val), 4);
853 #endif //GDCM_WORDS_BIGENDIAN
857 * \brief binary_write binary_write
858 * @param os ostream to write to
861 std::ostream &binary_write(std::ostream &os, const char *val)
863 return os.write(val, strlen(val));
868 * @param os ostream to write to
871 std::ostream &binary_write(std::ostream &os, std::string const &val)
873 return os.write(val.c_str(), val.size());
876 //-------------------------------------------------------------------------
879 //-------------------------------------------------------------------------
882 * \brief Return the IP adress of the machine writting the DICOM image
884 std::string Util::GetIPAddress()
886 // This is a rip from
887 // http://www.codeguru.com/Cpp/I-N/internet/network/article.php/c3445/
888 #ifndef HOST_NAME_MAX
889 // SUSv2 guarantees that `Host names are limited to 255 bytes'.
890 // POSIX 1003.1-2001 guarantees that `Host names (not including the
891 // terminating NUL) are limited to HOST_NAME_MAX bytes'.
892 #define HOST_NAME_MAX 255
893 // In this case we should maybe check the string was not truncated.
894 // But I don't known how to check that...
895 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__)
896 // with WinSock DLL we need to initialize the WinSock before using gethostname
897 WORD wVersionRequested = MAKEWORD(1,0);
899 int err = WSAStartup(wVersionRequested,&WSAData);
902 // Tell the user that we could not find a usable
909 #endif //HOST_NAME_MAX
912 char szHostName[HOST_NAME_MAX+1];
913 int r = gethostname(szHostName, HOST_NAME_MAX);
918 struct hostent *pHost = gethostbyname(szHostName);
920 for( int i = 0; pHost!= NULL && pHost->h_addr_list[i]!= NULL; i++ )
922 for( int j = 0; j<pHost->h_length; j++ )
924 if( j > 0 ) str += ".";
926 str += Util::Format("%u",
927 (unsigned int)((unsigned char*)pHost->h_addr_list[i])[j]);
929 // str now contains one local IP address
931 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__)
937 // If an error occur r == -1
938 // Most of the time it will return 127.0.0.1...
942 //-------------------------------------------------------------------------
943 } // end namespace gdcm