gdcmTesting.h
Go to the documentation of this file.
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef GDCMTESTING_H
#define GDCMTESTING_H
#include "gdcmTypes.h"
#include <iostream>
namespace gdcm
{
//-----------------------------------------------------------------------------
class GDCM_EXPORT Testing
{
public :
Testing() = default;
~Testing() = default;
static bool ComputeMD5(const char *buffer, size_t buf_len,
char digest_str[33]);
static bool ComputeFileMD5(const char *filename, char digest_str[33]);
void Print(std::ostream &os = std::cout);
static const char * const * GetFileNames();
static unsigned int GetNumberOfFileNames();
static const char * GetFileName(unsigned int file);
typedef const char* const (*MediaStorageDataFilesType)[2];
static MediaStorageDataFilesType GetMediaStorageDataFiles();
static unsigned int GetNumberOfMediaStorageDataFiles();
static const char * const * GetMediaStorageDataFile(unsigned int file);
static const char * GetMediaStorageFromFile(const char *filepath);
typedef const char* const (*MD5DataImagesType)[2];
static MD5DataImagesType GetMD5DataImages();
static unsigned int GetNumberOfMD5DataImages();
static const char * const * GetMD5DataImage(unsigned int file);
static const char * GetMD5FromFile(const char *filepath);
static const char * GetMD5FromBrokenFile(const char *filepath);
static std::streamoff GetStreamOffsetFromFile(const char *filepath);
static std::streamoff GetSelectedTagsOffsetFromFile(const char *filepath);
static std::streamoff GetSelectedPrivateGroupOffsetFromFile(const char *filepath);
static int GetLossyFlagFromFile(const char *filepath);
static const char * GetDataRoot();
static const char * GetDataExtraRoot();
static const char * GetPixelSpacingDataRoot();
static const char * GetTempDirectory(const char * subdir = nullptr);
static const wchar_t *GetTempDirectoryW(const wchar_t * subdir = nullptr);
static const char * GetTempFilename(const char *filename, const char * subdir = nullptr);
static const wchar_t* GetTempFilenameW(const wchar_t *filename, const wchar_t* subdir = nullptr);
static const char *GetSourceDirectory();
};
} // end namespace gdcm
//-----------------------------------------------------------------------------
#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