7 #pragma warning(disable : 4996) 31 #define CM_CAST(TYPE, EXPR) static_cast<TYPE>(EXPR) 33 #define CM_CAST(TYPE, EXPR) (TYPE)(EXPR) 51 "mitkGIFCurvatureStatisticTest",
55 "mitkGIFFirstOrderHistogramStatisticsTest",
59 "mitkGIFFirstOrderNumericStatisticsTest",
63 "mitkGIFFirstOrderStatisticsTest",
67 "mitkGIFGreyLevelDistanceZoneTest",
71 "mitkGIFGreyLevelSizeZoneTest",
75 "mitkGIFImageDescriptionFeaturesTest",
79 "mitkGIFIntensityVolumeHistogramTest",
83 "mitkGIFLocalIntensityTest",
87 "mitkGIFNeighbourhoodGreyToneDifferenceFeaturesTest",
91 "mitkGIFNeighbouringGreyLevelDependenceFeatureTest",
95 "mitkGIFVolumetricDensityStatisticsTest",
99 "mitkGIFVolumetricStatisticsTest",
113 char *new_string, *p;
116 stringSize =
CM_CAST(
size_t, strlen(
string) + 1);
117 new_string =
CM_CAST(
char*, malloc(
sizeof(
char) * stringSize));
119 if (new_string == NULL) {
122 strcpy(new_string,
string);
123 for (p = new_string; *p != 0; ++p) {
124 *p =
CM_CAST(
char, tolower(*p));
131 int i, testNum = 0, partial_match;
141 printf(
"Available tests:\n");
145 printf(
"To run a test, enter the test number: ");
147 if (scanf(
"%d", &testNum) != 1) {
148 printf(
"Couldn't parse that input as a number\n");
151 if (testNum >= NumTests) {
152 printf(
"%3d is an invalid test number.\n", testNum);
162 if (testToRun == -1 && ac > 1) {
163 partial_match = (strcmp(av[1],
"-R") == 0) ? 1 : 0;
165 if (partial_match != 0 && ac < 3) {
166 printf(
"-R needs an additional parameter.\n");
169 if (testToRun == -1) {
172 for (i = 0; i <
NumTests && testToRun == -1; ++i) {
174 if (partial_match != 0 && strstr(test_name, arg) != NULL) {
178 }
else if (partial_match == 0 && strcmp(test_name, arg) == 0) {
186 if (testToRun != -1) {
189 for (
int avIndex = 1; avIndex < ac; ++avIndex)
globalCmdLineArgs.push_back(av[avIndex]);
192 if (testToRun < 0 || testToRun >=
NumTests) {
193 printf(
"testToRun was modified by TestDriver code to an invalid value: " 204 printf(
"Available tests:\n");
208 printf(
"Failed: %s is an invalid test name.\n", av[1]);
int mitkGIFGreyLevelSizeZoneTest(int, char *[])
int mitkGIFNeighbouringGreyLevelDependenceFeatureTest(int, char *[])
int mitkGIFCurvatureStatisticTest(int, char *[])
static void Register()
registers MITK logging backend at mbilog
static functionMapEntry cmakeGeneratedFunctionMapEntries[]
int mitkGIFNeighbourhoodGreyToneDifferenceFeaturesTest(int, char *[])
#define CM_CAST(TYPE, EXPR)
int mitkGIFFirstOrderHistogramStatisticsTest(int, char *[])
int mitkGIFFirstOrderStatisticsTest(int, char *[])
int(* MainFuncPointer)(int, char *[])
int main(int ac, char *av[])
static char * lowercase(const char *string)
int mitkGIFCooc2Test(int, char *[])
int mitkGIFFirstOrderNumericStatisticsTest(int, char *[])
int mitkGIFIntensityVolumeHistogramTest(int, char *[])
int mitkGIFGreyLevelDistanceZoneTest(int, char *[])
int mitkGIFImageDescriptionFeaturesTest(int, char *[])
int mitkGIFVolumetricDensityStatisticsTest(int, char *[])
int mitkGIFVolumetricStatisticsTest(int, char *[])
static void Unregister()
Unregisters MITK logging backend at mbilog.
int mitkGIFLocalIntensityTest(int, char *[])
static const int NumTests
std::vector< std::string > globalCmdLineArgs