28 #ifndef itkTestDriverInclude_h
29 #define itkTestDriverInclude_h
39 #include "itksys/Process.h"
56 #include "itksys/SystemTools.hxx"
58 #if defined(LINUX) && !defined(__MINGW32__) && defined(ITK_HAS_FEENABLEEXCEPT)
61 #include "vnl/vnl_sample.h"
63 #define ITK_TEST_DIMENSION_MAX 6
66 const char *baselineImageFilename,
68 double intensityTolerance,
70 unsigned int radiusTolerance = 0,
71 bool verifyInputInformation =
true,
72 double coordinateTolerance = 1.0
e-6,
73 double directionTolerance = 1.0
e-6);
76 const std::string md5hash );
98 typedef std::pair< const char *, std::vector<std::string> >
HashPairType;
129 std::cerr <<
"usage: itkTestDriver [options] prg [args]" << std::endl;
130 std::cerr <<
" itkTestDriver --no-process [options]" << std::endl;
131 std::cerr << std::endl;
132 std::cerr <<
"itkTestDriver alter the environment, run a test program and compare the images" << std::endl;
133 std::cerr <<
"produced." << std::endl;
134 std::cerr << std::endl;
135 std::cerr <<
"Options:" << std::endl;
136 std::cerr <<
" --add-before-libpath PATH" << std::endl;
137 std::cerr <<
" Add a path to the library path environment. This option take care of" << std::endl;
138 std::cerr <<
" choosing the right environment variable for your system." << std::endl;
139 std::cerr <<
" This option can be used several times." << std::endl;
140 std::cerr << std::endl;
141 std::cerr <<
" --add-before-env NAME VALUE" << std::endl;
142 std::cerr <<
" Add a VALUE to the variable name in the environment." << std::endl;
143 std::cerr <<
" The seperator used is the default one on the system." << std::endl;
144 std::cerr <<
" This option can be used several times." << std::endl;
145 std::cerr << std::endl;
146 std::cerr <<
" --add-before-env-with-sep NAME VALUE SEP" << std::endl;
147 std::cerr <<
" Add a VALUE to the variable name in the environment using the provided separator." << std::endl;
148 std::cerr <<
" This option can be used several times." << std::endl;
149 std::cerr << std::endl;
150 std::cerr <<
" --remove-env NAME" << std::endl;
151 std::cerr <<
" Remove the variable name from the environment." << std::endl;
152 std::cerr <<
" This option can be used several times." << std::endl;
153 std::cerr << std::endl;
154 std::cerr <<
" --compare TEST BASELINE" << std::endl;
155 std::cerr <<
" Compare the TEST image to the BASELINE one." << std::endl;
156 std::cerr <<
" This option can be used several times." << std::endl;
157 std::cerr << std::endl;
158 std::cerr <<
" --compare-MD5 TEST md5hash0 [ md5hash1 ... ]" << std::endl;
159 std::cerr <<
" Compare the TEST image file's md5 hash to the provided hash." << std::endl;
160 std::cerr <<
" md5hash0 is required and assumed to be a hash." << std::endl;
161 std::cerr <<
" Additional arguments are considered hashes when the string is 32 hexi-decimal characters. " << std::endl;
162 std::cerr <<
" This option can be used several times for multiple comparisons." << std::endl;
163 std::cerr << std::endl;
164 std::cerr <<
" --with-threads THREADS" << std::endl;
165 std::cerr <<
" Use at most THREADS threads." << std::endl;
166 std::cerr << std::endl;
167 std::cerr <<
" --without-threads" << std::endl;
168 std::cerr <<
" Use at most one thread." << std::endl;
169 std::cerr << std::endl;
170 std::cerr <<
" --compareNumberOfPixelsTolerance TOLERANCE" << std::endl;
171 std::cerr <<
" When comparing images with --compare, allow TOLERANCE pixels to differ." << std::endl;
172 std::cerr <<
" Default is 0." << std::endl;
173 std::cerr << std::endl;
174 std::cerr <<
" --compareRadiusTolerance TOLERANCE" << std::endl;
175 std::cerr <<
" Default is 0." << std::endl;
176 std::cerr << std::endl;
177 std::cerr <<
" --compareIntensityTolerance TOLERANCE" << std::endl;
178 std::cerr <<
" Default is 2.0." << std::endl;
179 std::cerr << std::endl;
180 std::cerr <<
" --compareCoordinateTolerance TOLERANCE" << std::endl;
181 std::cerr <<
" Default is 1.0e-6. Relative to the first spacing element of the input image." << std::endl;
182 std::cerr << std::endl;
183 std::cerr <<
" --compareDirectionTolerance TOLERANCE" << std::endl;
184 std::cerr <<
" Default is 1.0e-6." << std::endl;
185 std::cerr << std::endl; std::cerr <<
" --ignoreInputInformation" << std::endl;
186 std::cerr <<
" Skip verification of matching origins, spacings, and directions of input images." << std::endl;
187 std::cerr << std::endl;
188 std::cerr <<
" --no-process" << std::endl;
189 std::cerr <<
" The test driver will not invoke any process." << std::endl;
190 std::cerr << std::endl;
191 std::cerr <<
" --full-output" << std::endl;
192 std::cerr <<
" Causes the full output of the test to be passed to cdash." << std::endl;
193 std::cerr <<
" --redirect-output TEST_OUTPUT" << std::endl;
194 std::cerr <<
" Redirects the test output to the file TEST_OUTPUT." << std::endl;
195 std::cerr << std::endl;
196 std::cerr <<
" --" << std::endl;
197 std::cerr <<
" The options after -- are not interpreted by this program and passed" << std::endl;
198 std::cerr <<
" directly to the test program." << std::endl;
199 std::cerr << std::endl;
200 std::cerr <<
" --help" << std::endl;
201 std::cerr <<
" Display this message and exit." << std::endl;
202 std::cerr << std::endl;
207 return static_cast<char>( ::tolower(c));
212 #if defined(LINUX) && !defined(__MINGW32__) && defined(ITK_HAS_FEENABLEEXCEPT)
221 redirectOutputParameters.
redirect =
false;
223 if( processedOutput )
225 processedOutput->externalProcessMustBeCalled =
true;
233 if ( !skip && strcmp((*av)[i],
"--compare") == 0 )
244 else if ( !skip && strcmp((*av)[i],
"--compare-MD5") == 0 )
251 const char *filename = (*av)[i + 1];
252 std::string md5hash0 = (*av)[i + 2];
255 std::transform(md5hash0.begin(), md5hash0.end(), md5hash0.begin(),
my_to_lower );
258 if ( md5hash0.size() != 32 ||
259 md5hash0.find_first_not_of(
"0123456789abcdef" ) != std::string::npos )
261 std::cerr <<
"Warning: argument does not appear to be a valid md5 hash \"" << md5hash0 <<
"\"." << std::endl;
264 std::vector< std::string > hashVector;
265 hashVector.push_back( md5hash0 );
271 while ( *ac - i > 0 )
273 std::string md5hashN = (*av)[i];
276 std::transform(md5hashN.begin(), md5hashN.end(), md5hashN.begin(),
my_to_lower );
279 if ( md5hashN.size() != 32 ||
280 md5hashN.find_first_not_of(
"0123456789abcdef" ) != std::string::npos )
286 hashVector.push_back( md5hashN );
295 hashTestList.push_back(
HashPairType( filename, hashVector ) );
298 else if ( !skip && strcmp((*av)[i],
"--") == 0 )
303 else if ( !skip && strcmp((*av)[i],
"--help") == 0 )
308 else if ( !skip && strcmp((*av)[i],
"--with-threads") == 0 )
316 std::string threadEnv =
"ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=";
317 threadEnv += (*av)[i + 1];
318 itksys::SystemTools::PutEnv( threadEnv.c_str() );
320 itk::MultiThreader::SetGlobalDefaultNumberOfThreads(atoi((*av)[i + 1]));
324 else if ( !skip && strcmp((*av)[i],
"--without-threads") == 0 )
326 itksys::SystemTools::PutEnv(
"ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=1" );
327 itk::MultiThreader::SetGlobalDefaultNumberOfThreads(1);
331 else if ( !skip && strcmp((*av)[i],
"--compareNumberOfPixelsTolerance") == 0 )
342 else if ( !skip && strcmp((*av)[i],
"--compareRadiusTolerance") == 0 )
353 else if ( !skip && strcmp((*av)[i],
"--compareIntensityTolerance") == 0 )
364 else if ( !skip && strcmp((*av)[i],
"--compareCoordinateTolerance") == 0 )
375 else if ( !skip && strcmp((*av)[i],
"--compareDirectionTolerance") == 0 )
387 else if ( !skip && strcmp((*av)[i],
"--ignoreInputInformation") == 0 )
393 else if ( !skip && strcmp((*av)[i],
"--add-before-libpath") == 0 )
400 if( processedOutput )
402 processedOutput->add_before_libpath.push_back( (*av)[i+1] );
407 else if ( !skip && strcmp((*av)[i],
"--add-before-env") == 0 )
414 if( processedOutput )
416 processedOutput->add_before_env.push_back( (*av)[i+1] );
417 processedOutput->add_before_env.push_back( (*av)[i+2] );
422 else if ( !skip && strcmp((*av)[i],
"--add-before-env-with-sep") == 0 )
429 if( processedOutput )
431 processedOutput->add_before_env_with_sep.push_back( (*av)[i+1] );
432 processedOutput->add_before_env_with_sep.push_back( (*av)[i+2] );
433 processedOutput->add_before_env_with_sep.push_back( (*av)[i+3] );
438 else if ( !skip && strcmp((*av)[i],
"--remove-env") == 0 )
446 itksys::SystemTools::UnPutEnv( (*av)[i+1] );
451 else if ( !skip && strcmp((*av)[i],
"--full-output") == 0 )
455 std::cout <<
"CTEST_FULL_OUTPUT" << std::endl;
459 else if ( !skip && strcmp((*av)[i],
"--no-process") == 0 )
463 if( processedOutput )
465 processedOutput->externalProcessMustBeCalled =
false;
470 else if ( !skip && strcmp((*av)[i],
"--redirectOutput") == 0 )
477 redirectOutputParameters.
redirect =
true;
478 redirectOutputParameters.
fileName = (*av)[i + 1];
484 if( processedOutput )
486 processedOutput->args.push_back((*av)[i]);
504 template <
typename PixelType>
506 const char *baselineImageFilename,
508 double intensityTolerance,
510 unsigned int radiusTolerance,
511 bool verifyInputInformation,
512 double coordinateTolerance,
513 double directionTolerance)
523 typename ReaderType::Pointer baselineReader = ReaderType::New();
524 baselineReader->SetFileName(baselineImageFilename);
527 baselineReader->UpdateLargestPossibleRegion();
531 std::cerr <<
"Exception detected while reading " << baselineImageFilename <<
" : " << e.
GetDescription();
536 typename ReaderType::Pointer testReader = ReaderType::New();
537 testReader->SetFileName(testImageFilename);
540 testReader->UpdateLargestPossibleRegion();
544 std::cerr <<
"Exception detected while reading " << testImageFilename <<
" : " << e.
GetDescription() << std::endl;
550 baselineSize = baselineReader->GetOutput()->GetLargestPossibleRegion().
GetSize();
552 testSize = testReader->GetOutput()->GetLargestPossibleRegion().
GetSize();
554 if ( baselineSize != testSize )
556 std::cerr <<
"The size of the Baseline image and Test image do not match!" << std::endl;
557 std::cerr <<
"Baseline image: " << baselineImageFilename
558 <<
" has size " << baselineSize << std::endl;
559 std::cerr <<
"Test image: " << testImageFilename
560 <<
" has size " << testSize << std::endl;
566 typename DiffType::Pointer diff = DiffType::New();
567 diff->SetValidInput( baselineReader->GetOutput() );
568 diff->SetTestInput( testReader->GetOutput() );
569 diff->SetDifferenceThreshold(intensityTolerance);
570 diff->SetToleranceRadius(radiusTolerance);
571 diff->SetVerifyInputInformation(verifyInputInformation);
572 diff->SetCoordinateTolerance(coordinateTolerance);
573 diff->SetDirectionTolerance(directionTolerance);
574 diff->UpdateLargestPossibleRegion();
578 if ( ! reportErrors )
582 std::string shortFilename = itksys::SystemTools::GetFilenameName( baselineImageFilename );
584 std::cout <<
"<DartMeasurement name=\"ImageError " << shortFilename
585 <<
"\" type=\"numeric/double\">";
587 std::cout <<
"</DartMeasurement>" << std::endl;
591 if ( ( status > numberOfPixelsTolerance ) && reportErrors )
595 std::cout <<
"<DartMeasurement name=\"ImageError\" type=\"numeric/double\">";
597 std::cout <<
"</DartMeasurement>" << std::endl;
601 std::cout <<
"<DartMeasurement name=\"ImageError Minimum\" type=\"numeric/double\">";
602 std::cout << diff->GetMinimumDifference() <<
"</DartMeasurement>" << std::endl;
604 std::cout <<
"<DartMeasurement name=\"ImageError Maximum\" type=\"numeric/double\">";
605 std::cout << diff->GetMaximumDifference() <<
"</DartMeasurement>" << std::endl;
607 std::cout <<
"<DartMeasurement name=\"ImageError Mean\" type=\"numeric/double\">";
608 std::cout << diff->GetMeanDifference() <<
"</DartMeasurement>" << std::endl;
617 typename RescaleType::Pointer rescale = RescaleType::New();
620 rescale->SetInput( diff->GetOutput() );
621 rescale->UpdateLargestPossibleRegion();
622 size = rescale->GetOutput()->GetLargestPossibleRegion().GetSize();
629 index[i] = size[i] / 2;
635 region.SetIndex(index);
637 region.SetSize(size);
639 ExtractType::Pointer extract = ExtractType::New();
640 extract->SetDirectionCollapseToIdentity();
641 extract->SetInput( rescale->GetOutput() );
642 extract->SetExtractionRegion(region);
644 WriterType::Pointer writer = WriterType::New();
645 writer->SetInput( extract->GetOutput() );
647 std::ostringstream diffName;
648 diffName << testImageFilename <<
".diff.png";
651 rescale->SetInput( diff->GetOutput() );
654 catch (
const std::exception & e )
656 std::cerr <<
"Error during rescale of " << diffName.str() << std::endl;
657 std::cerr << e.what() <<
"\n";
661 std::cerr <<
"Error during rescale of " << diffName.str() << std::endl;
663 writer->SetFileName( diffName.str().c_str() );
668 catch (
const std::exception & e )
670 std::cerr <<
"Error during write of " << diffName.str() << std::endl;
671 std::cerr << e.what() <<
"\n";
675 std::cerr <<
"Error during write of " << diffName.str() << std::endl;
678 std::cout <<
"<DartMeasurementFile name=\"DifferenceImage\" type=\"image/png\">";
679 std::cout << diffName.str();
680 std::cout <<
"</DartMeasurementFile>" << std::endl;
682 std::ostringstream baseName;
683 baseName << testImageFilename <<
".base.png";
686 rescale->SetInput( baselineReader->GetOutput() );
689 catch (
const std::exception & e )
691 std::cerr <<
"Error during rescale of " << baseName.str() << std::endl;
692 std::cerr << e.what() <<
"\n";
696 std::cerr <<
"Error during rescale of " << baseName.str() << std::endl;
700 writer->SetFileName( baseName.str().c_str() );
703 catch (
const std::exception & e )
705 std::cerr <<
"Error during write of " << baseName.str() << std::endl;
706 std::cerr << e.what() <<
"\n";
710 std::cerr <<
"Error during write of " << baseName.str() << std::endl;
713 std::cout <<
"<DartMeasurementFile name=\"BaselineImage\" type=\"image/png\">";
714 std::cout << baseName.str();
715 std::cout <<
"</DartMeasurementFile>" << std::endl;
717 std::ostringstream testName;
718 testName << testImageFilename <<
".test.png";
721 rescale->SetInput( testReader->GetOutput() );
724 catch (
const std::exception & e )
726 std::cerr <<
"Error during rescale of " << testName.str() << std::endl;
727 std::cerr << e.what() <<
"\n";
731 std::cerr <<
"Error during rescale of " << testName.str() << std::endl;
735 writer->SetFileName( testName.str().c_str() );
738 catch (
const std::exception & e )
740 std::cerr <<
"Error during write of " << testName.str() << std::endl;
741 std::cerr << e.what() <<
"\n";
745 std::cerr <<
"Error during write of " << testName.str() << std::endl;
748 std::cout <<
"<DartMeasurementFile name=\"TestImage\" type=\"image/png\">";
749 std::cout << testName.str();
750 std::cout <<
"</DartMeasurementFile>" << std::endl;
752 return ( status > numberOfPixelsTolerance ) ?
static_cast<int>(status) : 0;
763 imageReader->SetFileName(fileName);
764 imageReader->UpdateOutputInformation();
766 pixelType = imageReader->GetImageIO()->GetPixelType();
767 componentType = imageReader->GetImageIO()->GetComponentType();
771 const char *baselineImageFilename,
773 double intensityTolerance,
775 unsigned int radiusTolerance,
776 bool verifyInputInformation,
777 double coordinateTolerance,
778 double directionTolerance)
784 GetImageType(testImageFilename, pixelType, componentType);
786 switch (componentType)
793 return RegressionTestHelper<unsigned long long>(testImageFilename,
794 baselineImageFilename,
797 numberOfPixelsTolerance,
799 verifyInputInformation,
807 return RegressionTestHelper<long long>(testImageFilename,
808 baselineImageFilename,
811 numberOfPixelsTolerance,
813 verifyInputInformation,
818 return RegressionTestHelper<double>(testImageFilename,
819 baselineImageFilename,
822 numberOfPixelsTolerance,
824 verifyInputInformation,
829 std::cerr <<
"Exception detected while reading " << baselineImageFilename <<
" : " <<
"Unknown component type";
835 std::cerr <<
"Exception detected while reading " << baselineImageFilename <<
" : " << e.
GetDescription();
840 template<
typename TImageType >
843 typedef TImageType ImageType;
848 typename ReaderType::Pointer testReader = ReaderType::New();
849 testReader->SetFileName(testImageFilename);
852 testReader->UpdateLargestPossibleRegion();
856 std::cerr <<
"Exception detected while reading " << testImageFilename <<
" : " << e.
GetDescription() << std::endl;
862 typename HashFilterType::Pointer hasher = HashFilterType::New();
863 hasher->SetInput( testReader->GetOutput() );
866 return hasher->GetHash();
871 const std::vector<std::string> &baselineMD5Vector )
878 itkGenericExceptionMacro(
"Unable to determine ImageIO reader for \"" << testImageFilename <<
"\"" );
882 iobase->SetFileName( testImageFilename );
883 iobase->ReadImageInformation();
888 std::string testMD5 =
"";
889 switch(componentType)
892 testMD5 = ComputeHash< itk::VectorImage<char, ITK_TEST_DIMENSION_MAX> >( testImageFilename );
895 testMD5 = ComputeHash< itk::VectorImage<unsigned char, ITK_TEST_DIMENSION_MAX> >( testImageFilename );
898 testMD5 = ComputeHash< itk::VectorImage<short, ITK_TEST_DIMENSION_MAX> >( testImageFilename );
901 testMD5 = ComputeHash< itk::VectorImage<unsigned short, ITK_TEST_DIMENSION_MAX> >( testImageFilename );
904 testMD5 = ComputeHash< itk::VectorImage<int, ITK_TEST_DIMENSION_MAX> >( testImageFilename );
907 testMD5 = ComputeHash< itk::VectorImage<unsigned int, ITK_TEST_DIMENSION_MAX> >( testImageFilename );
910 testMD5 = ComputeHash< itk::VectorImage<long, ITK_TEST_DIMENSION_MAX> >( testImageFilename );
913 testMD5 = ComputeHash< itk::VectorImage<unsigned long, ITK_TEST_DIMENSION_MAX> >( testImageFilename );
916 testMD5 = ComputeHash< itk::VectorImage<long long, ITK_TEST_DIMENSION_MAX> >( testImageFilename );
919 testMD5 = ComputeHash< itk::VectorImage<unsigned long long, ITK_TEST_DIMENSION_MAX> >( testImageFilename );
923 std::cerr <<
"Hashing is not supporting for float and double images." << std::endl;
924 itkGenericExceptionMacro(
"Hashing is not supported for images of float or doubles." );
929 itkGenericExceptionMacro(
"Logic error!" );
932 std::vector<std::string>::const_iterator iter = baselineMD5Vector.begin();
933 assert( baselineMD5Vector.size() );
936 if ( *iter == testMD5 )
942 while (++iter != baselineMD5Vector.end() );
945 std::cout <<
"<DartMeasurement name=\"TestMD5\" type=\"text/string\">";
946 std::cout << testMD5;
947 std::cout <<
"</DartMeasurement>" << std::endl;
951 for ( iter = baselineMD5Vector.begin(); iter != baselineMD5Vector.end(); ++iter )
953 std::cout <<
"<DartMeasurement name=\"BaselineMD5\" type=\"text/string\">";
955 std::cout <<
"</DartMeasurement>" << std::endl;
967 ReaderType::Pointer reader = ReaderType::New();
968 reader->SetFileName( testImageFilename );
969 reader->UpdateLargestPossibleRegion();
972 size = reader->GetOutput()->GetLargestPossibleRegion().
GetSize();
979 index[i] = size[i] / 2;
985 ImageType::RegionType region;
986 region.SetIndex(index);
988 region.SetSize(size);
990 ExtractType::Pointer extract = ExtractType::New();
991 extract->SetDirectionCollapseToIdentity();
992 extract->SetInput( reader->GetOutput() );
993 extract->SetExtractionRegion(region);
995 RescaleType::Pointer rescale = RescaleType::New();
998 rescale->SetInput( extract->GetOutput() );
1000 WriterType::Pointer writer = WriterType::New();
1001 writer->SetInput( rescale->GetOutput() );
1004 std::ostringstream testName;
1005 testName << testImageFilename <<
".test.png";
1007 writer->SetFileName( testName.str().c_str() );
1011 rescale->UpdateLargestPossibleRegion();
1014 catch (
const std::exception &
e )
1016 std::cerr <<
"Error during rescale and writing of " << testName.str()<< std::endl;
1017 std::cerr << e.what() <<
"\n";
1021 std::cerr <<
"Unknow error during rescale and writing of " << testName.str() << std::endl;
1024 std::cout <<
"<DartMeasurementFile name=\"TestImage\" type=\"image/png\">";
1025 std::cout << testName.str();
1026 std::cout <<
"</DartMeasurementFile>" << std::endl;
1042 std::map< std::string, int > baselines;
1043 baselines[std::string(baselineFilename)] = 0;
1045 std::string originalBaseline(baselineFilename);
1048 std::string::size_type suffixPos = originalBaseline.rfind(
".");
1050 if ( suffixPos != std::string::npos )
1052 suffix = originalBaseline.substr( suffixPos, originalBaseline.length() );
1053 originalBaseline.erase( suffixPos, originalBaseline.length() );
1057 std::ostringstream filename;
1058 filename << originalBaseline <<
"." << x << suffix;
1059 std::ifstream filestream( filename.str().c_str() );
1064 baselines[filename.str()] = 0;
1072 #include "itkTestingComparisonImageFilter.hxx"
std::string ComputeHash(const char *testImageFilename)
unsigned int numberOfPixelsTolerance
ArgumentsList add_before_libpath
void GetImageType(const char *fileName, itk::ImageIOBase::IOPixelType &pixelType, itk::ImageIOBase::IOComponentType &componentType)
Get the PixelType and ComponentType from fileName.
static char my_to_lower(const char c)
ArgumentsList add_before_env_with_sep
bool verifyInputInformation
An image region represents a structured region of data.
int HashTestImage(const char *testImageFilename, const std::string md5hash)
ArgumentsList add_before_env
std::vector< char * > ArgumentsList
unsigned long SizeValueType
Applies a linear transformation to the intensity levels of the input Image.
int RegressionTestImage(const char *testImageFilename, const char *baselineImageFilename, int reportErrors, double intensityTolerance,::itk::SizeValueType numberOfPixelsTolerance=0, unsigned int radiusTolerance=0, bool verifyInputInformation=true, double coordinateTolerance=1.0e-6, double directionTolerance=1.0e-6)
char ** ArgumentStringType
std::map< std::string, int > RegressionTestBaselines(char *)
static ITK_CONSTEXPR_FUNC T max(const T &)
RegressionTestParameters regressionTestParameters
std::pair< char *, char * > ComparePairType
int RegressionTestHelper(const char *testImageFilename, const char *baselineImageFilename, int reportErrors, double intensityTolerance,::itk::SizeValueType numberOfPixelsTolerance, unsigned int radiusTolerance, bool verifyInputInformation, double coordinateTolerance, double directionTolerance)
bool externalProcessMustBeCalled
Generates a md5 hash string from an image.
void Fill(IndexValueType value)
Standard exception handling object.
#define ITK_TEST_DIMENSION_MAX
unsigned int radiusTolerance
Writes image data to a single file.
Implements comparison between two images.
Data source that reads image data from a single file.
static ImageIOBasePointer CreateImageIO(const char *path, FileModeType mode)
std::vector< ComparePairType > compareList
double coordinateTolerance
double directionTolerance
int ProcessArguments(int *ac, ArgumentStringType *av, ProcessedOutputType *processedOutput=nullptr)
ImageBaseType::SizeType SizeType
Define additional traits for native types such as int or float.
RedirectOutputParameters redirectOutputParameters
std::pair< const char *, std::vector< std::string > > HashPairType
double intensityTolerance
static ITK_CONSTEXPR_VAR double e
The base of the natural logarithm or Euler's number
std::vector< HashPairType > hashTestList
void Fill(SizeValueType value)
const SizeValueType * GetSize() const
Templated n-dimensional image class.
ImageBaseType::IndexType IndexType
virtual const char * GetDescription() const