go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Data Structures | Namespaces | Macros | Functions
elxCoreMainGTestUtilities.h File Reference
#include <elxBaseComponent.h>
#include <elxParameterObject.h>
#include <itkImage.h>
#include <itkImageBufferRange.h>
#include <itkImageRegionRange.h>
#include <itkIndex.h>
#include <itkSize.h>
#include <algorithm>
#include <array>
#include <cmath>
#include <initializer_list>
#include <iterator>
#include <map>
#include <numeric>
#include <string>
#include <type_traits>
#include <vector>
#include <gtest/gtest.h>
Include dependency graph for elxCoreMainGTestUtilities.h:

Go to the source code of this file.

Data Structures

class  elastix::CoreMainGTestUtilities::Exception
 

Namespaces

namespace  elastix
 
namespace  elastix::CoreMainGTestUtilities
 

Macros

#define ELX_GTEST_EXPECT_FALSE_AND_THROW_EXCEPTION_IF(condition)
 

Functions

template<typename T >
itk::SmartPointer< T > elastix::CoreMainGTestUtilities::CheckNew ()
 
std::vector< doubleelastix::CoreMainGTestUtilities::ConvertStringsToVectorOfDouble (const std::vector< std::string > &strings)
 
template<std::vcl_size_t VDimension>
itk::Offset< VDimension > elastix::CoreMainGTestUtilities::ConvertToOffset (const std::vector< double > &doubles)
 
template<typename TPixel , unsigned VImageDimension>
auto elastix::CoreMainGTestUtilities::CreateImage (const itk::Size< VImageDimension > &imageSize)
 
template<typename TPixel , unsigned VImageDimension>
auto elastix::CoreMainGTestUtilities::CreateImageFilledWithSequenceOfNaturalNumbers (const itk::Size< VImageDimension > &imageSize)
 
std::map< std::string, std::vector< std::string > > elastix::CoreMainGTestUtilities::CreateParameterMap (std::initializer_list< std::pair< std::string, std::string > > initializerList)
 
template<unsigned VImageDimension>
std::map< std::string, std::vector< std::string > > elastix::CoreMainGTestUtilities::CreateParameterMap (std::initializer_list< std::pair< std::string, std::string > > initializerList)
 
ParameterObject::Pointer elastix::CoreMainGTestUtilities::CreateParameterObject (std::initializer_list< std::pair< std::string, std::string > > initializerList)
 
template<typename TRawPointer >
decltype(auto) elastix::CoreMainGTestUtilities::Deref (const TRawPointer ptr)
 
template<typename TSmartPointer >
decltype(auto) elastix::CoreMainGTestUtilities::DerefSmartPointer (const TSmartPointer &ptr)
 
template<typename TPixel , unsigned int VImageDimension>
void elastix::CoreMainGTestUtilities::FillImageRegion (itk::Image< TPixel, VImageDimension > &image, const itk::Index< VImageDimension > &regionIndex, const itk::Size< VImageDimension > &regionSize)
 
template<typename T >
decltype(T().front()) elastix::CoreMainGTestUtilities::Front (T &container)
 
std::string elastix::CoreMainGTestUtilities::GetCurrentBinaryDirectoryPath ()
 
std::string elastix::CoreMainGTestUtilities::GetDataDirectoryPath ()
 
std::string elastix::CoreMainGTestUtilities::GetNameOfTest (const testing::Test &)
 
template<typename TFilter >
std::vector< doubleelastix::CoreMainGTestUtilities::GetTransformParametersFromFilter (TFilter &filter)
 
std::vector< doubleelastix::CoreMainGTestUtilities::GetTransformParametersFromMaps (const std::vector< ParameterObject::ParameterMapType > &transformParameterMaps)
 

Macro Definition Documentation

◆ ELX_GTEST_EXPECT_FALSE_AND_THROW_EXCEPTION_IF

#define ELX_GTEST_EXPECT_FALSE_AND_THROW_EXCEPTION_IF (   condition)
Value:
if (condition) \
{ \
EXPECT_FALSE(true) << "Expected to be false: " #condition; \
throw ::elastix::CoreMainGTestUtilities::Exception("Exception thrown because " #condition); \
} \
static_assert(true, "Expect a semi-colon ';' at the end of a macro call")

Expect the specified condition to be false, and throw an exception if it is true.

Definition at line 70 of file elxCoreMainGTestUtilities.h.



Generated on Wed 12 Apr 2023 for elastix by doxygen 1.9.6 elastix logo