DMRITool  v0.1.1-139-g860d86b4
Diffusion MRI Tool
Namespaces | Macros | Enumerations | Functions
UtlHelperFunctions
+ Collaboration diagram for UtlHelperFunctions:

Namespaces

 itk
 
 utl
 

Macros

#define __UTL_BOLD(str)   str
 
#define __UTL_constexpr   constexpr
 
#define __UTL_DEBUG_STRING   "Debug"
 
#define __UTL_ERROR_STRING   "Error"
 
#define __UTL_EXPSTR(str)   str
 
#define __UTL_FATAL_STRING   "Fatal"
 
#define __utl_LOCATION__   __FUNCTION__
 
#define __UTL_LOG_STRING   "Log"
 
#define __UTL_Print_LOCATION   "In "<< __UTL_BOLD("File") << ": " <<__FILE__<< ", "<<__UTL_BOLD("Line")<<": " << __LINE__ << ", "<<__UTL_BOLD("Function")<<": " << __utl_LOCATION__ << "\n"
 
#define __UTL_WARNING_STRING   "Warning"
 
#define __utlConditionFailPrint(cond)    __UTL_Print_LOCATION <<__UTL_BOLD("Expression")<<": '" << __UTL_EXPSTR(#cond) << "' failed. " << "\n"
 
#define __utlConditionSucceedPrint(cond)    __UTL_Print_LOCATION <<__UTL_BOLD("Expression")<<": '" << __UTL_EXPSTR(#cond) << "' satisfied. " << "\n"
 
#define EXPECT_NEAR_COMPLEX(val1, val2, eps)   do { EXPECT_NEAR(std::abs(val1-val2), 0.0, eps) << "val1="<<val1 <<", val2=" <<val2; } while(0)
 
#define EXPECT_NEAR_MATRIX(mat1, mat2, Row, Col, eps)
 
#define EXPECT_NEAR_MATRIX_COMPLEX(mat1, mat2, Row, Col, eps)
 
#define EXPECT_NEAR_RELATIVE(val1, val2, eps)   do { EXPECT_NEAR(val1,val2, eps*std::fabs(val2)); } while (0)
 
#define EXPECT_NEAR_STDVECTOR(vec1, vec2, eps)
 
#define EXPECT_NEAR_UTLMATRIX(mat1, mat2, eps)
 
#define EXPECT_NEAR_UTLVECTOR(vec1, vec2, eps)
 
#define EXPECT_NEAR_VECTOR(vec1, vec2, N, eps)
 
#define EXPECT_NEAR_VECTOR_COMPLEX(vec1, vec2, N, eps)
 
#define EXPECT_NEAR_VNLMATRIX(mat1, mat2, eps)
 
#define EXPECT_NEAR_VNLVECTOR(vec1, vec2, eps)   EXPECT_NEAR_STDVECTOR(vec1,vec2,eps)
 
#define ITK_DELETE_FUNCTION   =delete
 
#define ITK_HAS_CXX11_RVREF
 
#define ITK_HAS_CXX11_STATIC_ASSERT
 
#define ITK_NOEXCEPT   noexcept
 
#define ITK_NULLPTR   nullptr
 
#define ITK_OVERRIDE   override
 
#define itkFunctorGetMacro(name, type)
 
#define itkFunctorSetGetMacro(name, type)
 
#define itkFunctorSetMacro(name, type)
 
#define itkGetConstPointerMacro(name, type)
 
#define itkGetPointerMacro(name, type)
 
#define itkSetByConstReferenceMacro(name, type)
 
#define itkSetGetBooleanMacro(name)
 
#define itkSetGetMacro(name, type)
 
#define itkSetNDebugByConstReferenceMacro(name, type)
 
#define itkSetNDebugMacro(name, type)
 
#define itkSetNoConstMacro(name, type)
 
#define itkShowPositionThreadedLogger(cond)
 
#define itkThreadedLogger(cond, msgStr)
 
#define itkTypedefMaskedImageToImageMacro(Superclass)
 
#define itkVectorImageFilterComposeMacro(VectorImageType, ScalarImageFilterType, scalarImageFilter, input, output)
 
#define M_EPS   1e-9
 
#define M_PI   3.14159265358979323846264338328
 
#define ONE_OVER_4_PI_2   0.025330295910584442860969865802431910
 
#define PrintEnum1(cond, var, val1, os)
 
#define PrintEnum2(cond, var, val1, val2, os)
 
#define PrintEnum3(cond, var, val1, val2, val3, os)
 
#define PrintEnum4(cond, var, val1, val2, val3, val4, os)
 
#define PrintEnum5(cond, var, val1, val2, val3, val4, val5, os)
 
#define PrintEnum6(cond, var, val1, val2, val3, val4, val5, val6, os)
 
#define PrintVar(cond, os, ...)
 
#define PrintVar1(cond, var, os)
 
#define PrintVar2(cond, var1, var2, os)
 
#define PrintVar3(cond, var1, var2, var3, os)
 
#define PrintVar4(cond, var1, var2, var3, var4, os)
 
#define PrintVar5(cond, var1, var2, var3, var4, var5, os)
 
#define PrintVar6(cond, var1, var2, var3, var4, var5, var6, os)
 
#define UTL_ALWAYS_INLINE   inline __attribute__((always_inline))
 
#define UTL_COMMA   ,
 
#define utl_hash   std::hash
 
#define utl_help(str)   utl::utlOption((char*)NULL,(unsigned int)argc,(char**)argv,str,(char*)NULL)
 
#define utl_option(name, defaut, usage)   utl::utlOption((char*)name,(unsigned int)argc,(char**)argv,defaut,(char*)usage)
 
#define UTL_OS   0
 
#define utl_shared_ptr   std::shared_ptr
 
#define utl_showdoc(argu)   if (utl_option(argu,(const char *)NULL,0)) return 0;
 
#define utl_unordered_map   std::unordered_map
 
#define utl_usage(usage)   utl::utlOption((char*)NULL,(unsigned int)argc,(char**)argv,(char*)NULL,(char*)usage)
 
#define utlAbort(expout)   do { std::cerr << expout <<"\n" << std::flush; abort(); } while(0)
 
#define utlArraySize(array)   (sizeof(__utlArraySizeHelper(array)))
 
#define utlAssert(cond, expout)
 
#define utlDebug(cond, expout)
 
#define utlException(cond, expout)
 
#define utlGetMacro(name, type)
 
#define utlGlobalAssert(cond, expout)
 
#define utlGlobalException(cond, expout)
 
#define utlGlobalWarning(cond, expout)    utlOSGlobalWarning(cond,expout,std::cout)
 
#define utlLog(expr)    utlVLogOS_IF(true, 0, std::cout << expr)
 
#define utlLog_IF(cond, expr)    utlVLogOS_IF(cond, 0, std::cout << expr)
 
#define utlLogOS(os)    utlVLogOS_IF(true, 0, os)
 
#define utlLogOS_IF(cond, os)    utlVLogOS_IF(cond, 0, os)
 
#define utlLogOSVar(os, ...)    utlVLogOSVar_IF(true, 0, os, __VA_ARGS__)
 
#define utlLogOSVar_IF(cond, os, ...)    utlVLogOSVar_IF(cond, 0, os, __VA_ARGS__)
 
#define utlLogVar(...)    utlVLogOSVar_IF(true, 0, std::cout, __VA_ARGS__)
 
#define utlLogVar_IF(cond, ...)    utlVLogOSVar_IF(cond, 0, std::cout, __VA_ARGS__)
 
#define utlNumberOfArgs(...)    utl::GetNumberOfArgs(__VA_ARGS__)
 
#define utlOSGlobalWarning(cond, expout, os)
 
#define utlOSPrintVar(cond, os, ...)
 
#define utlOSPrintVar1(cond, var)
 
#define utlOSPrintVar2(cond, var1, var2)
 
#define utlOSPrintVar3(cond, var1, var2, var3)
 
#define utlOSPrintVar4(cond, var1, var2, var3, var4)
 
#define utlOSPrintVar5(cond, var1, var2, var3, var4, var5)
 
#define utlOSPrintVar6(cond, var1, var2, var3, var4, var5, var6)
 
#define utlOSShowPosition(cond, os)
 
#define utlOSWarning(cond, expout, os)
 
#define utlPrintVar(cond, ...)
 
#define utlPrintVar1(cond, var)
 
#define utlPrintVar2(cond, var1, var2)
 
#define utlPrintVar3(cond, var1, var2, var3)
 
#define utlPrintVar4(cond, var1, var2, var3, var4)
 
#define utlPrintVar5(cond, var1, var2, var3, var4, var5)
 
#define utlPrintVar6(cond, var1, var2, var3, var4, var5, var6)
 
#define utlSAAssert(expr)    utlSAGlobalAssert(true)
 
#define utlSAException(expr)   utlSAGlobalException(false)
 
#define utlSAGlobalAssert(expr)
 
#define utlSAGlobalException(expr)
 
#define utlSAGlobalPrint   utlSAGlobalPrintIf("")
 
#define utlSAGlobalPrintIf(expr)
 
#define utlSAGlobalWarning(expr)
 
#define utlSAPrint   utlSAPrintIf("")
 
#define utlSAPrintIf(expr)    utlSAGlobalPrintIf(false)
 
#define utlSASetLog(log)   Assert::set_log(log)
 
#define utlSAWarning(expr)    utlSAGlobalWarning(false)
 
#define utlSetGetMacro(name, type)
 
#define utlSetMacro(name, type)
 
#define utlShowPosition(cond)
 
#define utlVLog(level, expr)    utlVLogOS_IF(true, level, std::cout << expr)
 
#define utlVLog_IF(cond, level, expr)    utlVLogOS_IF(cond, level, std::cout << expr)
 
#define utlVLogOS(level, os)    utlVLogOS_IF(true, level, os)
 
#define utlVLogOS_IF(cond, level, os)
 
#define utlVLogOSPosition_IF(cond, level, os)
 
#define utlVLogOSVar(level, os, ...)    utlVLogOSVar_IF(true, level, os, __VA_ARGS__)
 
#define utlVLogOSVar_IF(cond, level, os, ...)
 
#define utlVLogPosition(level)    utlVLogOSPosition_IF(true, level, std::cout)
 
#define utlVLogVar(level, ...)    utlVLogOSVar_IF(true, level, std::cout, __VA_ARGS__)
 
#define utlVLogVar_IF(cond, level, ...)    utlVLogOSVar_IF(cond, level, std::cout, __VA_ARGS__)
 
#define utlWarning(cond, expout)
 
#define vtkAddInputData(x, y)   do { (x)->AddInput(y); } while (0)
 
#define vtkSetInputData(x, y)   do { (x)->SetInput(y); } while (0)
 

Enumerations

enum  {
  TENSOR_9D =0,
  TENSOR_UPPER_TRIANGULAR,
  TENSOR_LOWER_TRIANGULAR,
  TENSOR_DIAGONAL_FIRST,
  TENSOR_EMBED6D
}
 
enum  {
  TRACTS_UNKNOWN =0,
  TRACTS_TRK =1,
  TRACTS_TCK =2,
  TRACTS_VTK =3
}
 
enum  {
  DWI_NORMALIZE =0,
  DWI_NONORMALIZE
}
 
enum  {
  IMAGE_ND =0,
  IMAGE_VECTOR,
  IMAGE_VARIABLELENGTH,
  IMAGE_SPARSE
}
 
enum  {
  COLOR_NORMAL =0,
  COLOR_BOLD,
  COLOR_BLACK,
  COLOR_WHITE,
  COLOR_PURPLE,
  COLOR_RED,
  COLOR_GREEN,
  COLOR_YELLOW,
  COLOR_BLUE,
  COLOR_CYAN
}
 
enum  {
  ROW_MAJOR =0,
  COLUMN_MAJOR
}
 
enum  {
  LOG_MUTE =0,
  LOG_NORMAL =1,
  LOG_DEBUG =2,
  LOG_LARGE =3,
  LOG_ALL =100000000
}
 
enum  {
  CARTESIAN_TO_CARTESIAN =0,
  CARTESIAN_TO_SPHERICAL =1,
  SPHERICAL_TO_CARTESIAN =2,
  SPHERICAL_TO_SPHERICAL =3
}
 
enum  {
  RADIAN_TO_DEGREE =0,
  RADIAN_TO_RADIAN =1,
  DEGREE_TO_RADIAN =2,
  DEGREE_TO_DEGREE =3
}
 
enum  {
  DIRECTION_NODUPLICATE =0,
  DIRECTION_DUPLICATE =1
}
 
enum  {
  DIRECTION_NOFLIP =0,
  DIRECTION_FLIP =1
}
 

Functions

template<typename T , vcl_size_t N>
char(& __utlArraySizeHelper (T(&array)[N]))[N]
 
template<typename T , vcl_size_t N>
char(& __utlArraySizeHelper (const T(&array)[N]))[N]
 
template<class T >
vnl_matrix< T > utl::CartesianToSpherical (const vnl_matrix< T > &in)
 
template<class T >
vnl_matrix< T > utl::ConnectVnlMatrix (const vnl_matrix< T > &m1, const vnl_matrix< T > &m2, const bool isConnectRow)
 
template<class T >
vnl_vector< T > utl::ConnectVnlVector (const vnl_vector< T > &m1, const vnl_vector< T > &m2)
 
template<class ImageWithInfoType , class ImageType >
void itk::CopyImageInformation (const SmartPointer< ImageWithInfoType > &imageFrom, SmartPointer< ImageType > &imageTo)
 
template<unsigned dimIn, unsigned dimOut>
void itk::CopyImageRegion (const ImageRegion< dimIn > &regionIn, ImageRegion< dimOut > &regionOut, const int numberOfComponens=-1)
 
template<class ImageType >
ImageType::Pointer itk::GenerateImage (const typename ImageType::SizeType &size, const int vectorLength=1)
 
template<class ImageType >
ImageType::Pointer itk::GenerateImageFromSingleVoxel (const typename ImageType::PixelType &pixel)
 
template<class T >
vnl_vector< T > utl::GetAbsoluteVnlVector (const vnl_vector< T > &vec)
 
template<class T >
vnl_matrix< T > utl::GetColumnsVnlMatrix (const vnl_matrix< T > &mat, const std::vector< int > &index)
 
template<class T >
vnl_matrix< T > utl::GetDiagonalMatrix (const vnl_vector< T > &vec)
 
int itk::GetImageType (const std::string &filename)
 
