GDCM 2.0.17

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-2010 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 
00072   static const char * GetMD5FromBrokenFile(const char *filepath);
00073 
00076   static std::streamoff GetStreamOffsetFromFile(const char *filepath);
00077 
00081   static std::streamoff GetSelectedTagsOffsetFromFile(const char *filepath);
00082 
00087   static int GetLossyFlagFromFile(const char *filepath);
00088 
00090   static const char * GetDataRoot();
00091 
00093   static const char * GetDataExtraRoot();
00094 
00096   static const char * GetPixelSpacingDataRoot();
00097 
00100   static const char * GetTempDirectory(const char * subdir = 0);
00101 
00103   static const wchar_t *GetTempDirectoryW(const wchar_t * subdir = 0);
00104 
00106   static const char * GetTempFilename(const char *filename, const char * subdir = 0);
00107 
00109   static const wchar_t* GetTempFilenameW(const wchar_t *filename, const wchar_t* subdir = 0);
00110 
00111   static const char *GetSourceDirectory();
00112 };
00113 } // end namespace gdcm
00114 //-----------------------------------------------------------------------------
00115 #endif //GDCMTESTING_H

Generated on Tue Feb 1 2011 23:59:12 for GDCM by doxygen 1.7.3
SourceForge.net Logo