GDCM 2.2.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

gdcmTesting.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 GDCMTESTING_H
15 #define GDCMTESTING_H
16
17 #include "gdcmTypes.h"
18
19 #include <iostream>
20
21 namespace gdcm
22 {
30 //-----------------------------------------------------------------------------
31 class GDCM_EXPORT Testing
32 {
33 public :
34 Testing() {};
35 ~Testing() {};
36
42 static bool ComputeMD5(const char *buffer, unsigned long buf_len,
43 char digest_str[33]);
44 static bool ComputeFileMD5(const char *filename, char digest_str[33]);
45
47 void Print(std::ostream &os = std::cout);
48
50 static const char * const * GetFileNames();
51 static unsigned int GetNumberOfFileNames();
52 static const char * GetFileName(unsigned int file);
53
55 typedef const char* const (*MediaStorageDataFilesType)[2];
56 static MediaStorageDataFilesType GetMediaStorageDataFiles();
57 static unsigned int GetNumberOfMediaStorageDataFiles();
58 static const char * const * GetMediaStorageDataFile(unsigned int file);
59 static const char * GetMediaStorageFromFile(const char *filepath);
60
63 typedef const char* const (*MD5DataImagesType)[2];
64 static MD5DataImagesType GetMD5DataImages();
65 static unsigned int GetNumberOfMD5DataImages();
66 static const char * const * GetMD5DataImage(unsigned int file);
67 static const char * GetMD5FromFile(const char *filepath);
68
71 static const char * GetMD5FromBrokenFile(const char *filepath);
72
75 static std::streamoff GetStreamOffsetFromFile(const char *filepath);
76
80 static std::streamoff GetSelectedTagsOffsetFromFile(const char *filepath);
81
86 static int GetLossyFlagFromFile(const char *filepath);
87
89 static const char * GetDataRoot();
90
92 static const char * GetDataExtraRoot();
93
95 static const char * GetPixelSpacingDataRoot();
96
99 static const char * GetTempDirectory(const char * subdir = 0);
100
102 static const wchar_t *GetTempDirectoryW(const wchar_t * subdir = 0);
103
105 static const char * GetTempFilename(const char *filename, const char * subdir = 0);
106
108 static const wchar_t* GetTempFilenameW(const wchar_t *filename, const wchar_t* subdir = 0);
109
110 static const char *GetSourceDirectory();
111 };
112 } // end namespace gdcm
113 //-----------------------------------------------------------------------------
114 #endif //GDCMTESTING_H