template<class ImageType >
int itk::GetImageType (const SmartPointer< ImageType > &image)
 
template<class T >
utl::GetMedianVnlVector (const vnl_vector< T > &values)
 
template<class T >
double utl::GetMinAngle (const vnl_matrix< T > &grad)
 
template<class T >
vnl_matrix< T > utl::GetRowsVnlMatrix (const vnl_matrix< T > &mat, const std::vector< int > &index)
 
template<class T >
vnl_vector< T > utl::GetValuesVnlVector (const vnl_vector< T > &vec, const int colstart, const int n)
 
template<class T >
vnl_vector< T > utl::GetValuesVnlVector (const vnl_vector< T > &vec, const std::vector< int > &index)
 
template<class ImageType >
std::vector< int > itk::GetVectorImage3DVolumeSize (const SmartPointer< ImageType > &image)
 
template<class ImageType >
std::vector< int > itk::GetVectorImageFullSize (const SmartPointer< ImageType > &image)
 
template<class ImageType >
int itk::GetVectorImageVectorSize (const SmartPointer< ImageType > &image, const int axis=-1)
 
template<class T >
vnl_matrix< T > utl::GetVnlMatrixPInverse (const vnl_matrix< T > &mat, const double eps=1e-8)
 
template<class T >
std::vector< T > utl::GetVnlMatrixStats (const vnl_matrix< T > &values)
 
template<class T >
vnl_matrix< T > utl::GetVnlSymmericMatrixPInverse (const vnl_matrix< T > &mat, const double eps=1e-8)
 
template<class T >
std::vector< T > utl::GetVnlVectorStats (const vnl_vector< T > &values)
 
template<class Image1Type , class Image2Type >
void itk::ImageToImage (const SmartPointer< Image1Type > &image1, SmartPointer< Image2Type > &image2)
 
template<class Image1Type , class Image2Type >
SmartPointer< Image2Type > itk::ImageToImage (const SmartPointer< Image1Type > &image1)
 
bool itk::Is3DImage (const std::string &filename)
 
template<class ImageType >
bool itk::IsImageEmpty (const SmartPointer< ImageType > &image)
 
template<class T >
bool utl::IsMatrixSymmetric (const vnl_matrix< T > &mat, const double eps=1e-10)
 
bool itk::IsSparseImage (const std::string &filename)
 
bool itk::IsVectorImage (const std::string &filename)
 
template<class T >
vnl_matrix< T > utl::NormalizeMinMax (const vnl_matrix< T > &matrix)
 
template<class PointsContainer , class VnlValueType >
void itk::PointsContainerToVnlMatrix (const PointsContainer &points, vnl_matrix< VnlValueType > &matrix)
 
template<class TPixelType , unsigned int VImageDimension>
void itk::PrintImage (const SmartPointer< Image< TPixelType, VImageDimension > > image, const std::string &mse="", std::ostream &os=std::cout, bool isPrintHeader=false)
 
template<class TPixelType , unsigned int VImageDimension>
void itk::PrintImage3D (const SmartPointer< Image< TPixelType, VImageDimension > > &image, const std::string &mse="", std::ostream &os=std::cout, bool isPrintHeader=false)
 
template<class TPixelType , unsigned int VImageDimension>
void itk::PrintImage4D (const SmartPointer< Image< TPixelType, VImageDimension > > &image, const std::string &mse="", std::ostream &os=std::cout, bool isPrintHeader=false)
 
template<class T >
void itk::PrintVariableLengthVector (const VariableLengthVector< T >vec, const std::string &str="", const char *separate=" ", std::ostream &os=std::cout)
 
template<class TPixelType , unsigned int VImageDimension>
void itk::PrintVectorImage (const SmartPointer< VectorImage< TPixelType, VImageDimension > > &image, const std::string &mse="", std::ostream &os=std::cout, bool isPrintHeader=false)
 
template<class T >
void utl::PrintVnlMatrix (const vnl_matrix< T > &matrix, const std::string &str="", const char *separate=" ", std::ostream &os=std::cout)
 
template<class T >
void utl::PrintVnlMatrixStats (const vnl_matrix< T > &matrix, const std::string &str="", const char *separate=" ", std::ostream &os=std::cout)
 
template<class T >
void utl::PrintVnlVector (const vnl_vector< T > &vec, const std::string &str="", const char *separate=" ", std::ostream &os=std::cout)
 
template<class ImageType >
bool itk::ReadImage (const std::string &filename, SmartPointer< ImageType > &image, const std::string &printInfo="Reading Image:")
 
template<class ImageType , class ReaderType >
bool itk::ReadImage (const std::string &filename, SmartPointer< ImageType > &image, const std::string &printInfo="Reading Image:")
 
template<class ImageType >
bool itk::ReadImageInformation (const std::string &filename, SmartPointer< ImageType > &image)
 
template<class ImageType >
bool itk::SaveImage (const SmartPointer< ImageType > &image, const std::string &filename, const std::string &printInfo="Writing Image:")
 
template<class ImageType , class WriterType >
bool itk::SaveImage (const SmartPointer< ImageType > &image, const std::string &filename, const std::string &printInfo="Writing Image:")
 
template<class T >
void utl::SaveVnlMatrix (const vnl_matrix< T > &matrix, const std::string &file)
 
template<class T >
void utl::SetColumnsVnlMatrix (const vnl_matrix< T > &submat, vnl_matrix< T > &mat, const std::vector< int > &index)
 
template<class T >
void utl::SetRowsVnlMatrix (const vnl_matrix< T > &submat, vnl_matrix< T > &mat, const std::vector< int > &index)
 
template<class T >
void utl::SetValuesVnlVector (const vnl_vector< T > &subvec, vnl_vector< T > &vec, const int colstart)
 
template<class T >
void utl::SetValuesVnlVector (const vnl_vector< T > &subvec, vnl_vector< T > &vec, const std::vector< int > &index)
 
template<class ImageType >
void itk::SetVectorImage3DVolumeSize (SmartPointer< ImageType > &image, const std::vector< int > &size)
 
template<class ImageType >
void itk::SetVectorImageFullSize (SmartPointer< ImageType > &image, const std::vector< int > &size)
 
template<class ImageType >
void itk::SetVectorImageVectorSize (const SmartPointer< ImageType > &image, const int vecsize)
 
template<class T >
vnl_matrix< T > utl::SphericalToCartesian (const vnl_matrix< T > &in)
 
template<class T >
vnl_vector< T > utl::StdVectorToVnlVector (const std::vector< T > &vec)
 
template<class T >
void utl::UtlMatrixToVnlMatrix (const NDArray< T, 2 > &mat, vnl_matrix< T > &matVnl)
 
template<class T >
vnl_matrix< T > utl::UtlMatrixToVnlMatrix (const NDArray< T, 2 > &mat)
 
template<class T >
vnl_vector< T > utl::UtlVectorToVnlVector (const NDArray< T, 1 > &vec)
 
template<class T >
vnl_vector< T > itk::VariableLengthVectorToVnlVector (const VariableLengthVector< T > &vec)
 
template<class Image1Type , class Image2Type >
bool itk::VerifyImageInformation (const SmartPointer< Image1Type > &image1, const SmartPointer< Image2Type > &image2, const bool isMinimalDimension=false)
 
template<class Image1Type >
bool itk::VerifyImageInformation (const SmartPointer< Image1Type > &image1, const std::string &file2, const bool isMinimalDimension=false)
 
bool itk::VerifyImageInformation (const std::string &file1, const std::string &file2, const bool isMinimalDimension=false)
 
template<class Image1Type , class Image2Type >
bool itk::VerifyImageSize (const SmartPointer< Image1Type > &image1, const SmartPointer< Image2Type > &image2, const bool isMinimalDimension=false)
 
template<class Image1Type >
bool itk::VerifyImageSize (const SmartPointer< Image1Type > &image1, const std::string &file2, const bool isMinimalDimension=false)
 
bool itk::VerifyImageSize (const std::string &file1, const std::string &file2, const bool isMinimalDimension=false)
 
template<class VnlValueType , class PointsContainer >
void itk::VnlMatrixToPointsContainer (const vnl_matrix< VnlValueType > &matrix, PointsContainer &points)
 
template<class T >
void utl::VnlMatrixToUtlMatrix (const vnl_matrix< T > &mat, utl::NDArray< T, 2 > &matUtl)
 
template<class T , unsigned rows, unsigned cols>
void utl::VnlMatrixToUtlMatrix (const vnl_matrix_fixed< T, rows, cols > &mat, utl::NDArray< T, 2 > &matUtl)
 
template<class T >
utl::NDArray< T, 2 > utl::VnlMatrixToUtlMatrix (const vnl_matrix< T > &mat)
 
template<class T >
std::vector< T > utl::VnlVectorToStdVector (const vnl_vector< T > &vec)
 
template<class T >
utl::NDArray< T, 1 > utl::VnlVectorToUtlVector (const vnl_vector< T > &vec)
 
template<class T >
VariableLengthVector< T > itk::VnlVectorToVariableLengthVector (const vnl_vector< T > &vec)
 

Detailed Description

helper functions.

Macro Definition Documentation

#define __UTL_BOLD (   str)    str
#define __UTL_constexpr   constexpr

Definition at line 45 of file utlSTDHeaders.h.

#define __UTL_DEBUG_STRING   "Debug"

Definition at line 176 of file utlCoreMacro.h.

Referenced by smart_assert::get_typeof_level().

#define __UTL_ERROR_STRING   "Error"

Definition at line 174 of file utlCoreMacro.h.

Referenced by smart_assert::get_typeof_level().

#define __UTL_EXPSTR (   str)    str
#define __UTL_FATAL_STRING   "Fatal"

Definition at line 173 of file utlCoreMacro.h.

Referenced by smart_assert::get_typeof_level().

#define __utl_LOCATION__   __FUNCTION__

Definition at line 73 of file utlCoreMacro.h.

#define __UTL_LOG_STRING   "Log"

Definition at line 177 of file utlCoreMacro.h.

Referenced by smart_assert::get_typeof_level().

#define __UTL_Print_LOCATION   "In "<< __UTL_BOLD("File") << ": " <<__FILE__<< ", "<<__UTL_BOLD("Line")<<": " << __LINE__ << ", "<<__UTL_BOLD("Function")<<": " << __utl_LOCATION__ << "\n"

Definition at line 184 of file utlCoreMacro.h.

#define __UTL_WARNING_STRING   "Warning"

Definition at line 175 of file utlCoreMacro.h.

Referenced by smart_assert::get_typeof_level().

#define __utlConditionFailPrint (   cond)    __UTL_Print_LOCATION <<__UTL_BOLD("Expression")<<": '" << __UTL_EXPSTR(#cond) << "' failed. " << "\n"

macros which are used for debug

Author
Jian Cheng

Definition at line 345 of file utlCoreMacro.h.

#define __utlConditionSucceedPrint (   cond)    __UTL_Print_LOCATION <<__UTL_BOLD("Expression")<<": '" << __UTL_EXPSTR(#cond) << "' satisfied. " << "\n"

Definition at line 346 of file utlCoreMacro.h.

#define EXPECT_NEAR_COMPLEX (   val1,
  val2,
  eps 
)    do { EXPECT_NEAR(std::abs(val1-val2), 0.0, eps) << "val1="<<val1 <<", val2=" <<val2; } while(0)

Definition at line 25 of file utlGTest.h.

#define EXPECT_NEAR_MATRIX (   mat1,
  mat2,
  Row,
  Col,
  eps 
)
Value:
do { for ( int i = 0; i < Row; i += 1 ) \
for ( int j = 0; j < Col; j += 1 ) \
EXPECT_NEAR((mat1)(i,j), (mat2)(i,j), eps) << "index = ("<< i<<","<<j<<")"; } while (0)

Definition at line 44 of file utlGTest.h.

#define EXPECT_NEAR_MATRIX_COMPLEX (   mat1,
  mat2,
  Row,
  Col,
  eps 
)
Value:
do { for ( int i = 0; i < Row; i += 1 ) \
for ( int j = 0; j < Col; j += 1 ) \
EXPECT_NEAR(std::abs((mat1)(i,j)-(mat2)(i,j)), 0, eps) << "index = ("<< i<<","<<j<<"), mat1(i,j)=" << mat1(i,j) << ", mat2(i,j)=" << mat2(i,j); } while (0)
T abs(const T x)
template version of the fabs function

Definition at line 39 of file utlGTest.h.

#define EXPECT_NEAR_RELATIVE (   val1,
  val2,
  eps 
)    do { EXPECT_NEAR(val1,val2, eps*std::fabs(val2)); } while (0)

Definition at line 28 of file utlGTest.h.

#define EXPECT_NEAR_STDVECTOR (   vec1,
  vec2,
  eps 
)
Value:
do { EXPECT_EQ((vec1).size(), (vec2).size()); \
EXPECT_NEAR_VECTOR(vec1, vec2, (vec1).size(), eps); } while (0)

Definition at line 49 of file utlGTest.h.

#define EXPECT_NEAR_UTLMATRIX (   mat1,
  mat2,
  eps 
)
Value:
do { EXPECT_EQ((mat1).Rows(), (mat2).Rows()); \
EXPECT_EQ((mat1).Cols(), (mat2).Cols()); \
EXPECT_NEAR_MATRIX(mat1, mat2, (mat1).Rows(), (mat1).Cols(), eps); } while (0)

Definition at line 64 of file utlGTest.h.

#define EXPECT_NEAR_UTLVECTOR (   vec1,
  vec2,
  eps 
)
Value:
do { EXPECT_EQ((vec1).Size(), (vec2).Size()); \
EXPECT_NEAR_VECTOR(vec1, vec2, (vec1).Size(), eps); } while (0)

Definition at line 53 of file utlGTest.h.

#define EXPECT_NEAR_VECTOR (   vec1,
  vec2,
  N,
  eps 
)
Value:
do { for ( int i = 0; i < N; i += 1 ) \
EXPECT_NEAR((vec1)[i], (vec2)[i], eps) << "index = " << i; } while (0)

Definition at line 35 of file utlGTest.h.

#define EXPECT_NEAR_VECTOR_COMPLEX (   vec1,
  vec2,
  N,
  eps 
)
Value:
do { for ( int i = 0; i < N; i += 1 ) \
EXPECT_NEAR(std::abs((vec1)[i]-(vec2)[i]), 0, eps) << "index = " << i << ", vec1[i]="<<vec1[i] <<", vec2[i]=" <<vec2[i]; } while (0)
T abs(const T x)
template version of the fabs function

