ITK
4.13.0
Insight Segmentation and Registration Toolkit
|
#include "itksys/Process.h"
#include "itkWin32Header.h"
#include <map>
#include <algorithm>
#include <string>
#include <iostream>
#include <fstream>
#include "itkMultiThreader.h"
#include "itkImage.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "itkImageRegionConstIterator.h"
#include "itkTestingStretchIntensityImageFilter.h"
#include "itkTestingExtractSliceImageFilter.h"
#include "itkTestingComparisonImageFilter.h"
#include "itkTestingHashImageFilter.h"
#include "itksys/SystemTools.hxx"
#include "itkIntTypes.h"
#include "vnl/vnl_sample.h"
#include "itkTestingComparisonImageFilter.hxx"
Go to the source code of this file.
Classes | |
struct | ProcessedOutputType |
struct | RedirectOutputParameters |
struct | RegressionTestParameters |
Macros | |
#define | ITK_TEST_DIMENSION_MAX 6 |
Typedefs | |
typedef std::vector< char * > | ArgumentsList |
typedef char ** | ArgumentStringType |
typedef std::pair< char *, char * > | ComparePairType |
typedef std::pair< const char *, std::vector< std::string > > | HashPairType |
Functions | |
template<typename TImageType > | |
std::string | ComputeHash (const char *testImageFilename) |
void | GetImageType (const char *fileName, itk::ImageIOBase::IOPixelType &pixelType, itk::ImageIOBase::IOComponentType &componentType) |
int | HashTestImage (const char *testImageFilename, const std::string md5hash) |
int | HashTestImage (const char *testImageFilename, const std::vector< std::string > &baselineMD5Vector) |
static char | my_to_lower (const char c) |
int | ProcessArguments (int *ac, ArgumentStringType *av, ProcessedOutputType *processedOutput=nullptr) |
std::map< std::string, int > | RegressionTestBaselines (char *) |
template<typename PixelType > | |
int | RegressionTestHelper (const char *testImageFilename, const char *baselineImageFilename, int reportErrors, double intensityTolerance,::itk::SizeValueType numberOfPixelsTolerance, unsigned int radiusTolerance, bool verifyInputInformation, double coordinateTolerance, double directionTolerance) |
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) |
void | usage () |
Variables | |
std::vector< HashPairType > | hashTestList |
RedirectOutputParameters | redirectOutputParameters |
RegressionTestParameters | regressionTestParameters |
#define ITK_TEST_DIMENSION_MAX 6 |
Definition at line 63 of file itkTestDriverInclude.h.
Referenced by HashTestImage(), and RegressionTestHelper().
typedef std::vector< char * > ArgumentsList |
Definition at line 106 of file itkTestDriverInclude.h.
typedef char** ArgumentStringType |
Definition at line 102 of file itkTestDriverInclude.h.
typedef std::pair< char *, char * > ComparePairType |
Definition at line 81 of file itkTestDriverInclude.h.
typedef std::pair< const char *, std::vector<std::string> > HashPairType |
Definition at line 98 of file itkTestDriverInclude.h.
std::string ComputeHash | ( | const char * | testImageFilename | ) |
Definition at line 841 of file itkTestDriverInclude.h.
References itk::Math::e, and itk::ExceptionObject::GetDescription().
void GetImageType | ( | const char * | fileName, |
itk::ImageIOBase::IOPixelType & | pixelType, | ||
itk::ImageIOBase::IOComponentType & | componentType | ||
) |
Get the PixelType and ComponentType from fileName.
Definition at line 757 of file itkTestDriverInclude.h.
References itk::ImageFileReader< TOutputImage, ConvertPixelTraits >::New().
Referenced by RegressionTestImage().
int HashTestImage | ( | const char * | testImageFilename, |
const std::string | md5hash | ||
) |
int HashTestImage | ( | const char * | testImageFilename, |
const std::vector< std::string > & | baselineMD5Vector | ||
) |
Definition at line 870 of file itkTestDriverInclude.h.
References itk::ImageIOBase::CHAR, itk::ImageIOFactory::CreateImageIO(), itk::ImageIOBase::DOUBLE, itk::Math::e, itk::Index< VIndexDimension >::Fill(), itk::ImageIOBase::FLOAT, itk::Size< VDimension >::GetSize(), itk::ImageIOBase::INT, itk::SmartPointer< TObjectType >::IsNull(), ITK_TEST_DIMENSION_MAX, itk::ImageIOBase::LONG, itk::ImageIOBase::LONGLONG, itk::ImageIOFactory::ReadMode, itk::ImageIOBase::SHORT, itk::ImageIOBase::UCHAR, itk::ImageIOBase::UINT, itk::ImageIOBase::ULONG, itk::ImageIOBase::ULONGLONG, itk::ImageIOBase::UNKNOWNCOMPONENTTYPE, and itk::ImageIOBase::USHORT.
|
static |
Definition at line 205 of file itkTestDriverInclude.h.
Referenced by ProcessArguments().
int ProcessArguments | ( | int * | ac, |
ArgumentStringType * | av, | ||
ProcessedOutputType * | processedOutput = nullptr |
||
) |
Definition at line 210 of file itkTestDriverInclude.h.
References RegressionTestParameters::compareList, RegressionTestParameters::coordinateTolerance, RegressionTestParameters::directionTolerance, itk::FloatingPointExceptions::Enable(), RedirectOutputParameters::fileName, RegressionTestParameters::intensityTolerance, my_to_lower(), RegressionTestParameters::numberOfPixelsTolerance, RegressionTestParameters::radiusTolerance, RedirectOutputParameters::redirect, usage(), and RegressionTestParameters::verifyInputInformation.
Referenced by ProcessArgumentsAndRegisterBuiltInFactories(), and ProcessArgumentsAndRegisterRequiredFactories().
std::map< std::string, int > RegressionTestBaselines | ( | char * | baselineFilename | ) |
Definition at line 1040 of file itkTestDriverInclude.h.
int RegressionTestHelper | ( | const char * | testImageFilename, |
const char * | baselineImageFilename, | ||
int | reportErrors, | ||
double | intensityTolerance, | ||
::itk::SizeValueType | numberOfPixelsTolerance, | ||
unsigned int | radiusTolerance, | ||
bool | verifyInputInformation, | ||
double | coordinateTolerance, | ||
double | directionTolerance | ||
) |
Definition at line 505 of file itkTestDriverInclude.h.
References itk::Math::e, itk::Size< VDimension >::Fill(), itk::Index< VIndexDimension >::Fill(), itk::ExceptionObject::GetDescription(), itk::Size< VDimension >::GetSize(), ITK_TEST_DIMENSION_MAX, and itk::NumericTraits< T >::max().
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 |
||
) |
Definition at line 770 of file itkTestDriverInclude.h.
References itk::ImageIOBase::CHAR, itk::ImageIOBase::DOUBLE, itk::Math::e, itk::ImageIOBase::FLOAT, itk::ExceptionObject::GetDescription(), GetImageType(), itk::ImageIOBase::INT, itk::ImageIOBase::LONG, itk::ImageIOBase::LONGLONG, itk::NumericTraits< T >::max(), itk::ImageIOBase::SHORT, itk::ImageIOBase::UCHAR, itk::ImageIOBase::UINT, itk::ImageIOBase::ULONG, itk::ImageIOBase::ULONGLONG, itk::ImageIOBase::UNKNOWNCOMPONENTTYPE, and itk::ImageIOBase::USHORT.
void usage | ( | ) |
Definition at line 127 of file itkTestDriverInclude.h.
Referenced by ProcessArguments().
std::vector< HashPairType > hashTestList |
Definition at line 100 of file itkTestDriverInclude.h.
RedirectOutputParameters redirectOutputParameters |
Definition at line 125 of file itkTestDriverInclude.h.
RegressionTestParameters regressionTestParameters |
Definition at line 95 of file itkTestDriverInclude.h.