GDCM 2.2.0

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

- File List
- File Members

gdcmTesting.h
Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program: GDCM (Grassroots DICOM). A DICOM library
    00004
    00005   Copyright (c) 2006-2011 Mathieu Malaterre
    00006   All rights reserved.
    00007   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
    00008
    00009      This software is distributed WITHOUT ANY WARRANTY; without even
    00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00011      PURPOSE.  See the above copyright notice for more information.
    00012
    00013 =========================================================================*/
    00014 #ifndef GDCMTESTING_H
    00015 #define GDCMTESTING_H
    00016
    00017 #include "gdcmTypes.h"
    00018
    00019 #include <iostream>
    00020
    00021 namespace gdcm
    00022 {
    00030 //-----------------------------------------------------------------------------
    00031 class GDCM_EXPORT Testing
    00032 {
    00033 public :
    00034   Testing() {};
    00035   ~Testing() {};
    00036
    00042   static bool ComputeMD5(const char *buffer, unsigned long buf_len,
    00043     char digest_str[33]);
    00044   static bool ComputeFileMD5(const char *filename, char digest_str[33]);
    00045
    00047   void Print(std::ostream &os = std::cout);
    00048
    00050   static const char * const * GetFileNames();
    00051   static unsigned int GetNumberOfFileNames();
    00052   static const char * GetFileName(unsigned int file);
    00053
    00055   typedef const char* const (*MediaStorageDataFilesType)[2];
    00056   static MediaStorageDataFilesType GetMediaStorageDataFiles();
    00057   static unsigned int GetNumberOfMediaStorageDataFiles();
    00058   static const char * const * GetMediaStorageDataFile(unsigned int file);
    00059   static const char * GetMediaStorageFromFile(const char *filepath);
    00060
    00063   typedef const char* const (*MD5DataImagesType)[2];
    00064   static MD5DataImagesType GetMD5DataImages();
    00065   static unsigned int GetNumberOfMD5DataImages();
    00066   static const char * const * GetMD5DataImage(unsigned int file);
    00067   static const char * GetMD5FromFile(const char *filepath);
    00068
    00071   static const char * GetMD5FromBrokenFile(const char *filepath);
    00072
    00075   static std::streamoff GetStreamOffsetFromFile(const char *filepath);
    00076
    00080   static std::streamoff GetSelectedTagsOffsetFromFile(const char *filepath);
    00081
    00086   static int GetLossyFlagFromFile(const char *filepath);
    00087
    00089   static const char * GetDataRoot();
    00090
    00092   static const char * GetDataExtraRoot();
    00093
    00095   static const char * GetPixelSpacingDataRoot();
    00096
    00099   static const char * GetTempDirectory(const char * subdir = 0);
    00100
    00102   static const wchar_t *GetTempDirectoryW(const wchar_t * subdir = 0);
    00103
    00105   static const char * GetTempFilename(const char *filename, const char * subdir = 0);
    00106
    00108   static const wchar_t* GetTempFilenameW(const wchar_t *filename, const wchar_t* subdir = 0);
    00109
    00110   static const char *GetSourceDirectory();
    00111 };
    00112 } // end namespace gdcm
    00113 //-----------------------------------------------------------------------------
    00114 #endif //GDCMTESTING_H