Definition at line 31 of file utlGTest.h.

#define EXPECT_NEAR_VNLMATRIX (   mat1,
  mat2,
  eps 
)
Value:
do { EXPECT_EQ((mat1).rows(), (mat2).rows()); \
EXPECT_EQ((mat1).cols(), (mat2).cols()); \
EXPECT_NEAR_MATRIX(mat1, mat2, (mat1).rows(), (mat1).cols(), eps); } while (0)

Definition at line 59 of file utlGTest.h.

#define EXPECT_NEAR_VNLVECTOR (   vec1,
  vec2,
  eps 
)    EXPECT_NEAR_STDVECTOR(vec1,vec2,eps)

Definition at line 57 of file utlGTest.h.

#define ITK_DELETE_FUNCTION   =delete
#define ITK_HAS_CXX11_RVREF

Definition at line 63 of file utlITKMacro.h.

#define ITK_HAS_CXX11_STATIC_ASSERT

Definition at line 62 of file utlITKMacro.h.

#define ITK_NOEXCEPT   noexcept

Definition at line 61 of file utlITKMacro.h.

#define ITK_NULLPTR   nullptr
#define ITK_OVERRIDE   override

Definition at line 46 of file utlITKMacro.h.

Referenced by itk::L2RegularizedLeastSquaresSolver< TPrecision >::Clearb(), itk::L1RegularizedLeastSquaresFISTASolver< TPrecision >::Clearb(), itk::SpamsWeightedLassoSolver< TPrecision >::ClearB(), itk::SpatiallyDenseSparseVectorImage< TValueType, VImageDimension, TKeyType >::GetBufferedRegion(), itk::SpatiallyDenseSparseVectorImage< TValueType, VImageDimension, TKeyType >::GetBufferPointer(), itk::SphereTessellator< TElement >::GetCellsMatrix(), itk::DWIGeneratorBase< TOutputImage, TScalarImage >::GetMSDImage(), itk::SpatiallyDenseSparseVectorImage< TValueType, VImageDimension, TKeyType >::GetNeighborhoodAccessor(), itk::L2RegularizedLeastSquaresSolver< TPrecision >::GetXDimension(), itk::IterativeSolverBase< TPrecision >::HistoryUpdateAndConvergenceCheck(), itk::MaskedImageToImageFilter< TInputImage, TOutputImage >::IsMaskUsed(), itk::ODFFromSPFImageFilter< TInputImage, TOutputImage >::ODFFromSPFImageFilter(), itk::MeshFromPeaksImageFilter< TInputImage, TOutputMesh >::PrintSelf(), itk::MultiVariableFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::PropagateRequestedRegion(), itk::FunctorFromStringImageFilter< TInputImage, TOutputImage, TMaskImage >::PropagateRequestedRegion(), itk::SpatiallyDenseSparseVectorImageFileWriter< TInputImage >::Update(), itk::CastImageFileWriter< TInputImage >::Update(), itk::CastVectorImageFileWriter< TInputImage >::Update(), itk::ScalarMapFromSPFImageFilter< TInputImage, TOutputImage >::VerifyInputParameters(), itk::MeshFromPeaksImageFilter< TInputImage, TOutputMesh >::VerifyInputParameters(), itk::MeshFromContinuousSphericalFunctionImageFilter< TInputImage, TOutputMesh >::VerifyInputParameters(), itk::AddNoiseToDWIImageFilter< TInputImage, TB0Image, TMaskImage >::~AddNoiseToDWIImageFilter(), itk::BasisMatrixGenerator< TElement >::~BasisMatrixGenerator(), itk::DiffusionModelEstimationImageFilter< TInputImage, TOutputImage >::~DiffusionModelEstimationImageFilter(), itk::DiffusionModelEstimationInSphericalCoordinateImageFilter< TInputImage, TOutputImage >::~DiffusionModelEstimationInSphericalCoordinateImageFilter(), itk::DiscreteBasisMatrixGenerator< TElement >::~DiscreteBasisMatrixGenerator(), itk::DWIReader< TPixelType, VImageDimension >::~DWIReader(), itk::DWIWriter< TPixelType, VImageDimension >::~DWIWriter(), itk::FeaturesFromSPFImageFilter< TInputImage, TOutputImage >::~FeaturesFromSPFImageFilter(), itk::Fiber< TValue >::~Fiber(), itk::FiberTracts< TValue >::~FiberTracts(), itk::FunctorFromStringImageFilter< TInputImage, TOutputImage, TMaskImage >::~FunctorFromStringImageFilter(), itk::GeneralizedHighOrderTensorImageFilter< TInputImage, TOutputImage >::~GeneralizedHighOrderTensorImageFilter(), itk::ImageToVTKImageDataFilter< TInputImage >::~ImageToVTKImageDataFilter(), itk::IterativeSolverBase< TPrecision >::~IterativeSolverBase(), itk::L1RegularizedLeastSquaresFISTASolver< TPrecision >::~L1RegularizedLeastSquaresFISTASolver(), itk::L2RegularizedLeastSquaresSolver< TPrecision >::~L2RegularizedLeastSquaresSolver(), itk::MeshFromFiberTractsFilter::~MeshFromFiberTractsFilter(), itk::MeshFromTensorImageFilter< TInputImage, TOutputMesh >::~MeshFromTensorImageFilter(), itk::MultiVariableFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::~MultiVariableFunctorVectorImageFilter(), itk::MultiVolumeImageToVectorImageFilter< TInputPixelType, TOutputPixelType, VImageDimension >::~MultiVolumeImageToVectorImageFilter(), itk::ODFFromSPFImageFilter< TInputImage, TOutputImage >::~ODFFromSPFImageFilter(), itk::ProfileFromSPFImageFilter< TInputImage, TOutputImage >::~ProfileFromSPFImageFilter(), itk::RGBImageToVTKImageDataFilter< TInputImage >::~RGBImageToVTKImageDataFilter(), itk::SamplingScheme3D< TPixelType >::~SamplingScheme3D(), itk::SamplingSchemeQSpace< TPixelType >::~SamplingSchemeQSpace(), itk::SamplingSchemeQSpace1OptEstimationFilter< TSamplingType >::~SamplingSchemeQSpace1OptEstimationFilter(), itk::SamplingSchemeQSpaceIMOCEstimationFilter< TSamplingType >::~SamplingSchemeQSpaceIMOCEstimationFilter(), itk::SamplingSchemeQSpaceIncrementalEstimationFilter< TSamplingType >::~SamplingSchemeQSpaceIncrementalEstimationFilter(), itk::SamplingSchemeQSpaceWriter< TSamplingType >::~SamplingSchemeQSpaceWriter(), itk::SlowPolyLineParametricPath< VDimension >::~SlowPolyLineParametricPath(), itk::SolverBase< TPrecision >::~SolverBase(), itk::SpamsWeightedLassoSolver< TPrecision >::~SpamsWeightedLassoSolver(), itk::SphericalPolarFourierEstimationImageFilter< TInputImage, TOutputImage >::~SphericalPolarFourierEstimationImageFilter(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::~SphericalPolarFourierImageFilter(), itk::TensorBasisMatrixGenerator< TElement >::~TensorBasisMatrixGenerator(), itk::UnaryFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::~UnaryFunctorVectorImageFilter(), itk::VectorImageChannelFilter< TInputImage, TOutputImage, TFilter >::~VectorImageChannelFilter(), itk::VectorImageToMultiVolumeImageFilter< TInputPixelType, TOutputPixelType, VImageDimension >::~VectorImageToMultiVolumeImageFilter(), and itk::VTKImageDataToImageFilter< TOutputImage >::~VTKImageDataToImageFilter().

#define itkFunctorGetMacro (   name,
  type 
)
Value:
type Get##name() const \
{ \
return this->GetFunctor().Get##name(); \
}

Definition at line 153 of file utlITKMacro.h.

#define itkFunctorSetGetMacro (   name,
  type 
)
Value:
itkFunctorSetMacro(name, type); \
itkFunctorGetMacro(name, type);
#define itkFunctorSetMacro(name, type)
Definition: utlITKMacro.h:145
#define itkFunctorGetMacro(name, type)
Definition: utlITKMacro.h:153

Definition at line 160 of file utlITKMacro.h.

#define itkFunctorSetMacro (   name,
  type 
)
Value:
void Set##name(type name) \
{ \
this->GetFunctor().Set##name(name); \
this->Modified(); \
}

Definition at line 145 of file utlITKMacro.h.

