GDCM: gdcmTesting.h Source File

GDCM 3.2.10

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
21namespace gdcm
22{
30//-----------------------------------------------------------------------------
31 class GDCM_EXPORT Testing
32{
33public :
34 Testing() = default;
35 ~Testing() = default;
36
42 static bool ComputeMD5(const char *buffer, size_t 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
85 static std::streamoff GetSelectedPrivateGroupOffsetFromFile(const char *filepath);
86
91 static int GetLossyFlagFromFile(const char *filepath);
92
94 static const char * GetDataRoot();
95
97 static const char * GetDataExtraRoot();
98
100 static const char * GetPixelSpacingDataRoot();
101
104 static const char * GetTempDirectory(const char * subdir = nullptr);
105
107 static const wchar_t *GetTempDirectoryW(const wchar_t * subdir = nullptr);
108
110 static const char * GetTempFilename(const char *filename, const char * subdir = nullptr);
111
113 static const wchar_t* GetTempFilenameW(const wchar_t *filename, const wchar_t* subdir = nullptr);
114
115 static const char *GetSourceDirectory();
116};
117} // end namespace gdcm
118//-----------------------------------------------------------------------------
119#endif //GDCMTESTING_H
gdcm::Testing::ComputeMD5
static bool ComputeMD5(const char *buffer, size_t buf_len, char digest_str[33])
gdcm::Testing::GetSelectedPrivateGroupOffsetFromFile
static std::streamoff GetSelectedPrivateGroupOffsetFromFile(const char *filepath)
gdcm::Testing::GetPixelSpacingDataRoot
static const char * GetPixelSpacingDataRoot()
Return the GDCM PIXEL SPACING DATA ROOT (See David Clunie website for dataset).
gdcm::Testing::GetDataExtraRoot
static const char * GetDataExtraRoot()
Return the GDCM DATA EXTRA ROOT.
gdcm::Testing::GetFileName
static const char * GetFileName(unsigned int file)
gdcm::Testing::GetSelectedTagsOffsetFromFile
static std::streamoff GetSelectedTagsOffsetFromFile(const char *filepath)
gdcm::Testing::GetStreamOffsetFromFile
static std::streamoff GetStreamOffsetFromFile(const char *filepath)
gdcm::Testing::GetNumberOfMD5DataImages
static unsigned int GetNumberOfMD5DataImages()
gdcm::Testing::Print
void Print(std::ostream &os=std::cout)
Print.
gdcm::Testing::GetTempDirectoryW
static const wchar_t * GetTempDirectoryW(const wchar_t *subdir=nullptr)
NOT THREAD SAFE.
gdcm::Testing::MD5DataImagesType
const char *const (* MD5DataImagesType)[2]
Definition gdcmTesting.h:63
gdcm::Testing::~Testing
~Testing()=default
gdcm::Testing::GetMediaStorageFromFile
static const char * GetMediaStorageFromFile(const char *filepath)
gdcm::Testing::Testing
Testing()=default
gdcm::Testing::GetFileNames
static const char *const * GetFileNames()
return the table of fullpath to gdcmData DICOM files:
gdcm::Testing::GetMD5FromFile
static const char * GetMD5FromFile(const char *filepath)
gdcm::Testing::GetLossyFlagFromFile
static int GetLossyFlagFromFile(const char *filepath)
gdcm::Testing::GetMD5DataImage
static const char *const * GetMD5DataImage(unsigned int file)
gdcm::Testing::GetMD5DataImages
static MD5DataImagesType GetMD5DataImages()
gdcm::Testing::GetTempFilename
static const char * GetTempFilename(const char *filename, const char *subdir=nullptr)
NOT THREAD SAFE.
gdcm::Testing::GetTempDirectory
static const char * GetTempDirectory(const char *subdir=nullptr)
gdcm::Testing::GetNumberOfMediaStorageDataFiles
static unsigned int GetNumberOfMediaStorageDataFiles()
gdcm::Testing::GetMD5FromBrokenFile
static const char * GetMD5FromBrokenFile(const char *filepath)
gdcm::Testing::GetDataRoot
static const char * GetDataRoot()
Return the GDCM DATA ROOT.
gdcm::Testing::GetTempFilenameW
static const wchar_t * GetTempFilenameW(const wchar_t *filename, const wchar_t *subdir=nullptr)
NOT THREAD SAFE.
gdcm::Testing::GetMediaStorageDataFile
static const char *const * GetMediaStorageDataFile(unsigned int file)
gdcm::Testing::GetNumberOfFileNames
static unsigned int GetNumberOfFileNames()
gdcm::Testing::GetSourceDirectory
static const char * GetSourceDirectory()
gdcm::Testing::ComputeFileMD5
static bool ComputeFileMD5(const char *filename, char digest_str[33])
gdcm::Testing::MediaStorageDataFilesType
const char *const (* MediaStorageDataFilesType)[2]
return the table that map the media storage (as string) of a filename (gdcmData)
Definition gdcmTesting.h:55
gdcm::Testing::GetMediaStorageDataFiles
static MediaStorageDataFilesType GetMediaStorageDataFiles()
gdcmTypes.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21