diff --git a/Modules/Core/Common/include/itkImageRegionSplitterDirection.h b/Modules/Core/Common/include/itkImageRegionSplitterDirection.h index 54810366ee3..4e954c39e27 100644 --- a/Modules/Core/Common/include/itkImageRegionSplitterDirection.h +++ b/Modules/Core/Common/include/itkImageRegionSplitterDirection.h @@ -37,7 +37,7 @@ class ITKCommon_EXPORT ImageRegionSplitterDirection public: /** Standard class typedefs. */ typedef ImageRegionSplitterDirection Self; - typedef Object Superclass; + typedef ImageRegionSplitterBase Superclass; typedef SmartPointer< Self > Pointer; typedef SmartPointer< const Self > ConstPointer; @@ -45,7 +45,7 @@ class ITKCommon_EXPORT ImageRegionSplitterDirection itkNewMacro(Self); /** Run-time type information (and related methods). */ - itkTypeMacro(ImageRegionSplitterDirection, Object); + itkTypeMacro(ImageRegionSplitterDirection, ImageRegionSplitterBase); /** Get the direction in which not to split the image.* * diff --git a/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h b/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h index 9ed74138cf1..d892b7e837a 100644 --- a/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h +++ b/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h @@ -213,18 +213,6 @@ class ITKCommon_EXPORT MersenneTwisterRandomVariateGenerator: /** Period parameter */ itkStaticConstMacro(M, unsigned int, 397); - /** Internal state. */ - IntegerType state[StateVectorLength]; - - /** Next value to get from state. */ - IntegerType *m_PNext; - - /** Number of values left before reload is needed. */ - int m_Left; - - /** Seed value. */ - IntegerType m_Seed; - /** Reload array with N new values. */ void reload(); @@ -243,6 +231,18 @@ class ITKCommon_EXPORT MersenneTwisterRandomVariateGenerator: static IntegerType hash(time_t t, clock_t c); + // Internal state + IntegerType state[StateVectorLength]; + + // Next value to get from state + IntegerType *m_PNext; + + // Number of values left before reload is needed + int m_Left; + + // Seed value + IntegerType m_Seed; + private: /** Internal method to actually create a new object. */ diff --git a/Modules/Core/Common/test/itkImageRegionSplitterDirectionTest.cxx b/Modules/Core/Common/test/itkImageRegionSplitterDirectionTest.cxx index 237f9229399..6ac75bc452b 100644 --- a/Modules/Core/Common/test/itkImageRegionSplitterDirectionTest.cxx +++ b/Modules/Core/Common/test/itkImageRegionSplitterDirectionTest.cxx @@ -24,9 +24,11 @@ int itkImageRegionSplitterDirectionTest(int, char*[]) { - itk::ImageRegionSplitterDirection::Pointer splitter = itk::ImageRegionSplitterDirection::New(); + itk::ImageRegionSplitterDirection::Pointer splitter = + itk::ImageRegionSplitterDirection::New(); - EXERCISE_BASIC_OBJECT_METHODS( splitter,ImageRegionSplitterDirection ); + EXERCISE_BASIC_OBJECT_METHODS( splitter, ImageRegionSplitterDirection, + ImageRegionSplitterBase ); itk::ImageRegion<2> region; region.SetSize(0, 10); diff --git a/Modules/Core/Common/test/itkImageRegionSplitterMultidimensionalTest.cxx b/Modules/Core/Common/test/itkImageRegionSplitterMultidimensionalTest.cxx index d76698e1aaf..02ddf109dde 100644 --- a/Modules/Core/Common/test/itkImageRegionSplitterMultidimensionalTest.cxx +++ b/Modules/Core/Common/test/itkImageRegionSplitterMultidimensionalTest.cxx @@ -24,16 +24,17 @@ int itkImageRegionSplitterMultidimensionalTest(int, char*[]) { - itk::ImageRegionSplitterMultidimensional::Pointer splitter = itk::ImageRegionSplitterMultidimensional::New(); - - EXERCISE_BASIC_OBJECT_METHODS( splitter,ImageRegionSplitterMultidimensional ); + itk::ImageRegionSplitterMultidimensional::Pointer splitter = + itk::ImageRegionSplitterMultidimensional::New(); + EXERCISE_BASIC_OBJECT_METHODS( splitter, + ImageRegionSplitterMultidimensional, ImageRegionSplitterBase ); itk::ImageRegion<2> region; region.SetSize(0, 10); region.SetSize(1, 11); - region.SetIndex(0,1); + region.SetIndex(0, 1); region.SetIndex(1, 10); const itk::ImageRegion<2> lpRegion = region; diff --git a/Modules/Core/Common/test/itkImageRegionSplitterSlowDimensionTest.cxx b/Modules/Core/Common/test/itkImageRegionSplitterSlowDimensionTest.cxx index d76d665a3bf..e2dd83c5b16 100644 --- a/Modules/Core/Common/test/itkImageRegionSplitterSlowDimensionTest.cxx +++ b/Modules/Core/Common/test/itkImageRegionSplitterSlowDimensionTest.cxx @@ -24,16 +24,17 @@ int itkImageRegionSplitterSlowDimensionTest(int, char*[]) { - itk::ImageRegionSplitterSlowDimension::Pointer splitter = itk::ImageRegionSplitterSlowDimension::New(); - - EXERCISE_BASIC_OBJECT_METHODS( splitter,ImageRegionSplitterSlowDimension ); + itk::ImageRegionSplitterSlowDimension::Pointer splitter = + itk::ImageRegionSplitterSlowDimension::New(); + EXERCISE_BASIC_OBJECT_METHODS( splitter, + ImageRegionSplitterSlowDimension, ImageRegionSplitterBase ); itk::ImageRegion<2> region; region.SetSize(0, 10); region.SetSize(1, 11); - region.SetIndex(0,1); + region.SetIndex(0, 1); region.SetIndex(1, 10); const itk::ImageRegion<2> lpRegion = region; diff --git a/Modules/Core/Common/test/itkMathTest.cxx b/Modules/Core/Common/test/itkMathTest.cxx index 319b2668c2d..300f9a0723b 100644 --- a/Modules/Core/Common/test/itkMathTest.cxx +++ b/Modules/Core/Common/test/itkMathTest.cxx @@ -26,27 +26,27 @@ template< typename T1, typename T2> inline int TestIntegersAreSame(const T1 & v1, const T2 & v2) { - int passed=EXIT_SUCCESS; + int testPassStatus = EXIT_SUCCESS; if ( static_cast(v1) != v2 ) { std::cout << "ERROR: static cast did not perform as expected for wrap arround." << std::endl; std::cout << v1 << " static_cast " << static_cast(v1) << std::endl; std::cout << v2 << std::endl; - passed=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } if ( itk::Math::AlmostEquals(v2,v1) == true ) { std::cout << "Error in " << "itk::Math::AlmostEquals(v2, v1) " << std::endl; std::cout << __FILE__ << " " << __LINE__ << " " << v2 << " == " << v1 << std::endl; - passed=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } if ( itk::Math::AlmostEquals(v1,v2) == true ) { std::cout << "Error in " << "itk::Math::AlmostEquals(v1, v2) " << std::endl; std::cout << __FILE__ << " " << __LINE__ << " " << v1 << " == " << v2 << std::endl; - passed=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } - return passed; + return testPassStatus; } @@ -107,9 +107,10 @@ int ExerciseGreatestPrimeFactor() int main( int, char *[] ) { int testPassStatus = EXIT_SUCCESS; -// Save the format stream variables for std::cout -// They will be restored when coutState goes out of scope -// scope. + + // Save the format stream variables for std::cout + // They will be restored when coutState goes out of scope + // scope. itk::StdStreamStateSave coutState(std::cout); std::cout << "e: " << itk::Math::e << std::endl; @@ -156,7 +157,7 @@ int main( int, char *[] ) if( itk::Math::FloatDifferenceULP( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) != -1 ) { std::cout << "Unexpected float distance." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } if( itk::Math::FloatAlmostEqual( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) ) { @@ -165,7 +166,7 @@ int main( int, char *[] ) else { std::cout << "floatRepresentationfx1 is NOT almost equal to floatRepresentationfx2\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } floatRepresentationfx2.asFloat = floatRepresentationfx1.asFloat; @@ -177,7 +178,7 @@ int main( int, char *[] ) if( itk::Math::FloatDifferenceULP( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) != 1 ) { std::cout << "Unexpected float distance." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } if( itk::Math::FloatAlmostEqual( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) ) { @@ -186,7 +187,7 @@ int main( int, char *[] ) else { std::cout << "floatRepresentationfx1 is NOT almost equal to floatRepresentationfx2\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } floatRepresentationfx1.asFloat = 1.0f; @@ -203,7 +204,7 @@ int main( int, char *[] ) { std::cout << " result is: " << itk::Math::FloatDifferenceULP( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) << std::endl; std::cout << "Unexpected float distance." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } if( itk::Math::FloatAlmostEqual( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) ) { @@ -212,7 +213,7 @@ int main( int, char *[] ) else { std::cout << "floatRepresentationfx1 is NOT almost equal to floatRepresentationfx2\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } floatRepresentationfx2.asFloat = floatRepresentationfx1.asFloat; @@ -224,7 +225,7 @@ int main( int, char *[] ) if( itk::Math::FloatDifferenceULP( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) != 1 ) { std::cout << "Unexpected float distance." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } if( itk::Math::FloatAlmostEqual( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) ) { @@ -233,7 +234,7 @@ int main( int, char *[] ) else { std::cout << "floatRepresentationfx1 is NOT almost equal to floatRepresentationfx2\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } // The default maxUlps is 4, so this should be considered almost equals. @@ -246,12 +247,12 @@ int main( int, char *[] ) if( itk::Math::FloatDifferenceULP( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) != -6 ) { std::cout << "Unexpected float distance." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } if( itk::Math::FloatAlmostEqual( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) ) { std::cout << "floatRepresentationfx1 is almost equal to floatRepresentationfx2\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -267,12 +268,12 @@ int main( int, char *[] ) if( itk::Math::FloatDifferenceULP( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) != 6 ) { std::cout << "Unexpected float distance." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } if( itk::Math::FloatAlmostEqual( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) ) { std::cout << "floatRepresentationfx1 is almost equal to floatRepresentationfx2\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -290,7 +291,7 @@ int main( int, char *[] ) if( itk::Math::FloatDifferenceULP( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) != 0 ) { std::cout << "Unexpected float distance." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } if( itk::Math::FloatAlmostEqual( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) ) { @@ -299,7 +300,7 @@ int main( int, char *[] ) else { std::cout << "floatRepresentationfx1 is NOT almost equal to floatRepresentationfx2\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } floatRepresentationfx1.asFloat = 0.0f; @@ -321,7 +322,7 @@ int main( int, char *[] ) else { std::cout << "floatRepresentationfx1 is NOT almost equal to floatRepresentationfx2\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } floatRepresentationfx1.asFloat = 1e-8f; @@ -335,7 +336,7 @@ int main( int, char *[] ) if( itk::Math::FloatDifferenceULP( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) < 0 ) { std::cout << "Did not get the expected FloatDifferenceULP sign." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -353,7 +354,7 @@ int main( int, char *[] ) if( itk::Math::FloatDifferenceULP( floatRepresentationfx1.asFloat, floatRepresentationfx2.asFloat ) > 0 ) { std::cout << "Did not get the expected FloatDifferenceULP sign." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -381,7 +382,7 @@ int main( int, char *[] ) if( itk::Math::FloatDifferenceULP( floatRepresentationdx1.asFloat, floatRepresentationdx2.asFloat ) != -1 ) { std::cout << "Unexpected float distance." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } if( itk::Math::FloatAlmostEqual( floatRepresentationdx1.asFloat, floatRepresentationdx2.asFloat ) ) { @@ -390,7 +391,7 @@ int main( int, char *[] ) else { std::cout << "floatRepresentationdx1 is NOT almost equal to floatRepresentationdx2\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } floatRepresentationdx2.asFloat = floatRepresentationdx1.asFloat; @@ -401,7 +402,7 @@ int main( int, char *[] ) if( itk::Math::FloatDifferenceULP( floatRepresentationdx1.asFloat, floatRepresentationdx2.asFloat ) != 1 ) { std::cout << "Unexpected float distance." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } if( itk::Math::FloatAlmostEqual( floatRepresentationdx1.asFloat, floatRepresentationdx2.asFloat ) ) { @@ -410,7 +411,7 @@ int main( int, char *[] ) else { std::cout << "floatRepresentationdx1 is NOT almost equal to floatRepresentationdx2\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } // The default maxUlps is 4, so this should be considered almost equals. @@ -422,12 +423,12 @@ int main( int, char *[] ) if( itk::Math::FloatDifferenceULP( floatRepresentationdx1.asFloat, floatRepresentationdx2.asFloat ) != -6 ) { std::cout << "Unexpected float distance." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } if( itk::Math::FloatAlmostEqual( floatRepresentationdx1.asFloat, floatRepresentationdx2.asFloat ) ) { std::cout << "floatRepresentationdx1 is almost equal to floatRepresentationdx2\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -442,12 +443,12 @@ int main( int, char *[] ) if( itk::Math::FloatDifferenceULP( floatRepresentationdx1.asFloat, floatRepresentationdx2.asFloat ) != 6 ) { std::cout << "Unexpected float distance." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } if( itk::Math::FloatAlmostEqual( floatRepresentationdx1.asFloat, floatRepresentationdx2.asFloat ) ) { std::cout << "floatRepresentationdx1 is almost equal to floatRepresentationdx2\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -464,7 +465,7 @@ int main( int, char *[] ) if( itk::Math::FloatDifferenceULP( floatRepresentationdx1.asFloat, floatRepresentationdx2.asFloat ) != 0 ) { std::cout << "Unexpected float distance." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } if( itk::Math::FloatAlmostEqual( floatRepresentationdx1.asFloat, floatRepresentationdx2.asFloat ) ) { @@ -473,7 +474,7 @@ int main( int, char *[] ) else { std::cout << "floatRepresentationdx1 is NOT almost equal to floatRepresentationdx2\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } floatRepresentationdx1.asFloat = 0.0; @@ -493,7 +494,7 @@ int main( int, char *[] ) else { std::cout << "floatRepresentationdx1 is NOT almost equal to floatRepresentationdx2\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } floatRepresentationdx1.asFloat = 1e-8f; @@ -507,7 +508,7 @@ int main( int, char *[] ) if( itk::Math::FloatDifferenceULP( floatRepresentationdx1.asFloat, floatRepresentationdx2.asFloat ) < 0 ) { std::cout << "Did not get the expected FloatDifferenceULP sign." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -525,7 +526,7 @@ int main( int, char *[] ) if( itk::Math::FloatDifferenceULP( floatRepresentationdx1.asFloat, floatRepresentationdx2.asFloat ) > 0 ) { std::cout << "Did not get the expected FloatDifferenceULP sign." << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -556,7 +557,7 @@ int main( int, char *[] ) if ( itk::Math::AlmostEquals(f,d) == true || itk::Math::AlmostEquals(d,f) == true ) { std::cout << __FILE__ << " " << __LINE__ << " " << f <<" == " << d << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } if ( itk::Math::AlmostEquals(f,sc) == false || itk::Math::AlmostEquals(sc,f) == false @@ -567,14 +568,14 @@ int main( int, char *[] ) || itk::Math::AlmostEquals(1,2) == true ) { std::cout << __FILE__ << " " << __LINE__ << " " << f <<" == " << d << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } // Test ExactlyEquals() it should detect normal inequalities if ( itk::Math::ExactlyEquals(f,d) == true || itk::Math::ExactlyEquals(d,f) == true ) { std::cout << __FILE__ << " " << __LINE__ << " " << f <<" == " << d << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } // Test comparison values of different types @@ -582,7 +583,7 @@ int main( int, char *[] ) || itk::Math::NotExactlyEquals( itk::NumericTraits< double >::OneValue(), static_cast< float >( 1 ) ) ) { std::cout << __FILE__ << " " << __LINE__ << " " << f <<" == " << d << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } // Test comparison of very close values @@ -598,7 +599,7 @@ int main( int, char *[] ) { std::cout << __FILE__ << " " << __LINE__ << " " << oneExact.asFloat <<" == " << oneAlmost.asFloat << std::endl; std::cout << "AlmostEquals Test Failure\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } // Even very close values are not ExactlyEqual @@ -606,7 +607,7 @@ int main( int, char *[] ) { std::cout << __FILE__ << " " << __LINE__ << " " << oneExact.asFloat <<" == " << oneAlmost.asFloat << std::endl; std::cout << "ExactlyEquals Test Failure\n" << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } // Test AlmostEquals complex comparisons @@ -621,7 +622,7 @@ int main( int, char *[] ) { std::cout << "Test FAILED!!\n" << std::endl; std::cout << __FILE__ << " " << __LINE__ << " " << f <<" == " << d << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -633,7 +634,7 @@ int main( int, char *[] ) { std::cout << "Test FAILED!!\n" << std::endl; std::cout << __FILE__ << " " << __LINE__ << " " << f <<" == " << d << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -651,7 +652,7 @@ int main( int, char *[] ) { std::cout << "Test FAILED!!\n" << std::endl; std::cout << __FILE__ << " " << __LINE__ << " " << f <<" == " << d << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -668,7 +669,7 @@ int main( int, char *[] ) { std::cout << "Test FAILED!!\n" << std::endl; std::cout << __FILE__ << " " << __LINE__ << " " << f <<" == " << d << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -680,7 +681,7 @@ int main( int, char *[] ) { std::cout << "Test FAILED!!\n" << std::endl; std::cout << __FILE__ << " " << __LINE__ << " " << f <<" == " << d << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -698,7 +699,7 @@ int main( int, char *[] ) { std::cout << "Test FAILED!!\n" << std::endl; std::cout << __FILE__ << " " << __LINE__ << " " << f <<" == " << d << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -710,7 +711,7 @@ int main( int, char *[] ) { std::cout << "Test FAILED!!\n" << std::endl; std::cout << __FILE__ << " " << __LINE__ << " " << f <<" == " << d << std::endl; - testPassStatus=EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -723,7 +724,7 @@ int main( int, char *[] ) if( ExerciseIsPrime() ) { std::cout << "Test FAILED!!" << std::endl; - return EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -733,7 +734,7 @@ int main( int, char *[] ) if( ExerciseIsPrime() ) { std::cout << "Test FAILED!!" << std::endl; - return EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -743,7 +744,7 @@ int main( int, char *[] ) if( ExerciseIsPrime() ) { std::cout << "Test FAILED!!" << std::endl; - return EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -753,7 +754,7 @@ int main( int, char *[] ) if( ExerciseIsPrime() ) { std::cout << "Test FAILED!!" << std::endl; - return EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -765,7 +766,7 @@ int main( int, char *[] ) if( ExerciseGreatestPrimeFactor() ) { std::cout << "Test FAILED!!" << std::endl; - return EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -775,7 +776,7 @@ int main( int, char *[] ) if( ExerciseGreatestPrimeFactor() ) { std::cout << "Test FAILED!!" << std::endl; - return EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -785,7 +786,7 @@ int main( int, char *[] ) if( ExerciseGreatestPrimeFactor() ) { std::cout << "Test FAILED!!" << std::endl; - return EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { @@ -795,7 +796,7 @@ int main( int, char *[] ) if( ExerciseGreatestPrimeFactor() ) { std::cout << "Test FAILED!!" << std::endl; - return EXIT_FAILURE; + testPassStatus = EXIT_FAILURE; } else { diff --git a/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorTest.cxx b/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorTest.cxx index 7711e41b48f..f2e73d7fc02 100644 --- a/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorTest.cxx +++ b/Modules/Core/Common/test/itkMersenneTwisterRandomVariateGeneratorTest.cxx @@ -36,7 +36,8 @@ int itkMersenneTwisterRandomVariateGeneratorTest( int, char* [] ) Twister::Pointer twister = Twister::New(); - EXERCISE_BASIC_OBJECT_METHODS( twister, Twister ); + EXERCISE_BASIC_OBJECT_METHODS( twister, MersenneTwisterRandomVariateGenerator, + RandomVariateGeneratorBase ); // Does the new instance have the same seed? if ( Twister::GetInstance()->GetSeed() != twister->GetSeed() ) diff --git a/Modules/Core/Common/test/itkVersionTest.cxx b/Modules/Core/Common/test/itkVersionTest.cxx index de39d0a0f6d..7dadd6d67d0 100644 --- a/Modules/Core/Common/test/itkVersionTest.cxx +++ b/Modules/Core/Common/test/itkVersionTest.cxx @@ -28,7 +28,7 @@ int itkVersionTest( int, char* [] ) itk::Version::Pointer version = itk::Version::New(); - EXERCISE_BASIC_OBJECT_METHODS( version, itk::Version ); + EXERCISE_BASIC_OBJECT_METHODS( version, Version, Object ); const char * itkVersion = itk::Version::GetITKVersion(); std::cout << "itk version: " << itkVersion << std::endl; diff --git a/Modules/Core/TestKernel/include/itkTestingMacros.h b/Modules/Core/TestKernel/include/itkTestingMacros.h index 6ae4a589f9e..afd0edcc36e 100644 --- a/Modules/Core/TestKernel/include/itkTestingMacros.h +++ b/Modules/Core/TestKernel/include/itkTestingMacros.h @@ -21,12 +21,41 @@ #include "itkMacro.h" +#include + +/** \namespace itk + * \brief The "itk" namespace contains all Insight Segmentation and + * Registration Toolkit (ITK) classes. There are several nested namespaces + * within the itk:: namespace. */ +namespace itk +{ +// end namespace itk - this is here for documentation purposes +} + + // object's Class must be specified to build on sun studio -#define EXERCISE_BASIC_OBJECT_METHODS( object, Class ) \ - object->Print( std::cout ); \ +#define EXERCISE_BASIC_OBJECT_METHODS( object, Class, SuperClass ) \ + object->Print( std::cout ); \ std::cout << "Name of Class = " << object->GetNameOfClass() << std::endl; \ - std::cout << "Name of Superclass = " << object->Class::Superclass::GetNameOfClass() << std::endl; - + std::cout << "Name of Superclass = " << object->Class::Superclass::GetNameOfClass() << std::endl; \ + if( !std::strcmp(object->GetNameOfClass(), #Class) ) \ + { \ + std::cout << "Class name is correct" << std::endl; \ + } \ + else \ + { \ + std::cerr << "Class name provided does not match object's NameOfClass" << std::endl; \ + return EXIT_FAILURE; \ + } \ + if( !std::strcmp(object->Class::Superclass::GetNameOfClass(), #SuperClass) ) \ + { \ + std::cout << "Superclass name is correct" << std::endl; \ + } \ + else \ + { \ + std::cerr << "Superclass name provided does not match object's Superclass::NameOfClass" << std::endl; \ + return EXIT_FAILURE; \ + } #define TRY_EXPECT_EXCEPTION( command ) \ try \ diff --git a/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.h b/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.h index 12a190626b5..2423b23ca60 100644 --- a/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.h +++ b/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.h @@ -67,9 +67,6 @@ class GradientImageFilter: itkStaticConstMacro(OutputImageDimension, unsigned int, TInputImage::ImageDimension); - /** Standard class typedefs. */ - typedef GradientImageFilter Self; - /** Convenient typedefs for simplifying declarations. */ typedef TInputImage InputImageType; typedef typename InputImageType::Pointer InputImagePointer; @@ -77,6 +74,7 @@ class GradientImageFilter: typedef typename OutputImageType::Pointer OutputImagePointer; /** Standard class typedefs. */ + typedef GradientImageFilter Self; typedef ImageToImageFilter< InputImageType, OutputImageType > Superclass; typedef SmartPointer< Self > Pointer; typedef SmartPointer< const Self > ConstPointer; diff --git a/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx b/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx index 2778e343afe..1c2f2bfb83a 100644 --- a/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx +++ b/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest.cxx @@ -20,6 +20,7 @@ #include "itkVectorImage.h" #include "itkGradientImageFilter.h" #include "itkNullImageToImageFilterDriver.hxx" +#include "itkTestingMacros.h" inline std::ostream& operator<<(std::ostream &o, const itk::CovariantVector &v) { @@ -38,7 +39,9 @@ int itkGradientImageFilterTest(int , char * [] ) // Set up filter FilterType::Pointer filter = FilterType::New(); - // Run Test + EXERCISE_BASIC_OBJECT_METHODS( filter, GradientImageFilter, ImageToImageFilter ); + + // Run test itk::Size<2> sz; sz[0] = 100; sz[1] = 100; @@ -63,16 +66,17 @@ int itkGradientImageFilterTest(int , char * [] ) FilterType::Pointer filter = FilterType::New(); + EXERCISE_BASIC_OBJECT_METHODS( filter, GradientImageFilter, ImageToImageFilter ); - // Run Test - itk::Size<3> sz; - sz[0] = 25; - sz[1] = 25; - sz[2] = 25; - itk::NullImageToImageFilterDriver< InputImageType, OutputImageType > test1; - test1.SetImageSize(sz); - test1.SetFilter(filter.GetPointer()); - test1.Execute(); + // Run test + itk::Size<3> sz; + sz[0] = 25; + sz[1] = 25; + sz[2] = 25; + itk::NullImageToImageFilterDriver< InputImageType, OutputImageType > test1; + test1.SetImageSize(sz); + test1.SetFilter(filter.GetPointer()); + test1.Execute(); } catch(itk::ExceptionObject &err) { diff --git a/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest2.cxx b/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest2.cxx index 0bd4900b623..892a345313f 100644 --- a/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest2.cxx +++ b/Modules/Filtering/ImageGradient/test/itkGradientImageFilterTest2.cxx @@ -35,12 +35,17 @@ int DoIt( const std::string &infname, const unsigned int ImageDimension = InputImageType::ImageDimension; typedef typename InputImageType::PixelType InputPixelType; - typedef itk::ImageFileReader ReaderType; + typedef itk::ImageFileReader ReaderType; typename ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( infname ); typedef itk::GradientImageFilter FilterType; typename FilterType::Pointer filter = FilterType::New(); + +#if __GNUC__ != 4 && __GNUC_MINOR__ < 8 + EXERCISE_BASIC_OBJECT_METHODS( filter, GradientImageFilter, ImageToImageFilter ); +#endif + filter->SetInput( reader->GetOutput() ); typedef typename FilterType::OutputImageType OutputImageType; @@ -51,10 +56,6 @@ int DoIt( const std::string &infname, writer->SetNumberOfStreamDivisions( 5 ); writer->Update(); - - // excersie some methods to improve coverage - EXERCISE_BASIC_OBJECT_METHODS( filter, FilterType ) - std::cout << filter; typedef itk::VectorImage VectorImageType; @@ -66,10 +67,12 @@ int DoIt( const std::string &infname, filter->UpdateLargestPossibleRegion(); - itk::ImageRegionConstIterator iter( filter->GetOutput(), filter->GetOutput()->GetBufferedRegion() ); - itk::ImageRegionConstIterator viter( vectorFilter->GetOutput(), vectorFilter->GetOutput()->GetBufferedRegion() ); + itk::ImageRegionConstIterator iter( filter->GetOutput(), + filter->GetOutput()->GetBufferedRegion() ); + itk::ImageRegionConstIterator viter( vectorFilter->GetOutput(), + vectorFilter->GetOutput()->GetBufferedRegion() ); - // check the at + // Check the filter output bool diff = false; while( !iter.IsAtEnd() ) { @@ -80,7 +83,6 @@ int DoIt( const std::string &infname, { diff = true; } - } ++viter; @@ -89,14 +91,13 @@ int DoIt( const std::string &infname, if ( diff ) { - std::cerr << "VectorImage output does not match covarient!" << std::endl; + std::cerr << "VectorImage output does not match covariant!" << std::endl; return EXIT_FAILURE; } return EXIT_SUCCESS; } - } int itkGradientImageFilterTest2(int argc, char * argv[] ) @@ -112,7 +113,6 @@ int itkGradientImageFilterTest2(int argc, char * argv[] ) const std::string infname = argv[1]; const std::string outfname = argv[2]; - itk::ImageIOBase::Pointer iobase = itk::ImageIOFactory::CreateImageIO( infname.c_str(), itk::ImageIOFactory::ReadMode); @@ -121,7 +121,6 @@ int itkGradientImageFilterTest2(int argc, char * argv[] ) itkGenericExceptionMacro( "Unable to determine ImageIO reader for \"" << infname << "\"" ); } - const unsigned int dimension = iobase->GetNumberOfDimensions(); if ( dimension == 2 ) @@ -129,6 +128,5 @@ int itkGradientImageFilterTest2(int argc, char * argv[] ) else if ( dimension == 3 ) return DoIt< itk::Image >( infname, outfname ); - return EXIT_FAILURE; } diff --git a/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.h b/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.h index e652306d0d0..e8b18b66ab5 100644 --- a/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.h @@ -68,7 +68,7 @@ class BinShrinkImageFilter : itkNewMacro(Self); /** Run-time type information (and related methods). */ - itkTypeMacro(BinShrinkImageFilter, ShrinkImageFilter); + itkTypeMacro(BinShrinkImageFilter, ImageToImageFilter); /** Typedef to images */ typedef TOutputImage OutputImageType; diff --git a/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx b/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx index 0f02b4eed33..152a5528614 100644 --- a/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest1.cxx @@ -49,17 +49,23 @@ int itkBinShrinkImageFilterTest1( int , char *[] ) } // assemple pipeline - typedef itk::PipelineMonitorImageFilter InputMonitorFilterType; + typedef itk::PipelineMonitorImageFilter + InputMonitorFilterType; InputMonitorFilterType::Pointer monitor1 = InputMonitorFilterType::New(); monitor1->SetInput( sourceImage ); - typedef itk::BinShrinkImageFilter< InputImageType, OutputImageType > BinShinkFilterType; - BinShinkFilterType::Pointer bin = BinShinkFilterType::New(); + typedef itk::BinShrinkImageFilter< InputImageType, OutputImageType > + BinShrinkFilterType; + BinShrinkFilterType::Pointer bin = BinShrinkFilterType::New(); + + // Exercise some methods for coverage + EXERCISE_BASIC_OBJECT_METHODS( bin, BinShrinkImageFilter, + ImageToImageFilter ); + bin->SetInput( monitor1->GetOutput() ); itk::ModifiedTimeType t = bin->GetMTime(); - // Exercise some methods for coverage - EXERCISE_BASIC_OBJECT_METHODS(bin, BinShrinkImageFilter); + std::cout << bin; TEST_EXPECT_EQUAL(bin->GetShrinkFactors()[0], 1 ); diff --git a/Modules/IO/MRC/test/itkMRCImageIOTest.cxx b/Modules/IO/MRC/test/itkMRCImageIOTest.cxx index 221e5751a28..66a1a71725a 100644 --- a/Modules/IO/MRC/test/itkMRCImageIOTest.cxx +++ b/Modules/IO/MRC/test/itkMRCImageIOTest.cxx @@ -471,7 +471,8 @@ int itkMRCImageIOTest(int argc, char* argv[]) // typedef itk::MRCImageIO IOType; IOType::Pointer mrcIO = IOType::New(); - EXERCISE_BASIC_OBJECT_METHODS( mrcIO, IOType ); + + EXERCISE_BASIC_OBJECT_METHODS( mrcIO, MRCImageIO, StreamingImageIOBase ); // // All tests succeeded diff --git a/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx b/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx index 6883d8f160b..f9de7749050 100644 --- a/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx +++ b/Modules/IO/VTK/test/itkVTKImageIO2Test.cxx @@ -806,7 +806,8 @@ int itkVTKImageIO2Test(int argc, char* argv[]) // typedef itk::VTKImageIO IOType; IOType::Pointer vtkIO = IOType::New(); - EXERCISE_BASIC_OBJECT_METHODS( vtkIO, IOType ); + + EXERCISE_BASIC_OBJECT_METHODS( vtkIO, VTKImageIO, StreamingImageIOBase ); // diff --git a/Modules/Numerics/FEM/include/itkFEMElementStd.h b/Modules/Numerics/FEM/include/itkFEMElementStd.h index 91d33d19725..68b382396f8 100644 --- a/Modules/Numerics/FEM/include/itkFEMElementStd.h +++ b/Modules/Numerics/FEM/include/itkFEMElementStd.h @@ -52,7 +52,7 @@ namespace fem * If not specified, it defaults to the Element class. * \ingroup ITKFEM */ -template +template< unsigned int VNumberOfNodes, unsigned int VNumberOfSpatialDimensions, typename TBaseClass = Element > class ElementStd : public TBaseClass { public: @@ -79,34 +79,22 @@ class ElementStd : public TBaseClass typedef typename Superclass::Node Node; enum { InvalidDegreeOfFreedomID = Superclass::InvalidDegreeOfFreedomID }; - /** - * Number of nodes that define the element. - */ + /** Number of nodes that define the element. */ enum { NumberOfNodes = VNumberOfNodes }; - /** - * Number of dimensions of space in which element can exist. - */ + /** Number of dimensions of space in which element can exist. */ enum { NumberOfSpatialDimensions = VNumberOfSpatialDimensions }; - /** - * Default constructor just clears the ivars - */ + /** Default constructor. Just clears the ivars. */ ElementStd(); - // //////////////////////////////////////////////////////////////////////// - /** - * Methods that define the geometry of an element - */ + /** Methods that define the geometry of an element. */ virtual unsigned int GetNumberOfNodes(void) const ITK_OVERRIDE { return NumberOfNodes; } - /** - * Get/Set the Nodes that define the element - */ - + /** Get/Set the Nodes that define the element. */ virtual NodeIDType GetNode(unsigned int n) const ITK_OVERRIDE { if( n >= NumberOfNodes ) @@ -125,19 +113,18 @@ class ElementStd : public TBaseClass this->SetNodeInternal(n,node); } - /** Get the nodal coordinates */ + /** Get the nodal coordinates. */ virtual const VectorType & GetNodeCoordinates(unsigned int n) const ITK_OVERRIDE { return m_node[n]->GetCoordinates(); } - /** Get the number of spatial dimensions */ + /** Get the number of spatial dimensions. */ virtual unsigned int GetNumberOfSpatialDimensions() const ITK_OVERRIDE { return NumberOfSpatialDimensions; } - // //////////////////////////////////////////////////////////////////////// protected: @@ -151,14 +138,13 @@ class ElementStd : public TBaseClass } this->m_node[n] = node; } - /** - * Array of pointers to point objects that define the element - */ + + // Array of pointers to point objects that define the element const Node *m_node[NumberOfNodes]; }; -} -} // end namespace itk::fem +} // end namespace fem +} // end namespace itk #ifndef ITK_MANUAL_INSTANTIATION #include "itkFEMElementStd.hxx" diff --git a/Modules/Numerics/FEM/include/itkFEMElementStd.hxx b/Modules/Numerics/FEM/include/itkFEMElementStd.hxx index 00e2288c432..6b3187cc56c 100644 --- a/Modules/Numerics/FEM/include/itkFEMElementStd.hxx +++ b/Modules/Numerics/FEM/include/itkFEMElementStd.hxx @@ -25,20 +25,20 @@ namespace itk { namespace fem { -template -ElementStd +template< unsigned int VNumberOfNodes, unsigned int VNumberOfSpatialDimensions, typename TBaseClass > +ElementStd< VNumberOfNodes, VNumberOfSpatialDimensions, TBaseClass > ::ElementStd() { - // Set all node ids to 0 (undefined). + // Set all node ids to 0 (undefined) for( int i = 0; i < NumberOfNodes; i++ ) { this->m_node[i] = ITK_NULLPTR; } } -template +template void -ElementStd +ElementStd< VNumberOfNodes, VNumberOfSpatialDimensions, TBaseClass > ::PrintSelf(std::ostream& os, Indent indent) const { Superclass::PrintSelf(os, indent); @@ -49,7 +49,7 @@ ElementStd } } -} -} // end namespace itk::fem +} // end namespace fem +} // end namespace itk #endif // #ifndef itkFEMElementStd_hxx diff --git a/Modules/Numerics/FEM/test/itkFEMLoadPointTestUser.cxx b/Modules/Numerics/FEM/test/itkFEMLoadPointTestUser.cxx index 339c536390b..69918e72414 100644 --- a/Modules/Numerics/FEM/test/itkFEMLoadPointTestUser.cxx +++ b/Modules/Numerics/FEM/test/itkFEMLoadPointTestUser.cxx @@ -117,7 +117,7 @@ int itkFEMLoadPointTestUser(int, char *[]) itk::fem::LoadPoint::Pointer lm0 = itk::fem::LoadPoint::New(); - EXERCISE_BASIC_OBJECT_METHODS( lm0, itk::fem::LoadPoint ) + EXERCISE_BASIC_OBJECT_METHODS( lm0, LoadPoint, LoadElement ); lm0->SetGlobalNumber(1); vnl_vector pt1(2); diff --git a/Modules/Segmentation/LabelVoting/test/itkVotingBinaryImageFilterTest.cxx b/Modules/Segmentation/LabelVoting/test/itkVotingBinaryImageFilterTest.cxx index ecddb3ef88f..e65f1e6a2a0 100644 --- a/Modules/Segmentation/LabelVoting/test/itkVotingBinaryImageFilterTest.cxx +++ b/Modules/Segmentation/LabelVoting/test/itkVotingBinaryImageFilterTest.cxx @@ -48,6 +48,11 @@ int itkVotingBinaryImageFilterTestImp( const std::string &infname, reader->SetFileName( infname ); typename FilterType::Pointer filter = FilterType::New(); + +#if __GNUC__ != 4 && __GNUC_MINOR__ < 8 + EXERCISE_BASIC_OBJECT_METHODS( filter, VotingBinaryImageFilter, ImageToImageFilter ); +#endif + filter->SetInput( reader->GetOutput() ); typename FilterType::InputSizeType R; @@ -59,21 +64,18 @@ int itkVotingBinaryImageFilterTestImp( const std::string &infname, filter->SetBirthThreshold( birthThreshold ); filter->SetSurvivalThreshold( survivalThreshold ); - typename WriterType::Pointer writer = WriterType::New(); - writer->SetInput( filter->GetOutput() ); - writer->SetFileName( outfname ); - writer->SetNumberOfStreamDivisions( 5 ); - writer->Update(); - - // excersie some methods to improve coverage - EXERCISE_BASIC_OBJECT_METHODS( filter, FilterType ); - TEST_SET_GET_VALUE( R, filter->GetRadius() ); TEST_SET_GET_VALUE( itk::Math::CastWithRangeCheck( foregroundValue ), filter->GetForegroundValue() ); TEST_SET_GET_VALUE( itk::Math::CastWithRangeCheck( backgroundValue ), filter->GetBackgroundValue() ); TEST_SET_GET_VALUE( birthThreshold, filter->GetBirthThreshold() ); TEST_SET_GET_VALUE( survivalThreshold, filter->GetSurvivalThreshold() ); + typename WriterType::Pointer writer = WriterType::New(); + writer->SetInput( filter->GetOutput() ); + writer->SetFileName( outfname ); + writer->SetNumberOfStreamDivisions( 5 ); + writer->Update(); + std::cout << filter; return EXIT_SUCCESS; diff --git a/Modules/Video/Core/include/itkVideoToVideoFilter.h b/Modules/Video/Core/include/itkVideoToVideoFilter.h index 11b0bd6b49c..e14ba32113e 100644 --- a/Modules/Video/Core/include/itkVideoToVideoFilter.h +++ b/Modules/Video/Core/include/itkVideoToVideoFilter.h @@ -45,8 +45,6 @@ class VideoToVideoFilter : public VideoSource< TOutputVideoStream > { public: - /*-TYPEDEFS----------------------------------------------------------------*/ - /** Standard class typedefs */ typedef TInputVideoStream InputVideoStreamType; typedef TOutputVideoStream OutputVideoStreamType; @@ -76,8 +74,6 @@ class VideoToVideoFilter : public VideoSource< TOutputVideoStream > /** Run-time type information (and related methods). */ itkTypeMacro(VideoToVideoFilter, VideoSource); - /*-PUBLIC METHODS----------------------------------------------------------*/ - /** Set the input VideoStream for this temporal process object */ using Superclass::SetInput; virtual void SetInput( const InputVideoStreamType* videoStream); diff --git a/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx b/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx index 3cf4045c484..cd2b4abe986 100644 --- a/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx +++ b/Modules/Video/Core/test/itkVideoToVideoFilterTest.cxx @@ -69,9 +69,9 @@ InputFrameType::Pointer CreateInputFrame(InputPixelType val) /** \class DummyVideoToVideoFilter * \brief A simple implementation of VideoTOVideoFilter for the test */ -template +template< typename TInputVideoStream, typename TOutputVideoStream > class DummyVideoToVideoFilter : - public VideoToVideoFilter + public VideoToVideoFilter< TInputVideoStream, TOutputVideoStream > { public: @@ -80,7 +80,8 @@ class DummyVideoToVideoFilter : typedef TOutputVideoStream OutputVideoStreamType; typedef DummyVideoToVideoFilter< InputVideoStreamType, OutputVideoStreamType > Self; - typedef VideoSource< OutputVideoStreamType > Superclass; + typedef VideoToVideoFilter< TInputVideoStream, + TOutputVideoStream > Superclass; typedef SmartPointer< Self > Pointer; typedef SmartPointer< const Self > ConstPointer; typedef WeakPointer< const Self > ConstWeakPointer; @@ -183,7 +184,7 @@ int itkVideoToVideoFilterTest( int, char* [] ) DummyVideoToVideoFilter< InputVideoType, OutputVideoType > VideoFilterType; VideoFilterType::Pointer filter = VideoFilterType::New(); - EXERCISE_BASIC_OBJECT_METHODS(filter, VideoFilterType); + EXERCISE_BASIC_OBJECT_METHODS( filter, DummyVideoToVideoFilter, VideoToVideoFilter ); // Set up an input video stream InputVideoType::Pointer inputVideo = InputVideoType::New();