#define itkGetConstPointerMacro (   name,
  type 
)
Value:
virtual const type * Get##name () const \
{ \
return &(m_##name); \
}

Definition at line 93 of file utlITKMacro.h.

#define itkGetPointerMacro (   name,
  type 
)
Value:
virtual type * Get##name () \
{ \
return &(m_##name); \
}

Definition at line 86 of file utlITKMacro.h.

#define itkSetByConstReferenceMacro (   name,
  type 
)
Value:
virtual void Set##name (const type& _arg) \
{ \
itkDebugMacro("setting " #name " to " << _arg); \
if ( this->m_##name != _arg ) \
{ \
this->m_##name = _arg; \
this->Modified(); \
} \
}

Definition at line 122 of file utlITKMacro.h.

#define itkSetGetBooleanMacro (   name)
Value:
itkSetMacro(name,bool); \
itkGetMacro(name,bool); \
itkBooleanMacro(name);

Definition at line 139 of file utlITKMacro.h.

Referenced by itk::DWIGeneratorBase< TOutputImage, TScalarImage >::GetNumberOfRSpaceSamples().

#define itkSetGetMacro (   name,
  type 
)
Value:
itkSetMacro(name, type); \
itkGetMacro(name, type);

Definition at line 134 of file utlITKMacro.h.

#define itkSetNDebugByConstReferenceMacro (   name,
  type 
)
Value:
virtual void Set##name (const type& _arg) \
{ \
if ( this->m_##name != _arg ) \
{ \
this->m_##name = _arg; \
this->Modified(); \
} \
}

Definition at line 111 of file utlITKMacro.h.

#define itkSetNDebugMacro (   name,
  type 
)
Value:
virtual void Set##name (const type _arg) \
{ \
if ( this->m_##name != _arg ) \
{ \
this->m_##name = _arg; \
this->Modified(); \
} \
}

Definition at line 100 of file utlITKMacro.h.

#define itkSetNoConstMacro (   name,
  type 
)
Value:
virtual void Set##name (type _arg) \
{ \
itkDebugMacro("setting " #name " to " << _arg); \
if ( this->m_##name != _arg ) \
{ \
this->m_##name = _arg; \
this->Modified(); \
} \
}

Definition at line 74 of file utlITKMacro.h.

#define itkShowPositionThreadedLogger (   cond)
Value:
do \
{ \
if ((cond)) \
{ \
if (this->m_ThreadID>=0 && this->GetDebug() && this->GetNumberOfThreads()>1) \
{ \
std::string __threadIDStr = this->ThreadIDToString(); \
std::ostringstream __msg; \
__msg << "\n" << __threadIDStr << "Work Flow Position: In File: " <<__FILE__<< ", Line: " << __LINE__ << "\n" \
<< __threadIDStr << "Function: " << __utl_LOCATION__ << "\n" << std::flush; \
this->WriteLogger(__msg.str()); \
} \
utlOSShowPosition(cond, std::cout); \
} \
} while(0)
#define __utl_LOCATION__
Definition: utlCoreMacro.h:73
#define utlOSShowPosition(cond, os)
Definition: utlCoreMacro.h:553

Show Position when debug and muti-thread are used. It is only used for filters derived from MaskedImageToImageFilter

Definition at line 192 of file utlITKMacro.h.

Referenced by itk::MultiVariableFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::BeforeThreadedGenerateData(), itk::UnaryFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::BeforeThreadedGenerateData(), itk::FunctorFromStringImageFilter< TInputImage, TOutputImage, TMaskImage >::BeforeThreadedGenerateData(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), itk::SphericalPolarFourierEstimationImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ComputeBasisMatrix(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ComputeBasisMatrixForB0(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ComputeRadialMatrix(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ComputeRadialVectorForE0InBasis(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ComputeRadialVectorForE0InDWI(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ComputeRegularizationWeight(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ComputeScale(), itk::DiffusionModelEstimationInSphericalCoordinateImageFilter< TInputImage, TOutputImage >::ComputeSHMatrix(), itk::MultiVariableFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::GenerateOutputInformation(), itk::FunctorFromStringImageFilter< TInputImage, TOutputImage, TMaskImage >::GenerateOutputInformation(), itk::SphericalPolarFourierEstimationImageFilter< TInputImage, TOutputImage >::GenerateOutputInformation(), itk::DiffusionModelEstimationImageFilter< TInputImage, TOutputImage >::InternalClone(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::InternalClone(), itk::DiffusionModelEstimationInSphericalCoordinateImageFilter< TInputImage, TOutputImage >::InternalClone(), itk::SphericalPolarFourierEstimationImageFilter< TInputImage, TOutputImage >::InternalClone(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::SetBasisScale(), itk::SphericalPolarFourierEstimationImageFilter< TInputImage, TOutputImage >::SetBasisScale(), itk::MultiVariableFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::ThreadedGenerateData(), itk::FunctorFromStringImageFilter< TInputImage, TOutputImage, TMaskImage >::ThreadedGenerateData(), itk::UnaryFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::ThreadedGenerateData(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ThreadedGenerateData(), itk::DiffusionModelEstimationImageFilter< TInputImage, TOutputImage >::VerifyInputParameters(), itk::DiffusionModelEstimationInSphericalCoordinateImageFilter< TInputImage, TOutputImage >::VerifyInputParameters(), and itk::SphericalPolarFourierEstimationImageFilter< TInputImage, TOutputImage >::VerifyInputParameters().

#define itkThreadedLogger (   cond,
  msgStr 
)
Value:
do \
{ \
if ((cond)) \
{ \
std::ostringstream __msg; \
__msg << (msgStr) << std::endl << std::flush; \
this->WriteLogger(__msg.str()); \
} \
} while ( 0 )

Definition at line 211 of file utlITKMacro.h.

#define itkTypedefMaskedImageToImageMacro (   Superclass)
Value:
typedef typename Superclass::InputImageType InputImageType; \
typedef typename Superclass::InputImagePointer InputImagePointer; \
typedef typename Superclass::InputImageConstPointer InputImageConstPointer; \
typedef typename Superclass::InputImageIndexType InputImageIndexType; \
typedef typename Superclass::InputImageSizeType InputImageSizeType; \
typedef typename Superclass::InputImageSpacingType InputImageSpacingType; \
typedef typename Superclass::InputImagePixelType InputImagePixelType; \
typedef typename Superclass::InputImageRegionType InputImageRegionType; \
\
typedef typename Superclass::OutputImageType OutputImageType; \
typedef typename Superclass::OutputImagePointer OutputImagePointer; \
typedef typename Superclass::OutputImageIndexType OutputImageIndexType; \
typedef typename Superclass::OutputImageSizeType OutputImageSizeType; \
typedef typename Superclass::OutputImageSpacingType OutputImageSpacingType; \
typedef typename Superclass::OutputImagePixelType OutputImagePixelType; \
typedef typename Superclass::OutputImageRegionType OutputImageRegionType; \
\
typedef typename Superclass::MaskImageType MaskImageType; \
typedef typename MaskImageType::Pointer MaskImagePointer; \
\
typedef typename itk::Image<double,3> ScalarImageType; \
typedef typename ScalarImageType::Pointer ScalarImagePointer;

Definition at line 165 of file utlITKMacro.h.

#define itkVectorImageFilterComposeMacro (   VectorImageType,
  ScalarImageFilterType,
  scalarImageFilter,
  input,
  output 
)
Value:
do { \
typename FilterType::Pointer filter = FilterType::New(); \
utlException(std::string(input->GetNameOfClass())!="VectorImage", "input should be VectorImage"); \
filter->SetInput(input); \
filter->SetFilter(scalarImageFilter); \
filter->Update(); \
output = filter->GetOutput(); \
} while(0) \
TInputImage and TOutputImage are VectorImage, TFilter is an image filter which works for itk::Image...
#define utlException(cond, expout)
Definition: utlCoreMacro.h:548

It should be used with itk::VectorImageChannelFilter to perform scalarImageFilter in each channel of a VectorImage, then compose it back to output (a VectorImage).

Definition at line 225 of file utlITKMacro.h.

#define M_EPS   1e-9
#define M_PI   3.14159265358979323846264338328

Definition at line 57 of file utlCoreMacro.h.

Referenced by itk::ScalarMapFromSPFImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), utl::BesselJa(), itk::SamplingScheme3D< TPixelType >::CalculateMinDistance(), itk::SamplingScheme3D< TPixelType >::CalculateMinDistanceInShell(), itk::SamplingScheme3D< TPixelType >::CalculateMinDistanceUpperBound(), itk::SphericalHarmonicsGenerator< PreciseType >::ComplexTripleIntegration(), itk::CylinderModelGenerator< PreciseType >::ComputeDWISamples(), utl::ComputeDWISHCoefficientsForGPDCylinder(), utl::ComputeOrientationalOrderFromSHCoefficients(), itk::GeneralizedHighOrderTensorImageFilter< TInputImage, TOutputImage >::ComputeRadialMatrix(), itk::GeneralizedHighOrderTensorImageFilter< TInputImage, TOutputImage >::ComputeScale(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ComputeScale(), itk::FeaturesFromSPFImageFilter< TInputImage, TOutputImage >::ComputeScale(), itk::SamplingSchemeQSpace< TPixelType >::ConvertBVectorToQVector(), itk::SamplingSchemeQSpace< TPixelType >::ConvertQVectorToBVector(), itk::SphericalPolarFourierRadialGenerator< PreciseType >::Evaluate(), utl::GaussRand(), itk::DiffusionTensor< TPrecision >::GetEAPSamples(), utl::GetMinAngle(), itk::SphericalPolarFourierRadialGenerator< PreciseType >::GetNormalizeFacotr(), itk::DiffusionTensor< TPrecision >::GetODFSamples(), itk::DiffusionTensor< TPrecision >::GetReturnToOrigin(), utl::GetSymmetricTensorSHCoef(), utl::GetSymmetricTensorSHCoefDerivative(), main(), itk::MeshFromSHCoefficientsImageFilter< TInputImage, TOutputMesh >::NormalizeUnitIntegral(), itk::MeshFromSphericalFunctionTessellatedSamplesImageFilter< TInputImage, TOutputMesh >::NormalizeUnitIntegral(), itk::Functor::MeanDiffusivityFromGHOTCoefficients< TInput, TOutput >::operator()(), itk::Functor::ODFNormlizeFunctor< TInput, TOutput >::operator()(), itk::Functor::SPFScaleFromMeanDiffusivity< TInput, TOutput >::operator()(), processOrientation(), utl::RandomPointInSphere(), utl::ReadGrad(), and itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ThreadedGenerateData().

#define ONE_OVER_4_PI_2   0.025330295910584442860969865802431910
#define PrintEnum1 (   cond,
  var,
  val1,
  os 
)
Value:
do \
{ if ((cond) && ((var)==(val1))) \
{ os << #var <<" = " << #val1 << std::endl << std::flush; } \
} while(0)

Definition at line 400 of file utlCoreMacro.h.

#define PrintEnum2 (   cond,
  var,
  val1,
  val2,
  os 
)
Value:
do \
{ PrintEnum1(cond,var,val1,os); \
if ((cond) && ((var)==(val2))) \
{ os << #var <<" = " << #val2 << std::endl << std::flush; } \
} while(0)
#define PrintEnum1(cond, var, val1, os)
Definition: utlCoreMacro.h:400

Definition at line 407 of file utlCoreMacro.h.

#define PrintEnum3 (   cond,
  var,
  val1,
  val2,
  val3,
  os 
)
Value:
do \
{ PrintEnum2(cond,var,val1,val2,os); \
if ((cond) && ((var)==(val3))) \
{ os << #var <<" = " << #val3 << std::endl << std::flush; } \
} while(0)
#define PrintEnum2(cond, var, val1, val2, os)
Definition: utlCoreMacro.h:407

Definition at line 415 of file utlCoreMacro.h.

Referenced by itk::BasisMatrixGenerator< TElement >::PrintSelf().

#define PrintEnum4 (   cond,
  var,
  val1,
  val2,
  val3,
  val4,
  os 
)
Value:
do \
{ PrintEnum3(cond,var,val1,val2,val3,os); \
if ((cond) && ((var)==(val4))) \
{ os << #var <<" = " << #val4 << std::endl << std::flush; } \
} while(0)
#define PrintEnum3(cond, var, val1, val2, val3, os)
Definition: utlCoreMacro.h:415

Definition at line 423 of file utlCoreMacro.h.

Referenced by itk::MeshFromSphericalFunctionImageFilter< TInputImage, TOutputMesh >::PrintSelf().

#define PrintEnum5 (   cond,
  var,
  val1,
  val2,
  val3,
  val4,
  val5,
  os 
)
Value:
do \
{ PrintEnum4(cond,var,val1,val2,val3,val4,os); \
if ((cond) && ((var)==(val5))) \
{ os << #var <<" = " << #val5 << std::endl << std::flush; } \
} while(0)
#define PrintEnum4(cond, var, val1, val2, val3, val4, os)
Definition: utlCoreMacro.h:423

Definition at line 431 of file utlCoreMacro.h.

#define PrintEnum6 (   cond,
  var,
  val1,
  val2,
  val3,
  val4,
  val5,
  val6,
  os 
)
Value:
do \
{ PrintEnum5(cond,var,val1,val2,val3,val4,val5,os); \
if ((cond) && ((var)==(val6))) \
{ os << #var <<" = " << #val6 << std::endl << std::flush; } \
} while(0)
#define PrintEnum5(cond, var, val1, val2, val3, val4, val5, os)
Definition: utlCoreMacro.h:431

Definition at line 439 of file utlCoreMacro.h.

#define PrintVar (   cond,
  os,
  ... 
)
Value:
do \
{ if ((cond)) \
{ \
if (utlNumberOfArgs(__VA_ARGS__)>1) \
{ os << "(" << #__VA_ARGS__ << ") = "; utl::PrintOS(os, __VA_ARGS__); } \
else \
{ os << #__VA_ARGS__ << " = "; utl::PrintOS(os, __VA_ARGS__); } \
} \
} while(0)
void PrintOS(std::ostream &os, Args...args)
Definition: utlCore11.h:78
#define utlNumberOfArgs(...)
Definition: utlCoreMacro.h:238

Conditional print variable number of arguments to os

Definition at line 242 of file utlCoreMacro.h.

Referenced by itk::FiberTractsWriter::PrintSelf(), itk::FiberTractsReader::PrintSelf(), itk::Fiber< TValue >::PrintSelf(), itk::MeshFromPeaksImageFilter< TInputImage, TOutputMesh >::PrintSelf(), itk::MeshFromFiberTractsFilter::PrintSelf(), itk::MeshFromSphericalFunctionImageFilter< TInputImage, TOutputMesh >::PrintSelf(), itk::SHCoefficientsRotation< T >::PrintSelf(), and itk::MeshFromImageImageFilter< TInputImage, TOutputMesh >::PrintSelf().

#define PrintVar1 (   cond,
  var,
  os 
)
#define PrintVar2 (   cond,
  var1,
  var2,
  os 
)
#define PrintVar3 (   cond,
  var1,
  var2,
  var3,
  os 
)
Value:
do \
{ if ((cond)) \
{ os << std::boolalpha << "("<<#var1<<", "<<#var2<<", "<<#var3<<") = (" \
<< (var1) << ", " << (var2) << ", " << (var3) << ")" << std::endl << std::flush << std::noboolalpha; } \
} while(0)

Definition at line 462 of file utlCoreMacro.h.

Referenced by itk::TensorBasisMatrixGenerator< TElement >::PrintSelf(), itk::CylinderModelGenerator< PreciseType >::PrintSelf(), itk::SpamsWeightedLassoSolver< TPrecision >::PrintSelf(), itk::DWIReader< TPixelType, VImageDimension >::PrintSelf(), and itk::SamplingScheme3D< TPixelType >::PrintSelf().

#define PrintVar4 (   cond,
  var1,
  var2,
  var3,
  var4,
  os 
)
Value:
do \
{ if ((cond)) \
{ os << std::boolalpha << "("<<#var1<<", "<<#var2<<", "<<#var3<<", "<<#var4<<") = (" \
<< (var1) << ", " << (var2) << ", " << (var3) << ", " << (var4) << ")" << std::endl << std::flush << std::noboolalpha; } \
} while(0)

Definition at line 470 of file utlCoreMacro.h.

Referenced by itk::IterativeSolverBase< TPrecision >::PrintSelf(), itk::UnaryFunctorLookUpTable< TFunctor >::PrintSelf(), itk::DWIWriter< TPixelType, VImageDimension >::PrintSelf(), and itk::SphericalPolarFourierEstimationImageFilter< TInputImage, TOutputImage >::PrintSelf().

#define PrintVar5 (   cond,
  var1,
  var2,
  var3,
  var4,
  var5,
  os 
)
Value:
do \
{ if ((cond)) \
{ os << std::boolalpha << "("<<#var1<<", "<<#var2<<", "<<#var3<<", "<<#var4<<", "<<#var5<<") = (" \
<< (var1) << ", " << (var2) << ", " << (var3) << ", " << (var4) << ", " << (var5) <<")" \
<< std::endl << std::flush << std::noboolalpha; } \
} while(0)

Definition at line 478 of file utlCoreMacro.h.

#define PrintVar6 (   cond,
  var1,
  var2,
  var3,
  var4,
  var5,
  var6,
  os 
)
Value:
do \
{ if ((cond)) \
{ os << std::boolalpha << "("<<#var1<<", "<<#var2<<", "<<#var3<<", "<<#var4<<", "<<#var5<<", "<<#var6<<") = (" \
<< (var1) << ", " << (var2) << ", " << (var3) << ", " << (var4) << ", " << (var5) <<", " << (var6) <<")" \
<< std::endl << std::flush << std::noboolalpha; } \
} while(0)

Definition at line 487 of file utlCoreMacro.h.

#define UTL_ALWAYS_INLINE   inline __attribute__((always_inline))
#define UTL_COMMA   ,

Definition at line 50 of file utlCoreMacro.h.

#define utl_hash   std::hash

Definition at line 51 of file utlSTDHeaders.h.

#define utl_help (   str)    utl::utlOption((char*)NULL,(unsigned int)argc,(char**)argv,str,(char*)NULL)
1 utl_help("bla bla ...");

Definition at line 49 of file utlCommandLineParser.h.

#define utl_option (   name,
  defaut,
  usage 
)    utl::utlOption((char*)name,(unsigned int)argc,(char**)argv,defaut,(char*)usage)
1 double p1 = utl_option("-i1", 2.0, "bla bla...");
2 int p2 = utl_option("-i2", 3, "bla bla...");
3 std::string p3 = utl_option("-i3", "default", "bla bla...");
4 bool p4 = utl_option("-i4", false, "bla bla...");

Definition at line 58 of file utlCommandLineParser.h.

#define UTL_OS   0

Definition at line 43 of file utlCoreMacro.h.

#define utl_shared_ptr   std::shared_ptr

Definition at line 48 of file utlSTDHeaders.h.

#define utl_showdoc (   argu)    if (utl_option(argu,(const char *)NULL,0)) return 0;
1 utl_showdoc("-h");
2 utl_showdoc("--help");

Definition at line 65 of file utlCommandLineParser.h.

#define utl_unordered_map   std::unordered_map

Definition at line 50 of file utlSTDHeaders.h.

#define utl_usage (   usage)    utl::utlOption((char*)NULL,(unsigned int)argc,(char**)argv,(char*)NULL,(char*)usage)

small but powerful CMD parser, borrowed from CImg, http://cimg.sourceforge.net/

1 utl_usage("bla bla ...");

Definition at line 43 of file utlCommandLineParser.h.

#define utlAbort (   expout)    do { std::cerr << expout <<"\n" << std::flush; abort(); } while(0)

macros which are used for debug with or without matlab mex files

Author
Jian Cheng

Definition at line 338 of file utlCoreMacro.h.

#define utlArraySize (   array)    (sizeof(__utlArraySizeHelper(array)))

Definition at line 324 of file utlCoreMacro.h.

#define utlAssert (   cond,
  expout 
)
#define utlDebug (   cond,
  expout 
)

Definition at line 549 of file utlCoreMacro.h.

#define utlException (   cond,
  expout 
)

Definition at line 548 of file utlCoreMacro.h.

