7 #pragma warning(disable : 4996) 24 #define CM_CAST(TYPE, EXPR) static_cast<TYPE>(EXPR) 26 #define CM_CAST(TYPE, EXPR) (TYPE)(EXPR) 40 "mitkDICOMReaderConfiguratorTest",
44 "mitkDICOMDCMTKTagScannerTest",
48 "mitkDICOMSimpleVolumeImportTest",
52 "mitkDICOMTagPathTest",
56 "mitkDICOMPropertyTest",
60 "mitkDICOMFileReaderTest",
64 "mitkDICOMITKSeriesGDCMReaderBasicsTest",
81 stringSize =
CM_CAST(
size_t, strlen(
string) + 1);
82 new_string =
CM_CAST(
char*, malloc(
sizeof(
char) * stringSize));
84 if (new_string == NULL) {
87 strcpy(new_string,
string);
88 for (p = new_string; *p != 0; ++p) {
89 *p =
CM_CAST(
char, tolower(*p));
94 int main(
int ac,
char* av[])
96 int i, testNum = 0, partial_match;
106 printf(
"Available tests:\n");
110 printf(
"To run a test, enter the test number: ");
112 if (scanf(
"%d", &testNum) != 1) {
113 printf(
"Couldn't parse that input as a number\n");
116 if (testNum >= NumTests) {
117 printf(
"%3d is an invalid test number.\n", testNum);
127 if (testToRun == -1 && ac > 1) {
128 partial_match = (strcmp(av[1],
"-R") == 0) ? 1 : 0;
130 if (partial_match != 0 && ac < 3) {
131 printf(
"-R needs an additional parameter.\n");
134 if (testToRun == -1) {
137 for (i = 0; i <
NumTests && testToRun == -1; ++i) {
139 if (partial_match != 0 && strstr(test_name, arg) != NULL) {
143 }
else if (partial_match == 0 && strcmp(test_name, arg) == 0) {
151 if (testToRun != -1) {
154 for (
int avIndex = 1; avIndex < ac; ++avIndex)
globalCmdLineArgs.push_back(av[avIndex]);
157 if (testToRun < 0 || testToRun >=
NumTests) {
158 printf(
"testToRun was modified by TestDriver code to an invalid value: " 169 printf(
"Available tests:\n");
173 printf(
"Failed: %s is an invalid test name.\n", av[1]);
int mitkDICOMDCMTKTagScannerTest(int, char *[])
static void Register()
registers MITK logging backend at mbilog
static const int NumTests
#define CM_CAST(TYPE, EXPR)
int mitkDICOMFileReaderTest(int, char *[])
int mitkDICOMITKSeriesGDCMReaderBasicsTest(int, char *[])
int(* MainFuncPointer)(int, char *[])
int mitkDICOMPropertyTest(int, char *[])
int mitkDICOMReaderConfiguratorTest(int, char *[])
Verify serialization ability of DICOMReaderConfigurator.
static functionMapEntry cmakeGeneratedFunctionMapEntries[]
static char * lowercase(const char *string)
int mitkDICOMSimpleVolumeImportTest(int, char *[])
Verify single block reading of SimpleDICOMvolumeImport for sloppily tagged data.
static void Unregister()
Unregisters MITK logging backend at mbilog.
int mitkDICOMTagPathTest(int, char *[])
int main(int ac, char *av[])
std::vector< std::string > globalCmdLineArgs