# gdcmTesting.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program: GDCM (Grassroots DICOM). A DICOM library
    00004   Module:  $URL$
    00005
    00006   Copyright (c) 2006-2009 Mathieu Malaterre
    00007   All rights reserved.
    00008   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
    00009
    00010      This software is distributed WITHOUT ANY WARRANTY; without even
    00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00012      PURPOSE.  See the above copyright notice for more information.
    00013
    00014 =========================================================================*/
    00015 #ifndef __gdcmTesting_h
    00016 #define __gdcmTesting_h
    00017
    00018 #include "gdcmTypes.h"
    00019
    00020 #include <iostream>
    00021
    00022 namespace gdcm
    00023 {
    00031 //-----------------------------------------------------------------------------
    00032 class GDCM_EXPORT Testing
    00033 {
    00034 public :
    00035   Testing() {};
    00036   ~Testing() {};
    00037
    00043   static bool ComputeMD5(const char *buffer, unsigned long buf_len,
    00044     char digest_str[33]);
    00045   static bool ComputeFileMD5(const char *filename, char digest_str[33]);
    00046
    00048   void Print(std::ostream &os = std::cout);
    00049
    00051   static const char * const * GetFileNames();
    00052   static unsigned int GetNumberOfFileNames();
    00053   static const char * GetFileName(unsigned int file);
    00054
    00056   typedef const char* const (*MediaStorageDataFilesType)[2];
    00057   static MediaStorageDataFilesType GetMediaStorageDataFiles();
    00058   static unsigned int GetNumberOfMediaStorageDataFiles();
    00059   static const char * const * GetMediaStorageDataFile(unsigned int file);
    00060   static const char * GetMediaStorageFromFile(const char *filepath);
    00061
    00064   typedef const char* const (*MD5DataImagesType)[2];
    00065   static MD5DataImagesType GetMD5DataImages();
    00066   static unsigned int GetNumberOfMD5DataImages();
    00067   static const char * const * GetMD5DataImage(unsigned int file);
    00068   static const char * GetMD5FromFile(const char *filepath);
    00069
    00071   static const char * GetDataRoot();
    00072
    00074   static const char * GetDataExtraRoot();
    00075
    00077   static const char * GetPixelSpacingDataRoot();
    00078
    00081   static const char * GetTempDirectory(const char * subdir = 0);
    00082
    00084   static const char * GetTempFilename(const char *filename, const char * subdir = 0);
    00085
    00086   static const char *GetSourceDirectory();
    00087 };
    00088 } // end namespace gdcm
    00089 //-----------------------------------------------------------------------------
    00090 #endif //__gdcmTesting_h