Referenced by itk::SamplingScheme3D< TPixelType >::AppendOrientation(), itk::FunctorFromStringImageFilter< TInputImage, TOutputImage, TMaskImage >::BeforeThreadedGenerateData(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), utl::BesselJa(), utl::Binomial(), callFunction(), utl::ComplexCombine(), itk::SphericalHarmonicsGenerator< PreciseType >::ComplexTripleIntegration(), itk::GeneralizedHighOrderTensorImageFilter< TInputImage, TOutputImage >::ComputeBasisMatrix(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ComputeBasisMatrix(), utl::ComputeNDArrayIndex(), utl::ComputeNDArrayOffset(), utl::ComputeOffsetTable(), utl::ComputeOrientationalOrderFromSHCoefficients(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ComputeRegularizationWeight(), utl::ComputeSHMatrix(), itk::ODFFromSPFImageFilter< TInputImage, TOutputImage >::ComputeSPFToFeatureTransform(), itk::ProfileFromSPFImageFilter< TInputImage, TOutputImage >::ComputeSPFToFeatureTransform(), utl::ConnectUtlMatrix(), utl::ConnectVnlMatrix(), utl::Convert1To2Tensor(), utl::Convert2To1Tensor(), utl::Convert2To4Tensor(), utl::Convert4To2Tensor(), utl::ConvertStringToNumber(), utl::ConvertTensor6DTo9D(), utl::ConvertTensor9DTo6D(), itk::MaskedImageToImageFilter< TInputImage, TOutputImage, TMaskImage >::CreateLoggerVector(), utl::NDArray< T, 2 >::Determinant(), itk::GeneralizedHighOrderTensorImageFilter< TInputImage, TOutputImage >::DimToRank(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::DimToRank(), utl::NDArray< T, 4 >::EigenDecompositionWithMinorSymmetry(), itk::SphericalPolarFourierRadialGenerator< PreciseType >::Evaluate(), itk::SpamsWeightedLassoSolver< TPrecision >::EvaluateCostFunctionInColumn(), utl::Factorial(), utl::Gamma(), itk::SamplingSchemeQSpaceIncrementalEstimationFilter< TSamplingType >::GenerateData(), itk::VectorImageChannelFilter< TInputImage, TOutputImage, TFilter >::GenerateData(), itk::AddNoiseToDWIImageFilter< TInputImage, TB0Image, TMaskImage >::GenerateData(), itk::DWIGenerator< TOutputImage, TScalarImage >::GenerateData(), itk::MultiVariableFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::GenerateOutputInformation(), itk::UnaryFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::GenerateOutputInformation(), utl::gesdd_UtlMatrix(), utl::gesdd_VnlMatrix(), utl::gesvd_UtlMatrix(), utl::gesvd_VnlMatrix(), utl::GetCoefLaguerre(), utl::GetColumnsVnlMatrix(), utl::GetDTIDesignMatrix(), utl::GetEqualityConstraintProjection(), utl::GradientTable< T >::GetGrad(), itk::GetImageType(), itk::GetITKImageFromMXArray(), itk::GetITKVectorImageFromMXArray(), utl::GetMinAngle(), itk::GetMXArrayFromITKImage(), itk::GetMXArrayFromITKVectorImage(), utl::GetMXArrayFromSTDVector(), itk::SphericalPolarFourierRadialGenerator< PreciseType >::GetNormalizeFacotr(), itk::SamplingScheme3D< TPixelType >::GetOrientationsCartesianInShell(), itk::SamplingScheme3D< TPixelType >::GetOrientationsSphericalInShell(), itk::PeakContainerHelper::GetPeak(), itk::PeakContainerHelper::GetPeakValue(), utl::NDArray< T, 1 >::GetRotateAxis(), utl::GetRowsVnlMatrix(), utl::GetSTDVectorFromMXArray(), utl::GetSymmetricTensorSHCoef(), utl::GetSymmetricTensorSHCoefDerivative(), utl::GetUtlVectorFromMXArray(), itk::GetVectorImage3DVolumeSize(), utl::GetVnlSymmericMatrixPInverse(), utl::GetVNLVectorFromMXArray(), itk::L2RegularizedLeastSquaresSolver< TPrecision >::GetXDimension(), itk::L1RegularizedLeastSquaresFISTASolver< TPrecision >::GetXDimension(), itk::SpamsWeightedLassoSolver< TPrecision >::GetXDimension(), itk::SpamsWeightedLassoSolver< TPrecision >::GetXNumber(), itk::SolverBase< TPrecision >::Initialize(), itk::L1RegularizedLeastSquaresFISTASolver< TPrecision >::Initialize(), utl::InverseMatrix(), utl::NDArray< T, 4 >::IsMajorSymmetric(), utl::NDArray< T, 4 >::IsMinorSymmetric(), itk::SamplingSchemeQSpaceIMOCEstimationFilter< TSamplingType >::IsSatisfiedSeparationAngles(), itk::DiffusionTensor< TPrecision >::Log(), main(), utl::NDArray< T, 4 >::MajorSymmetrize(), utl::MatchBVectorAndGradientMatrix(), utl::MatrixCopy(), utl::MeanDirector(), utl::NDArray< T, 4 >::MinorSymmetrize(), utl::Functor::VectorMultiVariableFunctionWrapper<>::operator()(), utl::Functor::DotProduct< TVector, TOutput >::operator()(), utl::NDArrayBase< T, 4 >::operator-=(), itk::DiffusionTensor< TPrecision >::Pow(), utl::PowHalfInteger(), itk::SphericalPolarFourierGenerator< PreciseType >::PrintSelf(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::RankToDim(), utl::ReadMatrix(), utl::ReadVector(), utl::ReadVector< std::string >(), itk::SphericalHarmonicsGenerator< PreciseType >::RealTripleIntegration(), utl::RotationMatrixFromVectors(), utl::RotationMatrixToAxisAngle(), utl::Save2DVector(), utl::SaveMatrix(), utl::SaveVector(), itk::L1RegularizedLeastSquaresFISTASolver< TPrecision >::SetA(), utl::Functor::Shred< TVector, TOutput >::SetArguments(), itk::L1RegularizedLeastSquaresFISTASolver< TPrecision >::Setb(), utl::SetColumnsVnlMatrix(), utl::NDArrayBase< T, 4 >::SetData(), itk::PeakContainerHelper::SetPeak(), itk::PeakContainerHelper::SetPeakValue(), utl::SetRowsVnlMatrix(), utl::SetValuesVnlVector(), itk::SetVectorImage3DVolumeSize(), itk::L1RegularizedLeastSquaresFISTASolver< TPrecision >::SetwForInitialization(), utl::syev_UtlMatrix(), utl::syev_VnlMatrix(), utl::syevd_UtlMatrix(), utl::syevd_VnlMatrix(), utl::NDArray< T, 2 >::Symmetrize(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ThreadedGenerateData(), itk::L1RegularizedLeastSquaresFISTASolver< TPrecision >::VerifyInputs(), itk::SpamsWeightedLassoSolver< TPrecision >::VerifyInputs(), and itk::DWIWriter< TPixelType, VImageDimension >::WriteToConfigurationFile().

#define utlGetMacro (   name,
  type 
)
Value:
virtual type Get##name () const \
{ \
return this->m_##name; \
}

Definition at line 582 of file utlCoreMacro.h.

Referenced by itk::Functor::SHCoefficientsFit< T >::operator=().

#define utlGlobalAssert (   cond,
  expout 
)
Value:
do \
{ \
if (!(cond)) \
{ std::cerr << "\n"<<__UTL_ERROR_STRING<<": " << __utlConditionFailPrint(cond) << __UTL_BOLD("msg")<<": '"<<expout << "\n" << std::flush; \
utlAbort(""); } \
} while (0)
#define __UTL_ERROR_STRING
Definition: utlCoreMacro.h:174
#define __utlConditionFailPrint(cond)
macros which are used for debug
Definition: utlCoreMacro.h:345
#define __UTL_BOLD(str)
Definition: utlCoreMacro.h:178

Definition at line 381 of file utlCoreMacro.h.

Referenced by utl::DimToRankSH(), and utl::ReadLines().

#define utlGlobalException (   cond,
  expout 
)
Value:
do \
{ \
if ((cond)) \
{ std::cerr << "\n"<<__UTL_ERROR_STRING<<": " << __utlConditionSucceedPrint(cond) << __UTL_BOLD("msg")<<": '"<<expout << "'\n" << std::flush; \
utlAbort(""); } \
} while (0)
#define __utlConditionSucceedPrint(cond)
Definition: utlCoreMacro.h:346
#define __UTL_ERROR_STRING
Definition: utlCoreMacro.h:174
#define __UTL_BOLD(str)
Definition: utlCoreMacro.h:178

Definition at line 372 of file utlCoreMacro.h.

Referenced by itk::FiberTracts< TValue >::AppendFibers(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), itk::MeshFromContinuousSphericalFunctionImageFilter< TInputImage, TOutputMesh >::BeforeThreadedGenerateData(), itk::SphericalPolarFourierEstimationImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), itk::SHCoefficientsPowerImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), BinaryOPImage(), itk::UnaryFunctorLookUpTable< TFunctor >::BuildTable(), itk::SamplingScheme3D< TPixelType >::CalculateMaxDot(), itk::SamplingScheme3D< TPixelType >::CalculateMaxDotInShell(), callFunction(), itk::MeshFromSHCoefficientsImageFilter< TInputImage, TOutputMesh >::ComputeBasisMatrix(), itk::MeshFromSphericalFunctionTessellatedSamplesImageFilter< TInputImage, TOutputMesh >::ComputeBasisMatrix(), itk::MeshFromDiscreteFiberODFImageFilter< TInputImage, TOutputMesh >::ComputeBasisMatrix(), itk::CylinderModelGenerator< PreciseType >::ComputeDWISamples(), itk::CylinderModelGenerator< PreciseType >::ComputeEAPSamples(), itk::CylinderModelGenerator< PreciseType >::ComputeODFSamples(), itk::GeneralizedHighOrderTensorImageFilter< TInputImage, TOutputImage >::ComputeRadialMatrix(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ComputeRadialMatrix(), itk::GeneralizedHighOrderTensorImageFilter< TInputImage, TOutputImage >::ComputeScale(), utl::ComputeSHMatrix(), itk::SamplingSchemeQSpace< TPixelType >::CorrectBValues(), itk::DWIReader< TPixelType, VImageDimension >::CorrectDWI(), itk::SamplingSchemeQSpace< TPixelType >::CorrectRadiusValues(), itk::SamplingScheme3D< TPixelType >::CorrectRadiusValues(), utl::geev< std::complex< double > >(), utl::geev< std::complex< float > >(), itk::SamplingSchemeQSpaceIncrementalEstimationFilter< TSamplingType >::GenerateData(), itk::SamplingSchemeQSpaceIMOCEstimationFilter< TSamplingType >::GenerateData(), itk::DWIGenerator< TOutputImage, TScalarImage >::GenerateData(), itk::DWISingleVoxelGenerator< TOutputImage, TScalarImage >::GenerateData(), itk::DWIWriter< TPixelType, VImageDimension >::GenerateData(), itk::DWIReader< TPixelType, VImageDimension >::GenerateData(), itk::ProfileFromSPFImageFilter< TInputImage, TOutputImage >::GenerateOutputInformation(), itk::SHCoefficientsPowerImageFilter< TInputImage, TOutputImage >::GenerateOutputInformation(), utl::gesdd_UtlMatrix(), utl::gesdd_VnlMatrix(), utl::gesvd_UtlMatrix(), utl::gesvd_VnlMatrix(), itk::PeakContainerHelper::GetDimension(), itk::PeakContainerHelper::GetDimensionPerPeak(), utl::GetFiberTractsFormat(), itk::UnaryFunctorLookUpTable< TFunctor >::GetFunctionValue(), GetImageFiles(), GetNumberFromAxis(), itk::PeakContainerHelper::GetNumberOfPeaks(), itk::SamplingScheme3D< TPixelType >::GetOrientationsCartesian(), itk::SamplingScheme3D< TPixelType >::GetOrientationsCartesianInShell(), itk::SamplingScheme3D< TPixelType >::GetOrientationsSpherical(), itk::SamplingScheme3D< TPixelType >::GetOrientationsSphericalInShell(), itk::PeakContainerHelper::GetPeakType(), itk::MeshFromTensorImageFilter< TInputImage, TOutputMesh >::GetScalarCodeFromTensor(), itk::PeakContainerHelper::GetString(), itk::GetVectorImage3DVolumeSize(), itk::GetVectorImageFullSize(), itk::GetVectorImageVectorSize(), itk::SamplingScheme3D< TPixelType >::GroupRadiusValues(), ImageMath(), itk::ImageToImage(), itk::SamplingSchemeQSpace1OptEstimationFilter< TSamplingType >::Initialization(), itk::SamplingSchemeQSpaceIncrementalEstimationFilter< TSamplingType >::Initialization(), itk::DWIGeneratorBase< TOutputImage, TScalarImage >::Initialization(), itk::DiffusionTensor< TPrecision >::Inv(), utl::InverseSymmericMatrix(), utl::InverseSymmericVnlMatrix(), main(), mexFunction(), itk::DWIReader< TPixelType, VImageDimension >::NormalizeDWI(), PrintImage(), itk::PrintImage(), itk::PrintImage3D(), itk::PrintImage4D(), itk::DWIReader< TPixelType, VImageDimension >::ReadFromConfigurationFile(), utl::ReadGrad(), utl::ReadMatFileToMatrix(), utl::ReadMatFileToVNLMatrix(), itk::SamplingScheme3D< TPixelType >::ReadOrientationFileList(), itk::ReadTrackVisHeader(), itk::FiberTractsReader::ReadTractsTCK(), itk::FiberTractsReader::ReadTractsVTK(), itk::ReadVectorImage(), itk::SamplingSchemeQSpace< TPixelType >::RemoveSamplesNotIndexed(), itk::SamplingScheme3D< TPixelType >::RemoveSamplesNotIndexed(), utl::SaveMatrixToMatFile(), itk::MeshFromTensorImageFilter< TInputImage, TOutputMesh >::SetGlyphShape(), SetOperationWithChecking(), itk::SetVectorImageFullSize(), itk::SetVectorImageVectorSize(), itk::SpamsWeightedLassoSolver< TPrecision >::Solve(), utl::syev_UtlMatrix(), utl::syev_VnlMatrix(), utl::syevd< std::complex< double > >(), utl::syevd< std::complex< float > >(), utl::syevd_UtlMatrix(), utl::syevd_VnlMatrix(), itk::FiberTractsReader::Update(), itk::FiberTractsWriter::Update(), itk::SamplingSchemeQSpaceWriter< TSamplingType >::Update(), itk::MeshFromFiberTractsFilter::Update(), utl::UtlMatrixToPointsContainer(), itk::GeneralizedHighOrderTensorImageFilter< TInputImage, TOutputImage >::VerifyInputParameters(), itk::ODFFromSPFImageFilter< TInputImage, TOutputImage >::VerifyInputParameters(), itk::ProfileFromSPFImageFilter< TInputImage, TOutputImage >::VerifyInputParameters(), itk::TensorBasisMatrixGenerator< TElement >::VerifyInputParameters(), itk::DiscreteBasisMatrixGenerator< TElement >::VerifyInputParameters(), itk::DiffusionModelGenerator< PreciseType >::VerifyInputParameters(), itk::Functor::SHCoefficientsFit< T >::VerifyInputParameters(), itk::DiffusionModelEstimationImageFilter< TInputImage, TOutputImage >::VerifyInputParameters(), itk::DiffusionModelEstimationInSphericalCoordinateImageFilter< TInputImage, TOutputImage >::VerifyInputParameters(), itk::FeaturesFromSPFImageFilter< TInputImage, TOutputImage >::VerifyInputParameters(), itk::BasisMatrixGenerator< TElement >::VerifyInputParameters(), itk::SphericalPolarFourierEstimationImageFilter< TInputImage, TOutputImage >::VerifyInputParameters(), itk::L2RegularizedLeastSquaresSolver< TPrecision >::VerifyInputs(), itk::MaskedImageToImageFilter< TInputImage, TOutputImage, TMaskImage >::VerifyMaskInformation(), itk::VnlMatrixToPointsContainer(), itk::WriteTrackVisHeader(), and itk::FiberTractsWriter::WriteTractsTCK().

#define utlGlobalWarning (   cond,
  expout 
)    utlOSGlobalWarning(cond,expout,std::cout)

Definition at line 397 of file utlCoreMacro.h.

#define utlLog (   expr)    utlVLogOS_IF(true, 0, std::cout << expr)

Definition at line 269 of file utlCoreMacro.h.

#define utlLog_IF (   cond,
  expr 
)    utlVLogOS_IF(cond, 0, std::cout << expr)

Definition at line 268 of file utlCoreMacro.h.

#define utlLogOS (   os)    utlVLogOS_IF(true, 0, os)

Definition at line 267 of file utlCoreMacro.h.

#define utlLogOS_IF (   cond,
  os 
)    utlVLogOS_IF(cond, 0, os)

Definition at line 266 of file utlCoreMacro.h.

#define utlLogOSVar (   os,
  ... 
)    utlVLogOSVar_IF(true, 0, os, __VA_ARGS__)
#define utlLogOSVar_IF (   cond,
  os,
  ... 
)    utlVLogOSVar_IF(cond, 0, os, __VA_ARGS__)

Definition at line 284 of file utlCoreMacro.h.

#define utlLogVar (   ...)    utlVLogOSVar_IF(true, 0, std::cout, __VA_ARGS__)

Definition at line 287 of file utlCoreMacro.h.

#define utlLogVar_IF (   cond,
  ... 
)    utlVLogOSVar_IF(cond, 0, std::cout, __VA_ARGS__)

Definition at line 286 of file utlCoreMacro.h.

#define utlNumberOfArgs (   ...)    utl::GetNumberOfArgs(__VA_ARGS__)

Definition at line 238 of file utlCoreMacro.h.

#define utlOSGlobalWarning (   cond,
  expout,
  os 
)
Value:
do \
{ if ((cond)) \
{ os << "\n"<<__UTL_WARNING_STRING<<": "<< __utlConditionSucceedPrint(cond) << __UTL_BOLD("msg")<<": '"<<expout << "\n" << std::flush; } \
} while(0)
#define __utlConditionSucceedPrint(cond)
Definition: utlCoreMacro.h:346
#define __UTL_WARNING_STRING
Definition: utlCoreMacro.h:175
#define __UTL_BOLD(str)
Definition: utlCoreMacro.h:178

Definition at line 390 of file utlCoreMacro.h.

#define utlOSPrintVar (   cond,
  os,
  ... 
)

Definition at line 308 of file utlCoreMacro.h.

#define utlOSPrintVar1 (   cond,
  var 
)

Definition at line 563 of file utlCoreMacro.h.

#define utlOSPrintVar2 (   cond,
  var1,
  var2 
)

Definition at line 564 of file utlCoreMacro.h.

#define utlOSPrintVar3 (   cond,
  var1,
  var2,
  var3 
)

Definition at line 565 of file utlCoreMacro.h.

#define utlOSPrintVar4 (   cond,
  var1,
  var2,
  var3,
  var4 
)

Definition at line 566 of file utlCoreMacro.h.

#define utlOSPrintVar5 (   cond,
  var1,
  var2,
  var3,
  var4,
  var5 
)

Definition at line 567 of file utlCoreMacro.h.

#define utlOSPrintVar6 (   cond,
  var1,
  var2,
  var3,
  var4,
  var5,
  var6 
)

Definition at line 568 of file utlCoreMacro.h.

#define utlOSShowPosition (   cond,
  os 
)

Definition at line 553 of file utlCoreMacro.h.

#define utlOSWarning (   cond,
  expout,
  os 
)

Definition at line 551 of file utlCoreMacro.h.

#define utlPrintVar (   cond,
  ... 
)
#define utlPrintVar1 (   cond,
  var 
)

Definition at line 556 of file utlCoreMacro.h.

#define utlPrintVar2 (   cond,
  var1,
  var2 
)
#define utlPrintVar3 (   cond,
  var1,
  var2,
  var3 
)
#define utlPrintVar4 (   cond,
  var1,
  var2,
  var3,
  var4 
)
#define utlPrintVar5 (   cond,
  var1,
  var2,
  var3,
  var4,
  var5 
)
#define utlPrintVar6 (   cond,
  var1,
  var2,
  var3,
  var4,
  var5,
  var6 
)

Definition at line 561 of file utlCoreMacro.h.

#define utlSAAssert (   expr)    utlSAGlobalAssert(true)

Definition at line 544 of file utlCoreMacro.h.

#define utlSAException (   expr)    utlSAGlobalException(false)

Definition at line 543 of file utlCoreMacro.h.

Referenced by itk::SamplingScheme3D< TPixelType >::AppendOrientation(), utl::BinaryOpExpr< OP, TLeft, TRight >::BinaryOpExpr(), utl::ComputeOrientationalOrderFromSHCoefficients(), itk::CopyImageRegion(), utl::DotProduct(), utl::NDArray< T, 2 >::EigenDecompositionSymmetricMatrix(), itk::DWISingleVoxelGenerator< TOutputImage, TScalarImage >::GenerateData(), itk::UnaryFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::GenerateOutputInformation(), utl::NDArray< T, 2 >::GetColumn(), utl::NDArray< T, 2 >::GetCrop(), utl::BinaryOpExpr< OP, TLeft, TRight >::GetDimension(), utl::GetDTIDesignMatrix(), utl::GetE1E2FromFAMD(), utl::GradientTable< T >::GetGrad(), utl::GetMeanOfRotationMatrix(), itk::PeakContainerHelper::GetNumberOfPeaks(), itk::Functor::SHCoefficientsFit< T >::GetOutputDimension(), itk::SHCoefficientsRotation< T >::GetRotatedSHCoefficients(), utl::NDArray< T, 2 >::GetRow(), utl::InnerProduct(), utl::InverseMatrix(), utl::InverseSymmericMatrix(), utl::NDArray< T, 2 >::LogM(), utl::MeanDirector(), utl::NormalizeGrad(), utl::NDArrayBase< T, 4 >::operator%=(), utl::Functor::DotProduct< TVector, TOutput >::operator()(), utl::operator*(), utl::NDArrayBase< T, 4 >::operator-=(), utl::NDArrayBase< T, 4 >::operator/=(), utl::PInverseSymmericMatrix(), utl::RotationMatrixToAxisAngle(), utl::NDArray< T, 2 >::SetColumn(), utl::NDArray< T, 2 >::SetCrop(), utl::NDArray< T, 2 >::SetDiagonal(), utl::NDArray< T, 2 >::SetRow(), utl::SetScalarsByName(), itk::SetVectorImageFullSize(), itk::MeshFromPeaksImageFilter< TInputImage, TOutputMesh >::VerifyInputParameters(), and itk::MaskedImageToImageFilter< TInputImage, TOutputImage, TMaskImage >::WriteLogger().

#define utlSAGlobalAssert (   expr)
Value:
if ( (expr) ) ; \
#define __SMART_ASSERT_LOCATION__
Assert & print_context(const char *file, int line)
Assert make_assert(const char *expr)
Assert & error(const char *strMsg=0)

Definition at line 367 of file utlCoreMacro.h.

#define utlSAGlobalException (   expr)
Value:
if ( !(expr) ) ; \
#define __SMART_ASSERT_LOCATION__
Assert & print_context(const char *file, int line)
Assert make_assert(const char *expr)
Assert & error(const char *strMsg=0)

Definition at line 362 of file utlCoreMacro.h.

Referenced by BinaryOPImage(), itk::MeshFromSphericalFunctionTessellatedSamplesImageFilter< TInputImage, TOutputMesh >::ComputeBasisMatrix(), itk::MeshFromDiscreteFiberODFImageFilter< TInputImage, TOutputMesh >::ComputeBasisMatrix(), itk::DWIGenerator< TOutputImage, TScalarImage >::GenerateData(), itk::DWISingleVoxelGenerator< TOutputImage, TScalarImage >::GenerateData(), itk::MultiVariableFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::GenerateOutputInformation(), itk::FunctorFromStringImageFilter< TInputImage, TOutputImage, TMaskImage >::GenerateOutputInformation(), utl::GradientTable< T >::GetGrad(), itk::SamplingSchemeQSpace< TPixelType >::GroupBValues(), utl::GradientTable< T >::Initialize(), main(), itk::FiberTracts< TValue >::PrintSelf(), utl::RankToDimSH(), itk::MultiVariableFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::ThreadedGenerateData(), itk::FunctorFromStringImageFilter< TInputImage, TOutputImage, TMaskImage >::ThreadedGenerateData(), itk::UnaryFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::ThreadedGenerateData(), itk::TensorBasisMatrixGenerator< TElement >::VerifyInputParameters(), itk::Functor::SHCoefficientsFit< T >::VerifyInputParameters(), itk::MeshFromContinuousSphericalFunctionImageFilter< TInputImage, TOutputMesh >::VerifyInputParameters(), itk::FeaturesFromSPFImageFilter< TInputImage, TOutputImage >::VerifyInputParameters(), itk::BasisMatrixGenerator< TElement >::VerifyInputParameters(), itk::MeshFromTensorImageFilter< TInputImage, TOutputMesh >::VerifyInputParameters(), and itk::FiberTractsWriter::WriteTractsTRK().

#define utlSAGlobalPrint   utlSAGlobalPrintIf("")

Definition at line 355 of file utlCoreMacro.h.

#define utlSAGlobalPrintIf (   expr)
Value:
if ( !(expr) ) ; \
#define __SMART_ASSERT_LOCATION__
Assert & print_context(const char *file, int line)
Assert make_assert(const char *expr)
Assert & log(const char *strMsg=0)

Definition at line 350 of file utlCoreMacro.h.

#define utlSAGlobalWarning (   expr)
Value:
if ( !(expr) ) ; \
#define __SMART_ASSERT_LOCATION__
Assert & print_context(const char *file, int line)
Assert make_assert(const char *expr)
Assert & warn(const char *strMsg=0)

Definition at line 357 of file utlCoreMacro.h.

Referenced by itk::ReadTrackVisHeader().

#define utlSAPrint   utlSAPrintIf("")

Definition at line 541 of file utlCoreMacro.h.

#define utlSAPrintIf (   expr)    utlSAGlobalPrintIf(false)

Definition at line 540 of file utlCoreMacro.h.

#define utlSASetLog (   log)    Assert::set_log(log)

Definition at line 348 of file utlCoreMacro.h.

#define utlSAWarning (   expr)    utlSAGlobalWarning(false)

Definition at line 542 of file utlCoreMacro.h.

#define utlSetGetMacro (   name,
  type 
)
Value:
utlSetMacro(name, type); \
utlGetMacro(name, type);
#define utlGetMacro(name, type)
Definition: utlCoreMacro.h:582
#define utlSetMacro(name, type)
Definition: utlCoreMacro.h:572

Definition at line 589 of file utlCoreMacro.h.

Referenced by itk::Functor::SHCoefficientsFit< T >::operator=().

#define utlSetMacro (   name,
  type 
)
Value:
virtual void Set##name (const type _arg) \
{ \
if ( this->m_##name != _arg ) \
{ \
this->m_##name = _arg; \
} \
}

Definition at line 572 of file utlCoreMacro.h.

#define utlShowPosition (   cond)

Definition at line 554 of file utlCoreMacro.h.

Referenced by itk::DWIGeneratorBase< TOutputImage, TScalarImage >::AllocateOutputs(), itk::GeneralizedHighOrderTensorImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), itk::MeshFromContinuousSphericalFunctionImageFilter< TInputImage, TOutputMesh >::BeforeThreadedGenerateData(), itk::GeneralizedHighOrderTensorImageFilter< TInputImage, TOutputImage >::ComputeBasisMatrix(), itk::TensorBasisMatrixGenerator< TElement >::ComputeBasisMatrix(), itk::MeshFromSHCoefficientsImageFilter< TInputImage, TOutputMesh >::ComputeBasisMatrix(), itk::MeshFromSphericalFunctionTessellatedSamplesImageFilter< TInputImage, TOutputMesh >::ComputeBasisMatrix(), itk::MeshFromDiscreteFiberODFImageFilter< TInputImage, TOutputMesh >::ComputeBasisMatrix(), itk::CylinderModelGenerator< PreciseType >::ComputeDWISamples(), itk::GeneralizedHighOrderTensorImageFilter< TInputImage, TOutputImage >::ComputeRadialMatrix(), itk::GeneralizedHighOrderTensorImageFilter< TInputImage, TOutputImage >::ComputeScale(), itk::ProfileFromSPFImageFilter< TInputImage, TOutputImage >::ComputeSPFToFeatureTransform(), itk::DWIReader< TPixelType, VImageDimension >::CorrectDWI(), itk::SphericalPolarFourierRadialGenerator< PreciseType >::Evaluate(), itk::SphericalPolarFourierGenerator< PreciseType >::Evaluate(), itk::DWIGenerator< TOutputImage, TScalarImage >::GenerateData(), itk::DWISingleVoxelGenerator< TOutputImage, TScalarImage >::GenerateData(), itk::MeshFromTensorImageFilter< TInputImage, TOutputMesh >::GenerateData(), itk::ProfileFromSPFImageFilter< TInputImage, TOutputImage >::GenerateOutputInformation(), itk::SphericalPolarFourierRadialGenerator< PreciseType >::GetNormalizeFacotr(), itk::DWIGeneratorBase< TOutputImage, TScalarImage >::Initialization(), itk::L1RegularizedLeastSquaresFISTASolver< TPrecision >::Initialize(), itk::TensorBasisMatrixGenerator< TElement >::InternalClone(), itk::DiscreteBasisMatrixGenerator< TElement >::InternalClone(), itk::BasisMatrixGenerator< TElement >::InternalClone(), itk::L1RegularizedLeastSquaresFISTASolver< TPrecision >::Iterate(), itk::DWIReader< TPixelType, VImageDimension >::NormalizeDWI(), itk::DWIReader< TPixelType, VImageDimension >::ReadFromConfigurationFile(), itk::L1RegularizedLeastSquaresFISTASolver< TPrecision >::Solve(), itk::SpamsWeightedLassoSolver< TPrecision >::Solve(), itk::GeneralizedHighOrderTensorImageFilter< TInputImage, TOutputImage >::ThreadedGenerateData(), itk::MeshFromContinuousSphericalFunctionImageFilter< TInputImage, TOutputMesh >::ThreadedGenerateData(), itk::GeneralizedHighOrderTensorImageFilter< TInputImage, TOutputImage >::VerifyInputParameters(), and itk::ProfileFromSPFImageFilter< TInputImage, TOutputImage >::VerifyInputParameters().

#define utlVLog (   level,
  expr 
)    utlVLogOS_IF(true, level, std::cout << expr)

Definition at line 264 of file utlCoreMacro.h.

#define utlVLog_IF (   cond,
  level,
  expr 
)    utlVLogOS_IF(cond, level, std::cout << expr)

Definition at line 263 of file utlCoreMacro.h.

#define utlVLogOS (   level,
  os 
)    utlVLogOS_IF(true, level, os)

Definition at line 262 of file utlCoreMacro.h.

#define utlVLogOS_IF (   cond,
  level,
  os 
)
Value:
do \
{ \
if ((level<=utl::LogLevel) && (cond)) \
{ os << std::endl << std::flush; } \
} while (0)
static int LogLevel
Definition: utlCoreMacro.h:203

Definition at line 254 of file utlCoreMacro.h.

#define utlVLogOSPosition_IF (   cond,
  level,
  os 
)
Value:
do \
{ if ((level<=utl::LogLevel) && (cond)) \
{ os << "\n"<<__UTL_BOLD("Work Flow")<<": "<< __UTL_Print_LOCATION << std::flush; \
} \
} while(0)
static int LogLevel
Definition: utlCoreMacro.h:203
#define __UTL_Print_LOCATION
Definition: utlCoreMacro.h:184
#define __UTL_BOLD(str)
Definition: utlCoreMacro.h:178

Definition at line 291 of file utlCoreMacro.h.

#define utlVLogOSVar (   level,
  os,
  ... 
)    utlVLogOSVar_IF(true, level, os, __VA_ARGS__)

Definition at line 279 of file utlCoreMacro.h.

#define utlVLogOSVar_IF (   cond,
  level,
  os,
  ... 
)
Value:
do \
{ if ( level<=utl::LogLevel ) \
{ PrintVar(cond, os, __VA_ARGS__); } \
} while(0)
#define PrintVar(cond, os,...)
Definition: utlCoreMacro.h:242
static int LogLevel
Definition: utlCoreMacro.h:203

Definition at line 272 of file utlCoreMacro.h.

#define utlVLogPosition (   level)    utlVLogOSPosition_IF(true, level, std::cout)
#define utlVLogVar (   level,
  ... 
)    utlVLogOSVar_IF(true, level, std::cout, __VA_ARGS__)

Definition at line 281 of file utlCoreMacro.h.

#define utlVLogVar_IF (   cond,
  level,
  ... 
)    utlVLogOSVar_IF(cond, level, std::cout, __VA_ARGS__)

Definition at line 280 of file utlCoreMacro.h.

#define utlWarning (   cond,
  expout 
)
#define vtkAddInputData (   x,
 
)    do { (x)->AddInput(y); } while (0)

Definition at line 19 of file utlVTKMacro.h.

#define vtkSetInputData (   x,
 
)    do { (x)->SetInput(y); } while (0)

Definition at line 18 of file utlVTKMacro.h.

Referenced by main().

Enumeration Type Documentation

anonymous enum
Enumerator
TENSOR_9D 
TENSOR_UPPER_TRIANGULAR 
TENSOR_LOWER_TRIANGULAR 
TENSOR_DIAGONAL_FIRST 
TENSOR_EMBED6D 

Definition at line 49 of file utlDMRI.h.

anonymous enum
Enumerator
TRACTS_UNKNOWN 
TRACTS_TRK 
TRACTS_TCK 
TRACTS_VTK 

Definition at line 62 of file utlDMRI.h.

anonymous enum
Enumerator
DWI_NORMALIZE 
DWI_NONORMALIZE 

Definition at line 69 of file utlDMRI.h.

anonymous enum
Enumerator
IMAGE_ND 

itk::Image<double, 4>, stored volume by volume

IMAGE_VECTOR 

itk::VectorImage<double, 3>, stored continuously in each voxel, default image type used in dmritool

IMAGE_VARIABLELENGTH 

itk::Image<itk::VariableLengthVector<double>, double>, a variable length vector in each voxel

IMAGE_SPARSE 

itk::SpatiallyDenseSparseVectorImage<double, 3>, a sparse vector in each voxel

Definition at line 28 of file utlITKMacro.h.

anonymous enum
Enumerator
COLOR_NORMAL 
COLOR_BOLD 
COLOR_BLACK 
COLOR_WHITE 
COLOR_PURPLE 
COLOR_RED 
COLOR_GREEN 
COLOR_YELLOW 
COLOR_BLUE 
COLOR_CYAN 

Definition at line 92 of file utlCoreMacro.h.

anonymous enum
Enumerator
ROW_MAJOR 
COLUMN_MAJOR 

Definition at line 105 of file utlCoreMacro.h.

anonymous enum
Enumerator
LOG_MUTE 

no log

LOG_NORMAL 

normal log

LOG_DEBUG 

used for debug information. this->GetDebug()

LOG_LARGE 

log for large matrix or vectors.

LOG_ALL 

for all possible logs.

Definition at line 187 of file utlCoreMacro.h.

anonymous enum
Enumerator
CARTESIAN_TO_CARTESIAN 
CARTESIAN_TO_SPHERICAL 
SPHERICAL_TO_CARTESIAN 
SPHERICAL_TO_SPHERICAL 

Definition at line 20 of file utlDMRI.h.

anonymous enum
Enumerator
RADIAN_TO_DEGREE 
RADIAN_TO_RADIAN 
DEGREE_TO_RADIAN 
DEGREE_TO_DEGREE 

Definition at line 27 of file utlDMRI.h.

anonymous enum
Enumerator
DIRECTION_NODUPLICATE 
DIRECTION_DUPLICATE 

Definition at line 34 of file utlDMRI.h.

anonymous enum
Enumerator
DIRECTION_NOFLIP 
DIRECTION_FLIP 

Definition at line 39 of file utlDMRI.h.

Function Documentation

template<typename T , vcl_size_t N>
char(& __utlArraySizeHelper ( T(&)  array[N]) )[N]
template<typename T , vcl_size_t N>
char(& __utlArraySizeHelper ( const T(&)  array[N]) )[N]
template<class T >
vnl_matrix<T> utl::CartesianToSpherical ( const vnl_matrix< T > &  in)

Definition at line 54 of file utlVNL.h.

References utl::cartesian2Spherical(), and utlAssert.

+ Here is the call graph for this function:

template<class T >
vnl_matrix<T> utl::ConnectVnlMatrix ( const vnl_matrix< T > &  m1,
const vnl_matrix< T > &  m2,
const bool  isConnectRow 
)

Definition at line 91 of file utlVNL.h.

References utlException.

template<class T >
vnl_vector<T> utl::ConnectVnlVector ( const vnl_vector< T > &  m1,
const vnl_vector< T > &  m2 
)

Definition at line 125 of file utlVNL.h.

template<class ImageWithInfoType , class ImageType >
void itk::CopyImageInformation ( const SmartPointer< ImageWithInfoType > &  imageFrom,
SmartPointer< ImageType > &  imageTo 
)
template<unsigned dimIn, unsigned dimOut>
void itk::CopyImageRegion ( const ImageRegion< dimIn > &  regionIn,
ImageRegion< dimOut > &  regionOut,
const int  numberOfComponens = -1 
)
template<class ImageType >
ImageType::Pointer itk::GenerateImage ( const typename ImageType::SizeType &  size,
const int  vectorLength = 1 
)

Generate an image with given size and VectorLength.

Definition at line 454 of file utlITK.h.

template<class ImageType >
ImageType::Pointer itk::GenerateImageFromSingleVoxel ( const typename ImageType::PixelType &  pixel)

Definition at line 467 of file utlITK.h.

template<class T >
vnl_vector<T> utl::GetAbsoluteVnlVector ( const vnl_vector< T > &  vec)

Definition at line 138 of file utlVNL.h.

template<class T >
vnl_matrix<T> utl::GetColumnsVnlMatrix ( const vnl_matrix< T > &  mat,
const std::vector< int > &  index 
)

Definition at line 311 of file utlVNL.h.

References utlException.

template<class T >
vnl_matrix<T> utl::GetDiagonalMatrix ( const vnl_vector< T > &  vec)

Definition at line 365 of file utlVNL.h.

Referenced by utl::NDArray< T, 1 >::GetDiagonalMatrix().

+ Here is the caller graph for this function:

int itk::GetImageType ( const std::string &  filename)
inline

Definition at line 203 of file utlITK.h.

References IMAGE_ND, IMAGE_SPARSE, IMAGE_VARIABLELENGTH, IMAGE_VECTOR, and utl::IsEndingWith().

Referenced by itk::IsVectorImage(), main(), and PrintImage().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class ImageType >
int itk::GetImageType ( const SmartPointer< ImageType > &  image)
inline

Definition at line 229 of file utlITK.h.

References IMAGE_ND, IMAGE_SPARSE, IMAGE_VARIABLELENGTH, IMAGE_VECTOR, utl::IsInstanceOf(), and utlException.

+ Here is the call graph for this function:

template<class T >
T utl::GetMedianVnlVector ( const vnl_vector< T > &  values)

Definition at line 148 of file utlVNL.h.

template<class T >
double utl::GetMinAngle ( const vnl_matrix< T > &  grad)
inline

get the minimal angle from a given evenly distributed gradients in Cartesian format

Definition at line 173 of file utlVNL.h.

References M_EPS, M_PI, and utlException.

template<class T >
vnl_matrix<T> utl::GetRowsVnlMatrix ( const vnl_matrix< T > &  mat,
const std::vector< int > &  index 
)

Definition at line 299 of file utlVNL.h.

References utlException.

template<class T >
vnl_vector<T> utl::GetValuesVnlVector ( const vnl_vector< T > &  vec,
const int  colstart,
const int  n 
)

Definition at line 261 of file utlVNL.h.

template<class T >
vnl_vector<T> utl::GetValuesVnlVector ( const vnl_vector< T > &  vec,
const std::vector< int > &  index 
)

Definition at line 271 of file utlVNL.h.

template<class ImageType >
std::vector<int> itk::GetVectorImage3DVolumeSize ( const SmartPointer< ImageType > &  image)

Definition at line 331 of file utlITK.h.

References utlException, and utlGlobalException.

Referenced by itk::MeshFromTensorImageFilter< TInputImage, TOutputMesh >::GenerateData(), ImageMath(), and PrintImage().

+ Here is the caller graph for this function:

template<class ImageType >
std::vector<int> itk::GetVectorImageFullSize ( const SmartPointer< ImageType > &  image)
template<class ImageType >
int itk::GetVectorImageVectorSize ( const SmartPointer< ImageType > &  image,
const int  axis = -1 
)
template<class T >
vnl_matrix<T> utl::GetVnlMatrixPInverse ( const vnl_matrix< T > &  mat,
const double  eps = 1e-8 
)

Get the pseudoinverse of a vnl_matrix. The small eigenvalues are set to zero

Definition at line 219 of file utlVNL.h.

template<class T >
std::vector<T> utl::GetVnlMatrixStats ( const vnl_matrix< T > &  values)

Definition at line 165 of file utlVNL.h.

References utl::GetContainerStats().

+ Here is the call graph for this function:

template<class T >
vnl_matrix<T> utl::GetVnlSymmericMatrixPInverse ( const vnl_matrix< T > &  mat,
const double  eps = 1e-8 
)

Get the pseudoinverse of a symmetric vnl_matrix. The small eigenvalues are set to zero

Definition at line 199 of file utlVNL.h.

References utlException.

template<class T >
std::vector<T> utl::GetVnlVectorStats ( const vnl_vector< T > &  values)

Definition at line 158 of file utlVNL.h.

References utl::GetContainerStats().

+ Here is the call graph for this function:

template<class Image1Type , class Image2Type >
void itk::ImageToImage ( const SmartPointer< Image1Type > &  image1,
SmartPointer< Image2Type > &  image2 
)

Definition at line 484 of file utlITK.h.

References utlGlobalException.

template<class Image1Type , class Image2Type >
SmartPointer<Image2Type> itk::ImageToImage ( const SmartPointer< Image1Type > &  image1)

Definition at line 505 of file utlITK.h.

bool itk::Is3DImage ( const std::string &  filename)
inline

Definition at line 259 of file utlITK.h.

References itk::IsVectorImage().

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class ImageType >
bool itk::IsImageEmpty ( const SmartPointer< ImageType > &  image)

Definition at line 435 of file utlITK.h.

Referenced by itk::SphericalPolarFourierEstimationImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData(), itk::DWIReader< TPixelType, VImageDimension >::CorrectDWI(), itk::FunctorFromStringOPImage(), itk::MeshFromTensorImageFilter< TInputImage, TOutputMesh >::GenerateData(), utl::InitializeSHTripleIntegrationTable(), itk::SphericalPolarFourierEstimationImageFilter< TInputImage, TOutputImage >::IsAdaptiveScale(), itk::MaskedImageToImageFilter< TInputImage, TOutputImage >::IsMaskUsed(), main(), itk::MultiVariableVectorOPImage(), itk::MaskedImageToImageFilter< TInputImage, TOutputImage, TMaskImage >::PrintSelf(), itk::FeaturesFromSPFImageFilter< TInputImage, TOutputImage >::PrintSelf(), itk::DWIReader< TPixelType, VImageDimension >::PrintSelf(), itk::DWIReader< TPixelType, VImageDimension >::ReadFromConfigurationFile(), itk::ScalarMapFromSPFImageFilter< TInputImage, TOutputImage >::ThreadedGenerateData(), itk::SphericalPolarFourierImageFilter< TInputImage, TOutputImage >::ThreadedGenerateData(), itk::UnaryVectorOPImage(), itk::DiffusionModelEstimationImageFilter< TInputImage, TOutputImage >::VerifyInputParameters(), itk::MaskedImageToImageFilter< TInputImage, TOutputImage >::VerifyInputParameters(), itk::SphericalPolarFourierEstimationImageFilter< TInputImage, TOutputImage >::VerifyInputParameters(), itk::MeshFromTensorImageFilter< TInputImage, TOutputMesh >::VerifyInputParameters(), and itk::DWIWriter< TPixelType, VImageDimension >::WriteToConfigurationFile().

+ Here is the caller graph for this function:

template<class T >
bool utl::IsMatrixSymmetric ( const vnl_matrix< T > &  mat,
const double  eps = 1e-10 
)

Definition at line 375 of file utlVNL.h.

bool itk::IsSparseImage ( const std::string &  filename)
inline

Definition at line 426 of file utlITK.h.

References utl::GetFileExtension().

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool itk::IsVectorImage ( const std::string &  filename)
inline

Definition at line 253 of file utlITK.h.

References itk::GetImageType(), and IMAGE_VECTOR.

Referenced by itk::Is3DImage(), main(), and itk::ReadVectorImage().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class T >
vnl_matrix<T> utl::NormalizeMinMax ( const vnl_matrix< T > &  matrix)

min-max normalization for each column of the given vnl_matrix

Definition at line 74 of file utlVNL.h.

References utl::NormalizeMinMax().

+ Here is the call graph for this function:

template<class PointsContainer , class VnlValueType >
void itk::PointsContainerToVnlMatrix ( const PointsContainer &  points,
vnl_matrix< VnlValueType > &  matrix 
)

Definition at line 950 of file utlITK.h.

template<class TPixelType , unsigned int VImageDimension>
void itk::PrintImage ( const SmartPointer< Image< TPixelType, VImageDimension > >  image,
const std::string &  mse = "",
std::ostream &  os = std::cout,
bool  isPrintHeader = false 
)

print itk::Image

Definition at line 753 of file utlITK.h.

References utlGlobalException.

template<class TPixelType , unsigned int VImageDimension>
void itk::PrintImage3D ( const SmartPointer< Image< TPixelType, VImageDimension > > &  image,
const std::string &  mse = "",
std::ostream &  os = std::cout,
bool  isPrintHeader = false 
)

print itk::Image with dimension no more than 3

Definition at line 657 of file utlITK.h.

References utlGlobalException.

template<class TPixelType , unsigned int VImageDimension>
void itk::PrintImage4D ( const SmartPointer< Image< TPixelType, VImageDimension > > &  image,
const std::string &  mse = "",
std::ostream &  os = std::cout,
bool  isPrintHeader = false 
)

print 4D itk::Image

Definition at line 692 of file utlITK.h.

References utl::GetContainerStats(), and utlGlobalException.

+ Here is the call graph for this function:

template<class T >
void itk::PrintVariableLengthVector ( const VariableLengthVector< T >  vec,
const std::string &  str = "",
const char *  separate = " ",
std::ostream &  os = std::cout 
)
template<class TPixelType , unsigned int VImageDimension>
void itk::PrintVectorImage ( const SmartPointer< VectorImage< TPixelType, VImageDimension > > &  image,
const std::string &  mse = "",
std::ostream &  os = std::cout,
bool  isPrintHeader = false 
)

print itk::VectorImage

Definition at line 612 of file utlITK.h.

References utl::GetContainerStats().

+ Here is the call graph for this function:

template<class T >
void utl::PrintVnlMatrix ( const vnl_matrix< T > &  matrix,
const std::string &  str = "",
const char *  separate = " ",
std::ostream &  os = std::cout 
)

Definition at line 245 of file utlVNL.h.

template<class T >
void utl::PrintVnlMatrixStats ( const vnl_matrix< T > &  matrix,
const std::string &  str = "",
const char *  separate = " ",
std::ostream &  os = std::cout 
)

Definition at line 237 of file utlVNL.h.

template<class T >
void utl::PrintVnlVector ( const vnl_vector< T > &  vec,
const std::string &  str = "",
const char *  separate = " ",
std::ostream &  os = std::cout 
)

Definition at line 253 of file utlVNL.h.

References utl::PrintContainer().

Referenced by itk::DiffusionModelGenerator< PreciseType >::PrintSelf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class ImageType >
bool itk::ReadImage ( const std::string &  filename,
SmartPointer< ImageType > &  image,
const std::string &  printInfo = "Reading Image:" 
)

Read Image

Definition at line 110 of file utlITK.h.

References utl::IsLogNormal().

Referenced by callFunction(), ImageMath(), and main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class ImageType , class ReaderType >
bool itk::ReadImage ( const std::string &  filename,
SmartPointer< ImageType > &  image,
const std::string &  printInfo = "Reading Image:" 
)

Definition at line 134 of file utlITK.h.

References utl::IsLogNormal().

+ Here is the call graph for this function:

template<class ImageType >
bool itk::ReadImageInformation ( const std::string &  filename,
SmartPointer< ImageType > &  image 
)

Read information of the image, not the data in image

Definition at line 87 of file utlITK.h.

template<class ImageType >
bool itk::SaveImage ( const SmartPointer< ImageType > &  image,
const std::string &  filename,
const std::string &  printInfo = "Writing Image:" 
)

Definition at line 157 of file utlITK.h.

References utl::IsLogNormal().

Referenced by callFunction(), ImageMath(), main(), and itk::DWIWriter< TPixelType, VImageDimension >::WriteToConfigurationFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class ImageType , class WriterType >
bool itk::SaveImage ( const SmartPointer< ImageType > &  image,
const std::string &  filename,
const std::string &  printInfo = "Writing Image:" 
)

Definition at line 181 of file utlITK.h.

References utl::IsLogNormal().

+ Here is the call graph for this function:

template<class T >
void utl::SaveVnlMatrix ( const vnl_matrix< T > &  matrix,
const std::string &  file 
)

Definition at line 228 of file utlVNL.h.

template<class T >
void utl::SetColumnsVnlMatrix ( const vnl_matrix< T > &  submat,
vnl_matrix< T > &  mat,
const std::vector< int > &  index 
)

Definition at line 334 of file utlVNL.h.

References utlException.

template<class T >
void utl::SetRowsVnlMatrix ( const vnl_matrix< T > &  submat,
vnl_matrix< T > &  mat,
const std::vector< int > &  index 
)

Definition at line 323 of file utlVNL.h.

References utlException.

template<class T >
void utl::SetValuesVnlVector ( const vnl_vector< T > &  subvec,
vnl_vector< T > &  vec,
const int  colstart 
)

Definition at line 281 of file utlVNL.h.

References utlException.

template<class T >
void utl::SetValuesVnlVector ( const vnl_vector< T > &  subvec,
vnl_vector< T > &  vec,
const std::vector< int > &  index 
)

Definition at line 290 of file utlVNL.h.

References utlException.

template<class ImageType >
void itk::SetVectorImage3DVolumeSize ( SmartPointer< ImageType > &  image,
const std::vector< int > &  size 
)

Definition at line 358 of file utlITK.h.

References utlException.

template<class ImageType >
void itk::SetVectorImageFullSize ( SmartPointer< ImageType > &  image,
const std::vector< int > &  size 
)

Set 4d size to 3D vector image or 4D scalar image

Definition at line 400 of file utlITK.h.

References utlGlobalException, and utlSAException.

Referenced by itk::MultiVariableFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::GenerateOutputInformation().

+ Here is the caller graph for this function:

template<class ImageType >
void itk::SetVectorImageVectorSize ( const SmartPointer< ImageType > &  image,
const int  vecsize 
)

Definition at line 310 of file utlITK.h.

References utlGlobalException.

Referenced by itk::UnaryFunctorVectorImageFilter< TInputImage, TOutputImage, TFunction, TMaskImage >::GenerateOutputInformation().

+ Here is the caller graph for this function:

template<class T >
vnl_matrix<T> utl::SphericalToCartesian ( const vnl_matrix< T > &  in)

Definition at line 35 of file utlVNL.h.

References utl::spherical2Cartesian(), and utlAssert.

+ Here is the call graph for this function:

template<class T >
vnl_vector<T> utl::StdVectorToVnlVector ( const std::vector< T > &  vec)

Definition at line 355 of file utlVNL.h.

Referenced by itk::DWISingleVoxelGenerator< TOutputImage, TScalarImage >::GenerateData().

+ Here is the caller graph for this function:

template<class T >
void utl::UtlMatrixToVnlMatrix ( const NDArray< T, 2 > &  mat,
vnl_matrix< T > &  matVnl 
)

Definition at line 59 of file utlVNLIO.h.

References utl::NDArray< T, 2 >::Cols(), utl::NDArrayBase< T, Dim >::GetData(), and utl::NDArray< T, 2 >::Rows().

+ Here is the call graph for this function:

template<class T >
vnl_matrix<T> utl::UtlMatrixToVnlMatrix ( const NDArray< T, 2 > &  mat)

Definition at line 67 of file utlVNLIO.h.

References utl::NDArray< T, 2 >::Cols(), utl::NDArrayBase< T, Dim >::GetData(), and utl::NDArray< T, 2 >::Rows().

+ Here is the call graph for this function:

template<class T >
vnl_vector<T> utl::UtlVectorToVnlVector ( const NDArray< T, 1 > &  vec)

Definition at line 83 of file utlVNLIO.h.

References utl::NDArrayBase< T, Dim >::GetData(), and utl::NDArrayBase< T, Dim >::Size().

+ Here is the call graph for this function:

template<class T >
vnl_vector<T> itk::VariableLengthVectorToVnlVector ( const VariableLengthVector< T > &  vec)

Definition at line 76 of file utlITK.h.

template<class Image1Type , class Image2Type >
bool itk::VerifyImageInformation ( const SmartPointer< Image1Type > &  image1,
const SmartPointer< Image2Type > &  image2,
const bool  isMinimalDimension = false 
)

Check Image Information

Definition at line 850 of file utlITK.h.

References utl::min().

Referenced by itk::DWIReader< TPixelType, VImageDimension >::ReadFromConfigurationFile(), and itk::SphericalPolarFourierEstimationImageFilter< TInputImage, TOutputImage >::VerifyInputParameters().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class Image1Type >
bool itk::VerifyImageInformation ( const SmartPointer< Image1Type > &  image1,
const std::string &  file2,
const bool  isMinimalDimension = false 
)

Check Image Information

Definition at line 894 of file utlITK.h.

bool itk::VerifyImageInformation ( const std::string &  file1,
const std::string &  file2,
const bool  isMinimalDimension = false 
)
inline

Check Image Information

Definition at line 925 of file utlITK.h.

template<class Image1Type , class Image2Type >
bool itk::VerifyImageSize ( const SmartPointer< Image1Type > &  image1,
const SmartPointer< Image2Type > &  image2,
const bool  isMinimalDimension = false 
)

Check Image Information

Definition at line 766 of file utlITK.h.

References utl::min().

Referenced by itk::MeshFromTensorImageFilter< TInputImage, TOutputMesh >::VerifyInputParameters().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class Image1Type >
bool itk::VerifyImageSize ( const SmartPointer< Image1Type > &  image1,
const std::string &  file2,
const bool  isMinimalDimension = false 
)

Check Image Information

Definition at line 794 of file utlITK.h.

bool itk::VerifyImageSize ( const std::string &  file1,
const std::string &  file2,
const bool  isMinimalDimension = false 
)
inline

Check Image Information

Definition at line 825 of file utlITK.h.

template<class VnlValueType , class PointsContainer >
void itk::VnlMatrixToPointsContainer ( const vnl_matrix< VnlValueType > &  matrix,
PointsContainer &  points 
)

Definition at line 978 of file utlITK.h.

References utlGlobalException.

template<class T >
void utl::VnlMatrixToUtlMatrix ( const vnl_matrix< T > &  mat,
utl::NDArray< T, 2 > &  matUtl 
)

Definition at line 34 of file utlVNLIO.h.

References utl::NDArray< T, 2 >::CopyData(), and utl::NDArray< T, 2 >::ReSize().

Referenced by itk::MeshFromContinuousSphericalFunctionImageFilter< TInputImage, TOutputMesh >::BeforeThreadedGenerateData(), and utl::VnlMatrixToUtlMatrix().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class T , unsigned rows, unsigned cols>
void utl::VnlMatrixToUtlMatrix ( const vnl_matrix_fixed< T, rows, cols > &  mat,
utl::NDArray< T, 2 > &  matUtl 
)

Definition at line 42 of file utlVNLIO.h.

References utl::NDArray< T, 2 >::CopyData(), and utl::NDArray< T, 2 >::ReSize().

+ Here is the call graph for this function:

template<class T >
utl::NDArray<T,2> utl::VnlMatrixToUtlMatrix ( const vnl_matrix< T > &  mat)

Definition at line 50 of file utlVNLIO.h.

References utl::VnlMatrixToUtlMatrix().

+ Here is the call graph for this function:

template<class T >
std::vector<T> utl::VnlVectorToStdVector ( const vnl_vector< T > &  vec)

Definition at line 345 of file utlVNL.h.

template<class T >
utl::NDArray<T,1> utl::VnlVectorToUtlVector ( const vnl_vector< T > &  vec)

Definition at line 75 of file utlVNLIO.h.

template<class T >
VariableLengthVector<T> itk::VnlVectorToVariableLengthVector ( const vnl_vector< T > &  vec)

Definition at line 66 of file utlITK.h.