iRoCS Toolbox  1.1.0
Data Structures | Typedefs | Enumerations | Functions | Variables
atb Namespace Reference

Data Structures

class  AnisotropicDiffusionFilter
 The AnisotropicDiffusionFilter class implements the Filter interface and provides an anisotropic diffusion filter. More...
 
class  Array
 The Array class is an extension to the blitz++ Array class providing additional parameters element size in microns and a transformation. More...
 
class  BasicTreeNode
 
class  BoundaryTreatment
 The BoundaryTreatment class provides the interface to all specific BoundaryTreatment subclasses. More...
 
class  BoundaryTreatmentFactory
 The BoundaryTreatmentFactory class contains a factory method for creating a BoundaryTreatment object from the given BoundaryTreatment enumeration value. More...
 
class  BSpline
 The BSpline class provides functions for fitting B-Splines to point clouds and evaluating them at arbitrary curve position u. More...
 
class  CentralGradientFilter
 The CentralGradientFilter class implements the SeparableFilter interface and provides gradient computation using central differences. More...
 
class  CentralHessianFilter
 The CentralHessianFilter class implements the SeparableFilter interface and provides hessian computation using central differences. More...
 
class  CentralHessianUTFilter
 The CentralHessianUTFilter class implements the SeparableFilter interface and provides hessian computation using central differences. More...
 
class  CoupledBSplineModel
 
class  CropBoundaryTreatment
 The CropBoundaryTreatment class has actually no function. More...
 
class  CubicInterpolator
 The CubicInterpolator class provides sub-pixel access to blitz++ Arrays using cubic interpolation. More...
 
class  CyclicBoundaryTreatment
 The CyclicBoundaryTreatment class implements cyclic border treatment when accessing Arrays. More...
 
class  DericheFilter
 The DericheFilter class implements the Deriche filter, which approximates a Gaussian filter using a recursive formulation. More...
 
class  DistanceTransform
 The DistanceTransform class computes the exact euclidean distance transform of binary images. More...
 
struct  Energy
 
class  EuclideanDistanceTransformBase
 Exact 1-D euclidean distance transform using lower parabola embedding [1]. More...
 
class  FastConvolutionFilter
 The FastConvolutionFilter class provides n-D Array convolution using the Fast Fourier Transform. More...
 
class  FastCorrelationFilter
 The FastCorrelationFilter class provides n-D Array correlation using the Fast Fourier Transform. More...
 
class  FastNormalizedCorrelationFilter
 The FastNormalizedCorrelationFilter class provides normalized cross-correlation for n-D Arrays employing the Fast Fourier Transform. More...
 
class  FastPhaseOnlyCorrelationFilter
 The FastPhaseOnlyCorrelationFilter class provides phase-only cross-correlation for n-D Arrays employing the Fast Fourier Transform. More...
 
class  Filter
 The Filter class is the base class for all filter implementations. More...
 
class  GaussianFilter
 The GaussianFilter class implements the Filter interface and provides a Gaussian smoothing filter. More...
 
class  GSLWrapper
 The GSLWrapper class provides static wrapper functions to obtain GSL views onto Array data structures. More...
 
class  Interpolator
 The Interpolator class is the base class of all classes implementing interpolation strategies for sub-pixel Array access. More...
 
class  InterpolatorFactory
 The InterpolatorFactory class contains a factory method for creating a new Interpolator object using the given InterpolationType and BoundaryTreatmentType with corresponding default boundary value. More...
 
class  IRoCS
 The IRoCS class provides means to attach iRoCS to different kinds of processed root images. More...
 
class  IsotropicMedianFilter
 The IsotropicMedianFilter class implements the n-dimensional isotropic median filter. More...
 
class  IsotropicPercentileFilter
 The IsotropicPercentileFilter class implements the n-dimensional percentile filter. More...
 
class  LaplacianFilter
 The LaplacianFilter class implements the Filter interface and provides laplacian computation using forward-backward differences. More...
 
class  LaplacianOfGaussianFilter
 The LaplacianOfGaussianFilter class implements the Filter interface and provides Laplacian of Gaussian computation using Gaussian derivative filters. More...
 
class  LinearInterpolator
 The LinearInterpolator class provides sub-pixel access to blitz++ Arrays using linear interpolation. More...
 
class  LocalSumFilter
 The LocalSumFilter class is a box filter with a filter kernel containing only ones. More...
 
class  MarchingCubes
 The MarchingCubes class provides the Marching Cubes Algorithm for isosurface tesselation of real scalar volume data. More...
 
class  MaximumInterpolator
 The MaximumInterpolator class provides sub-pixel access to blitz++ Arrays returning the minimum of all adjacent pixel values. More...
 
class  MedianFilter
 The MedianFilter class implements the n-dimensional median filter. More...
 
class  MedianInterpolator
 The MedianInterpolator class provides sub-pixel access to blitz++ Arrays returning the median of all adjacent pixel values. More...
 
class  MinimumInterpolator
 The MinimumInterpolator class provides sub-pixel access to blitz++ Arrays returning the minimum of all adjacent pixel values. More...
 
class  MirrorBoundaryTreatment
 The MirrorBoundaryTreatment class implements mirroring border treatment when accessing Arrays. More...
 
class  MyDateTime
 The MyDateTime struct provides pretty printed date - time strings with microsecond resolution. More...
 
class  NearestInterpolator
 The NearestInterpolator class provides sub-pixel access to blitz++ Arrays using the nearest neighbor startegy. More...
 
class  Neighborhood
 The Neighborhood class specifies local pixel/voxel neighborhoods. More...
 
class  Nucleus
 The Nucleus class contains cell nucleus attributes and provides methods to load and save single nuclei and sets of nuclei from/to hdf5 files in a format compatible to labelling. More...
 
class  Polyline
 The Polyline class provides a simple polyline representation of a BSpline for fast point to spline distance approximations. More...
 
class  Polynomial
 The Polynomial class provides arithmetical operations with polynomials as well as a root finding algorithm. More...
 
class  Profiler
 The Profiler class provides a simple stop-watch in microsecond accuracy for simple profiling tasks (similar to tic - toc in MATLAB). More...
 
class  Quaternion
 The Quaternion class implements templated quaternions with few important operations. More...
 
class  RepeatBoundaryTreatment
 The RepeatBoundaryTreatment class implements repeating border treatment when accessing Arrays. More...
 
class  RuntimeError
 Objects of the RuntimeError class are thrown in case of errors while processing ArrayToolbox functions. More...
 
struct  SDMagFeatureIndex
 Data structure to index a feature structure consisting of multi-scale spherical derivative features. More...
 
class  SeparableConvolutionFilter
 The SeparableConvolutionFilter class implements direct separable convolution. More...
 
class  SeparableCorrelationFilter
 The SeparableCorrelationFilter class implements direct separable correlation. More...
 
class  SeparableFilter
 The SeparableFilter class specifies methods a separable filter provides additionally to the filter methods defined in Filter. More...
 
class  SparseMatrix
 The SparseMatrix class provides a sparse matrix data structure and corresponding arithmetics. More...
 
class  SparseMatrixError
 The SparseMatrixError class is the exception type thrown when SparseMatrix operations fail. More...
 
class  SparseVector
 
class  SparseVectorError
 
class  STLFileWriter
 
class  SurfaceGeometry
 The SurfaceGeometry struct provides data structures required for the storage of triangulated surface data for direct OpenGL rendering or export to STL files. More...
 
class  Timer
 The Timer class provides a simple stop-watch in microsecond accuracy for simple profiling tasks (similar to tic - toc in MATLAB) More...
 
struct  TinyVectorLessThan
 The TinyVectorLessThan struct provides an operator for comparing TinyVectors defining a strict weak ordering between them. More...
 
class  traits
 The traits class provides means to query specific information about different data types. More...
 
class  ValueBoundaryTreatment
 The ValueBoundaryTreatment class implements constant value border treatment when accessing Arrays. More...
 

Typedefs

typedef int BlitzIndexT
 The native integer type for indexing blitz++ Arrays. More...
 

Enumerations

enum  BoundaryTreatmentType {
  ValueBT = 0x0001, CyclicBT = 0x0002, RepeatBT = 0x0004, MirrorBT = 0x0008,
  CropBT = 0x0010
}
 BoundaryTreatment.hh "libArrayToolbox/BoundaryTreatment.hh". More...
 
enum  ErrorFunctionType { Erf, ErfC, ErfCX }
 
enum  InterpolationType {
  NearestIP = 0x0001, LinearIP = 0x0002, CubicIP = 0x0004, MinimumIP = 0x0008,
  MaximumIP = 0x0010, MedianIP = 0x0020
}
 Interpolator.hh "libArrayToolbox/Interpolator.hh". More...
 
enum  NHood { SIMPLE_NHOOD, COMPLEX_NHOOD, SIMPLE_NHOOD, COMPLEX_NHOOD }
 
enum  NHood { SIMPLE_NHOOD, COMPLEX_NHOOD, SIMPLE_NHOOD, COMPLEX_NHOOD }
 
enum  NormType { MINMAX, STDDEV, ZERO_MEAN_STDDEV }
 
enum  SortingType {
  None, Ascending, Descending, AbsAscending,
  AbsDescending
}
 

Functions

void atb_gsl_error_handler (char const *reason, char const *file, int line, int gsl_errno)
 Default Arraytoolbox_Qt4 GSL error handler. More...
 
template<typename DataT , int Dim>
void close (blitz::Array< DataT, Dim > const &data, blitz::Array< DataT, Dim > &result, std::vector< blitz::TinyVector< BlitzIndexT, Dim > > const &strel, iRoCS::ProgressReporter *progress=NULL)
 Morphological closing. More...
 
template<int Dim>
void computeEigenvectors (blitz::TinyMatrix< double, Dim, Dim > const &A, blitz::TinyMatrix< double, Dim, Dim > &U, blitz::TinyVector< double, Dim > const &lambda)
 Computates the eigenvectors of the real symmetric matrix A given the eigenvalues. More...
 
template<typename DataT >
void computeHoughTransform (const blitz::Array< DataT, 3 > &data, std::vector< blitz::Array< double, 3 > * > &houghmaps, std::vector< blitz::Array< double, 3 > * > &houghmapsR, const double rMin, const double rMax, const double rStep, const double preSmoothing, const double postSmoothing, const double minMagnitude)
 Fast implementation of the spherical hough transform for non-overlapping spheres. More...
 
template<typename DataT >
void computeHoughTransform (const Array< DataT, 3 > &data, std::vector< Array< double, 3 > * > &houghmaps, std::vector< Array< double, 3 > * > &houghmapsR, const double rMin, const double rMax, const double rStep, const double preSmoothing, const double postSmoothing, const double minMagnitude)
 Fast implementation of the spherical hough transform for non-overlapping spheres. More...
 
template<typename DataT >
void computeHoughTransform (const Array< DataT, 3 > &data, std::map< int, Array< double, 3 > > &houghFeatures, const double rMin, const double rMax, const double rStep, const double preSmoothing, const double postSmoothing, const double minMagnitude)
 Fast implementation of the spherical hough transform for non-overlapping spheres. More...
 
template<int Dim>
void computeTPSParameters (const std::vector< blitz::TinyVector< double, Dim > > &source, const std::vector< blitz::TinyVector< double, Dim > > &target, blitz::Array< double, 2 > &coeffs)
 Given two vectors of correspondending points of two datasets, compute the weights and offsets of a thin plate spline that transforms the source point set onto the target point set. More...
 
template<int Dim>
void connectedComponentLabelling (const blitz::Array< bool, Dim > &data, blitz::Array< BlitzIndexT, Dim > &labels, NHood nh=COMPLEX_NHOOD, iRoCS::ProgressReporter *pr=NULL)
 Connected component labelling of the given binary Array. More...
 
template<int Dim>
double determinant (blitz::TinyMatrix< double, Dim, Dim > const &A)
 Compute the determinant of matrix A. More...
 
template<typename DataT , int Dim>
void dilate (blitz::Array< DataT, Dim > const &data, blitz::Array< DataT, Dim > &result, std::vector< blitz::TinyVector< BlitzIndexT, Dim > > const &strel, iRoCS::ProgressReporter *progress=NULL)
 Morphological dilation. More...
 
double distance (BSpline< double > const &spline, double x, double &u)
 Compute the distance and the corresponding curve position of the given point to the spline. More...
 
template<int Dim>
double distance (BSpline< blitz::TinyVector< double, Dim > > const &spline, blitz::TinyVector< double, Dim > const &x, double &u)
 Compute the distance and the corresponding curve position of the given point to the spline. More...
 
template<typename T >
dot (SparseVector< T > const &v1, SparseVector< T > const &v2)
 
template<typename T >
dot (blitz::Array< T, 1 > const &v1, SparseVector< T > const &v2)
 
template<typename T >
dot (SparseVector< T > const &v1, blitz::Array< T, 1 > const &v2)
 
template<typename T , int Dim>
dot (blitz::TinyVector< T, Dim > const &v1, SparseVector< T > const &v2)
 
template<typename T , int Dim>
dot (SparseVector< T > const &v1, blitz::TinyVector< T, Dim > const &v2)
 
template<typename DataT >
double dot (blitz::Array< DataT, 1 > const &vec1, blitz::Array< DataT, 1 > const &vec2)
 Calculation of the inner product (dot product) of the given vectors. More...
 
template<int Dim>
blitz::TinyVector< double, Dim > drawRandomVector (const blitz::TinyVector< double, Dim > &maxValue)
 Draw random vector from a uniform distribution with given upper bound (lower bound is zero) More...
 
template<int Dim>
blitz::TinyVector< double, Dim > drawRandomVector (const blitz::TinyVector< double, Dim > &mean, const blitz::TinyMatrix< double, Dim, Dim > &cov)
 Draw a random vector from a gaussian random variable with given mean and covariance matrix. More...
 
double dTikhonovCutoffRegularizer (double value, std::vector< double > const &parameters)
 
double dTikhonovRegularizer (double value, std::vector< double > const &parameters)
 
double dTotalVariationCutoffRegularizer (double value, std::vector< double > const &parameters)
 
double dTotalVariationRegularizer (double value, std::vector< double > const &parameters)
 
template<int Dim>
void eigenvalueDecompositionRealSymmetric (blitz::TinyMatrix< double, Dim, Dim > const &A, blitz::TinyVector< double, Dim > &lambda, SortingType sort=Descending)
 Computation of the eigen value decomposition of real symmetric matrices. More...
 
template<int Dim>
void eigenvalueDecompositionRealSymmetric (blitz::TinyMatrix< double, Dim, Dim > const &A, blitz::TinyMatrix< double, Dim, Dim > &U, blitz::TinyVector< double, Dim > &lambda, SortingType sort=Descending)
 Computation of the eigen value decomposition of real symmetric matrices. More...
 
void eigenvalueDecompositionRealSymmetric (blitz::Array< double, 2 > const &A, blitz::Array< double, 2 > &U, blitz::Array< double, 1 > &lambda, SortingType sort=Descending)
 Computation of the eigen value decomposition of real symmetric matrices. More...
 
double erfbase (const double x, ErrorFunctionType type=Erf)
 General evaluation of erf, erfc and erfcx, where erf is the error function given as: More...
 
template<typename DataT , int Dim>
void erode (blitz::Array< DataT, Dim > const &data, blitz::Array< DataT, Dim > &result, std::vector< blitz::TinyVector< BlitzIndexT, Dim > > const &strel, iRoCS::ProgressReporter *progress=NULL)
 Morphological erosion. More...
 
template<typename DataT , int Dim>
blitz::TinyVector< DataT, Dim+1 > euclideanToHomogeneous (blitz::TinyVector< DataT, Dim > const &pos)
 Convert the given vector to homogeneous coordinates. More...
 
blitz::TinyVector< double, 3 > euclideanToSpherical (blitz::TinyVector< double, 3 > const &eucl, blitz::Array< double, 2 > const &trafo)
 Get the spherical (theta, phi, r) coordinates of the given euclidean point. More...
 
blitz::TinyVector< double, 3 > euclideanToSpherical (blitz::TinyVector< double, 3 > const &eucl)
 Get the spherical (theta, phi, r) coordinates of the given euclidean point. More...
 
template<int Dim>
blitz::TinyVector< double, Dim > evaluateTPS (const blitz::TinyVector< double, Dim > &x, const std::vector< blitz::TinyVector< double, Dim > > &controlPoints, const blitz::Array< double, 2 > &coeffs)
 Given a set of controlPoints and a coefficient matrix as computed with computeTPSParameters(), evaluate the thin plate spline at position x. More...
 
double extendedDistance (BSpline< double > const &spline, double x, double &u, double lBound=0.0, double uBound=1.0)
 Compute the distance and the corresponding curve position of the given point to the spline. More...
 
template<int Dim>
double extendedDistance (BSpline< blitz::TinyVector< double, Dim > > const &spline, blitz::TinyVector< double, Dim > const &x, double &u, double lBound=0.0, double uBound=1.0)
 Compute the distance and the corresponding curve position of the given point to the spline. More...
 
template<typename Type , typename IndexT , int Dim>
void extractLocalMaxima (blitz::Array< Type, Dim > const &data, std::list< blitz::TinyVector< IndexT, Dim > > &localMaxima, NHood nh=COMPLEX_NHOOD, iRoCS::ProgressReporter *progress=NULL)
 Extraction of local maxima of a blitz::Array. More...
 
template<typename Type , typename IndexT , int Dim>
void extractLocalMaxima (blitz::Array< Type, Dim > const &data, std::list< blitz::TinyVector< IndexT, Dim > > &localMaxima, Type const &minValue, NHood nh=COMPLEX_NHOOD, iRoCS::ProgressReporter *progress=NULL)
 Extraction of local maxima of a blitz::Array. More...
 
template<typename Type , typename IndexT , int Dim>
void extractLocalMaxima (blitz::Array< Type, Dim > const &data, std::vector< blitz::TinyVector< IndexT, Dim > > &localMaxima, NHood nh=COMPLEX_NHOOD, iRoCS::ProgressReporter *progress=NULL)
 Extraction of local maxima of a blitz::Array. More...
 
template<typename Type , typename IndexT , int Dim>
void extractLocalMaxima (blitz::Array< Type, Dim > const &data, std::vector< blitz::TinyVector< IndexT, Dim > > &localMaxima, Type const &minValue, NHood nh=COMPLEX_NHOOD, iRoCS::ProgressReporter *progress=NULL)
 Extraction of local maxima of a blitz::Array. More...
 
double factorialFraction (int n, int k)
 Compute the value of expression $\frac{n!}{k!}$. More...
 
template<typename DataT , int Dim>
void fillHolesGray (blitz::Array< DataT, Dim > const &data, blitz::Array< DataT, Dim > &result, typename Neighborhood< Dim >::Type nh=Neighborhood< Dim >::Complex, iRoCS::ProgressReporter *pr=NULL)
 Morphological hole filling for gray value data. More...
 
template<typename DataT , int Dim>
void filterDericheAlongDim (blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< DataT, Dim > &filtered, double sigmaUm, int dim, BoundaryTreatmentType btType=ValueBT, DataT const &boundaryValue=traits< DataT >::zero, iRoCS::ProgressReporter *pr=NULL)
 
void fitSplineToPointCloud (BSpline< double > &spline, std::vector< double > const &u, std::vector< double > const &points)
 Fitting of a spline curve to scalar data. More...
 
template<int Dim>
void fitSplineToPointCloud (BSpline< blitz::TinyVector< double, Dim > > &spline, std::vector< double > const &u, std::vector< blitz::TinyVector< double, Dim > > const &points)
 Fitting of a spline curve to vectorial data. More...
 
void fitSplineToSpline (BSpline< double > &spline, BSpline< double > const &reference)
 Fitting of a spline curve to another spline curve. More...
 
template<int Dim>
void fitSplineToSpline (BSpline< blitz::TinyVector< double, Dim > > &spline, BSpline< blitz::TinyVector< double, Dim > > const &reference)
 Fitting of a spline curve to another spline curve. More...
 
double gaussian (double x, double mu, double sigma)
 Evaluate the Gaussian distribution with mean mu and standard deviation sigma at position x. More...
 
template<typename DataT , int Dim>
void gaussian (blitz::Array< DataT, Dim > &gauss, blitz::TinyVector< double, Dim > const &sigmaUm, blitz::TinyVector< double, Dim > const &elementSizeUm, int flags=DEFAULT)
 Calculate gaussian with non-uniform standard deviation sigmaUm. More...
 
template<typename DataT , int Dim>
void gaussian (Array< DataT, Dim > &gauss, blitz::TinyVector< double, Dim > const &sigmaUm, int flags=DEFAULT)
 Calculate gaussian with non-uniform standard deviation sigmaUm. More...
 
double gaussianDerivative (double x, double mu, double sigma, int d)
 Evaluate the Gaussian derivative of degree d with mean mu and standard deviation sigma at position x. More...
 
template<typename DataT , int Dim>
void gaussianDerivative (blitz::Array< DataT, Dim > &gauss, blitz::TinyVector< double, Dim > const &sigmaUm, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::TinyVector< int, Dim > const &d, int flags=DEFAULT)
 Compute gaussian partial derivative filter according to specification given in d. More...
 
template<typename DataT , int Dim>
void gaussianDerivative (Array< DataT, Dim > &gauss, blitz::TinyVector< double, Dim > const &sigmaUm, blitz::TinyVector< int, Dim > const &d, int flags=DEFAULT)
 Compute gaussian partial derivative filter according to specification given in d. More...
 
double gaussRandomNumber (const double mean, const double stddev)
 Compute a normally distributed random variable, with given mean and standard deviation. More...
 
template<typename DataT , int Dim>
blitz::TinyVector< DataT, Dim-1 > homogeneousToEuclidean (blitz::TinyVector< DataT, Dim > const &pos)
 Convert the given homogeneous vector to euclidean coordinates. More...
 
void houghTransform (Array< float, 3 > const &data, Array< float, 3 > &response, Array< float, 3 > &radiusUm, blitz::TinyVector< double, 2 > const &radiusRangeUm, double radiusStepUm, double minMagnitude=0.0, bool invertGradients=false, iRoCS::ProgressReporter *pr=NULL)
 Compute spherical hough transform using Gradient voting. More...
 
template<typename DataT , typename IndexT , int Dim>
DataT interpolate (blitz::Array< DataT, Dim > const &data, blitz::TinyVector< IndexT, Dim > const &pos, InterpolationType ipType=LinearIP, BoundaryTreatmentType btType=ValueBT, DataT const &boundaryValue=traits< DataT >::zero)
 Interpolation within an n-dimensional blitz::Array. More...
 
void invert (blitz::Array< double, 2 > const &A, blitz::Array< double, 2 > &Ainv)
 Compute the inverse of matrix A. More...
 
blitz::Array< double, 2 > invert (blitz::Array< double, 2 > const &A)
 Compute the inverse of matrix A. More...
 
template<int Dim>
blitz::TinyMatrix< double, Dim, Dim > invert (blitz::TinyMatrix< double, Dim, Dim > const &A)
 Compute the inverse of matrix A. More...
 
template<typename DataT >
blitz::Array< DataT, 2 > mmMult (blitz::Array< DataT, 2 > const &A, blitz::Array< DataT, 2 > const &B)
 Naive matrix multiplication A * B = C. More...
 
template<typename DataT , int Dim1, int Dim2, int Dim3>
blitz::TinyMatrix< DataT, Dim1, Dim3 > mmMult (blitz::TinyMatrix< DataT, Dim1, Dim2 > const &A, blitz::TinyMatrix< DataT, Dim2, Dim3 > const &B)
 Naive matrix multiplication A * B = C. More...
 
ptrdiff_t modulo (ptrdiff_t a, ptrdiff_t b)
 Strictly positive modulo, to compute valid indices for Array access modulo Array size. More...
 
template<int Dim>
blitz::TinyVector< ptrdiff_t, Dim > modulo (blitz::TinyVector< ptrdiff_t, Dim > const &a, blitz::TinyVector< ptrdiff_t, Dim > const &b)
 Strictly positive vectorial modulo, to compute valid indices for Array access modulo Array size. More...
 
template<typename MatrixT , typename BaseT , int Dim>
blitz::TinyVector< BaseT, Dim > mvMult (MatrixT const &m, blitz::TinyVector< BaseT, Dim > const &v)
 Quadratic Matrix * Vector product (generic). More...
 
template<typename BaseT , int Dim>
blitz::TinyVector< BaseT, Dim > mvMult (blitz::Array< BaseT, 2 > const &m, blitz::TinyVector< BaseT, Dim > const &v)
 Quadratic Matrix * Vector product. More...
 
template<typename BaseT >
blitz::Array< BaseT, 1 > mvMult (blitz::Array< BaseT, 2 > const &m, blitz::Array< BaseT, 1 > const &v)
 Matrix * Vector product. More...
 
template<typename ScalarT , int Dim>
void normalize (blitz::Array< ScalarT, Dim > const &data, blitz::Array< ScalarT, Dim > &dataNorm, NormType t)
 Normalize a blitz::Array. More...
 
double normalizedHermitePolynomial (double x, double sigma, int d)
 Evaluate the normalized Hermite polynomial $\tilde{H}$ at position x. More...
 
template<typename DataT , int Dim>
void open (blitz::Array< DataT, Dim > const &data, blitz::Array< DataT, Dim > &result, std::vector< blitz::TinyVector< BlitzIndexT, Dim > > const &strel, iRoCS::ProgressReporter *progress=NULL)
 Morphological opening. More...
 
template<typename T >
SparseVector< T > operator* (SparseVector< T > const &v, T const &alpha)
 
template<typename T >
SparseVector< T > operator* (T const &alpha, SparseVector< T > const &v)
 
template<typename CoeffT >
Polynomial< CoeffT > operator* (const Polynomial< CoeffT > &p1, const Polynomial< CoeffT > &p2)
 Multiplication operator. More...
 
template<typename CoeffT >
Polynomial< CoeffT > operator* (const Polynomial< CoeffT > &p, const CoeffT &alpha)
 Multiplication operator. More...
 
template<typename CoeffT >
Polynomial< CoeffT > operator* (const CoeffT &alpha, const Polynomial< CoeffT > &p)
 Multiplication operator. More...
 
template<typename CoeffT >
Polynomial< CoeffT > operator+ (const Polynomial< CoeffT > &p1, const Polynomial< CoeffT > &p2)
 Plus operator. More...
 
template<typename CoeffT >
Polynomial< CoeffT > operator- (const Polynomial< CoeffT > &p1, const Polynomial< CoeffT > &p2)
 Minus operator. More...
 
template<typename CoeffT >
Polynomial< CoeffT > operator/ (const Polynomial< CoeffT > &p, const CoeffT &alpha)
 Division operator. More...
 
std::ostream & operator<< (std::ostream &os, SDMagFeatureIndex const &index)
 
template<typename KeyT , typename ContentT >
std::ostream & operator<< (std::ostream &os, BasicTreeNode< KeyT, ContentT > const &n)
 
template<int Dim>
std::ostream & operator<< (std::ostream &os, Polyline< Dim > const &polyline)
 Insert a pretty-printed version of the polyline into the given stream. More...
 
template<typename CoeffT >
std::ostream & operator<< (std::ostream &os, const Polynomial< CoeffT > &p)
 Pretty printer. More...
 
template<typename ControlPointT >
std::ostream & operator<< (std::ostream &os, BSpline< ControlPointT > const &spline)
 Pretty print operator for stream output of B-Splines. More...
 
std::ostream & operator<< (std::ostream &os, Nucleus const &nc)
 Appends a string representation of the given Nucleus to the given output stream. More...
 
template<typename DataT , int Dim1, int Dim2>
blitz::TinyMatrix< DataT, Dim1, Dim2 > outerProduct (blitz::TinyVector< DataT, Dim1 > const &vec1, blitz::TinyVector< DataT, Dim2 > const &vec2)
 Calculation of the outer product of two vectors. More...
 
template<typename CoeffT >
Polynomial< CoeffT > pow (const Polynomial< CoeffT > &p, int exponential)
 Power operator. More...
 
template<typename DataT >
blitz::TinyVector< DataT, 3 > rotate (blitz::TinyVector< DataT, 3 > const &vec, blitz::TinyVector< DataT, 3 > const &axis, DataT angle)
 Rotate the given 3-D vector by a specified angle angle around the given axis. More...
 
template<typename DataT >
void sortElements (blitz::TinyVector< DataT, 3 > &v, SortingType sort)
 Sort the values of the given TinyVector according to the given SortingType. More...
 
template<int Dim>
std::vector< blitz::TinyVector< BlitzIndexT, Dim > > sphericalStructuringElement (blitz::TinyVector< double, Dim > const &elementSizeUm, double radiusUm)
 Generate a spherical neighborhood for morphological operations. More...
 
blitz::TinyVector< double, 3 > sphericalToEuclidean (blitz::TinyVector< double, 3 > const &spherical, blitz::Array< double, 2 > const &trafo)
 Get the euclidean (z, y, x) coordinates of the given point on the 2-sphere. More...
 
blitz::TinyVector< double, 3 > sphericalToEuclidean (blitz::TinyVector< double, 3 > const &spherical)
 Get the euclidean (z, y, x) coordinates of the given point on the 2-sphere. More...
 
template<typename DataT >
void STderiv (const blitz::Array< DataT, 3 > &data, std::map< SDMagFeatureIndex, blitz::Array< DataT, 3 > *> &out, const double sigma, const int laplace, const BlitzIndexT maxBand)
 Wrapper method for computing spherical tensorial derivative magnitude features. More...
 
template<typename DataT >
void STderiv (Array< DataT, 3 > const &data, std::map< SDMagFeatureIndex, Array< DataT, 3 > *> &out, double sigma, int laplace, BlitzIndexT maxBand)
 Wrapper method for computing spherical tensorial derivative magnitude features. More...
 
template<typename DataT >
void STderiv (Array< DataT, 3 > const &data, std::map< SDMagFeatureIndex, Array< DataT, 3 > > &sdFeatures, double sigma, int laplace, BlitzIndexT maxBand)
 Wrapper method for computing spherical tensorial derivative magnitude features. More...
 
void STderivReal (double *in, BlitzIndexT sz[], BlitzIndexT L, double *out, double factor=1.0)
 Compute real spherical derivatives of the tensor with given rank (band). More...
 
double tikhonovCutoffRegularizer (double value, std::vector< double > const &parameters)
 
double tikhonovRegularizer (double value, std::vector< double > const &parameters)
 
template<typename DataT , int Dim>
void tophat (blitz::Array< DataT, Dim > const &data, blitz::TinyVector< double, Dim > const &elementSizeUm, blitz::Array< DataT, Dim > &result, double radiusUm, iRoCS::ProgressReporter *progress=NULL)
 Morphological top-hat filter. More...
 
double totalVariationCutoffRegularizer (double value, std::vector< double > const &parameters)
 
double totalVariationRegularizer (double value, std::vector< double > const &parameters)
 
template<int Dim>
double tpsDistance (const blitz::TinyVector< double, Dim > &p1, const blitz::TinyVector< double, Dim > &p2)
 Compute the TPS distance between point p1 on point p2. More...
 
template<typename DataT , int Dim1, int Dim2>
blitz::TinyMatrix< DataT, Dim2, Dim1 > transpose (blitz::TinyMatrix< DataT, Dim1, Dim2 > const &in)
 Compute the transpose of the given Matrix. More...
 
template<typename DataT >
blitz::Array< DataT, 2 > transpose (blitz::Array< DataT, 2 > const &in)
 Compute the transpose of the given Matrix. More...
 

Variables

static bool const controlPointsUpdatePerpendicularToSpline = false
 
static bool const dataTermUsePerpendicularPointsOnly = false
 
const int DEFAULT = 0x00000000
 
static bool const doLineSearch = false
 
const int FORCESAMPLING = 0x00000004
 
const int NORESIZE = 0x00000002
 
const int NORMALIZE = 0x00000001
 
static bool const normalizeGradient = true
 
static bool const regrid = true
 
static bool const weighCurvatureWithSplineLength = true
 

Typedef Documentation

◆ BlitzIndexT

typedef int atb::BlitzIndexT

The native integer type for indexing blitz++ Arrays.

Definition at line 56 of file TypeTraits.hh.

Enumeration Type Documentation

◆ ErrorFunctionType

Enumerator
Erf 
ErfC 
ErfCX 

Definition at line 42 of file ATBDataSynthesis.hh.

◆ SortingType

Enumerator
None 
Ascending 
Descending 
AbsAscending 
AbsDescending 

Definition at line 48 of file ATBLinAlg.hh.

◆ NHood [1/2]

enum atb::NHood
Enumerator
SIMPLE_NHOOD 
COMPLEX_NHOOD 
SIMPLE_NHOOD 
COMPLEX_NHOOD 

Definition at line 50 of file ATBMorphology.hh.

◆ BoundaryTreatmentType

BoundaryTreatment.hh "libArrayToolbox/BoundaryTreatment.hh".

The BoundaryTreatmentType enum contains entries for all implemented boundary treatments.

Enumerator
ValueBT 

Treat positions beyond the Array domain as having a constant value.

CyclicBT 

Treat values beyond the Array as if the Array continues cyclically at the boundaries.

This means every coordinate passed is regarded modulo the Array extents.

RepeatBT 

Always pick the closest in-Array position to the position passed.

Therefore pixels at the boundaries are virtually repeated.

MirrorBT 

Mirror out-of-Array coordinates at the Array boundaries to get in-Array indices and values.

CropBT 

Don't use out-of-bounds pixels at all.

This is strictly spoken no boundary treatment. It's a filtering mode in which out-of-bounds pixels are just not used. If the kernel domain is no subset of the Array domain, the response will be divided by the fraction of the kernel that did not contribute. This makes some sense for smoothing kernels, but should be used with care.

Definition at line 52 of file BoundaryTreatment.hh.

◆ InterpolationType

Interpolator.hh "libArrayToolbox/Interpolator.hh".

The InterpolatorType enum contains entries for all implemented interpolation strategies when accessing sub-pixel positions within an Array.

Enumerator
NearestIP 

Return the pixel value of the closest Array pixel to the query position (nearest neighbor interpolation)

LinearIP 

Interpolate linearly between the values of adjacent pixels (d-linear interpolation)

CubicIP 

Fit a cubic function through the local neighborhood around the query position and return it's value at the query position.

(d-cubic interpolation)

MinimumIP 

Return the minimum of adjacent pixel values.

If integer positions are queried the value at the given position is returned

MaximumIP 

Return the maximum of adjacent pixel values.

If integer positions are queried the value at the given position is returned

MedianIP 

Return the median of adjacent pixel values.

If integer positions are queried the value at the given position is returned

Definition at line 59 of file Interpolator.hh.

◆ NHood [2/2]

enum atb::NHood
Enumerator
SIMPLE_NHOOD 
COMPLEX_NHOOD 
SIMPLE_NHOOD 
COMPLEX_NHOOD 

Definition at line 35 of file LocalMaximumExtraction.hh.

◆ NormType

Enumerator
MINMAX 
STDDEV 
ZERO_MEAN_STDDEV 

Definition at line 37 of file Normalization.hh.

Function Documentation

◆ operator<<() [1/6]

template<typename KeyT , typename ContentT >
std::ostream& atb::operator<< ( std::ostream &  os,
BasicTreeNode< KeyT, ContentT > const &  n 
)

Definition at line 156 of file ATBBasicTree.hh.

Referenced by atb::SDMagFeatureIndex::operator<(), and atb::Nucleus::operator<().

◆ tikhonovRegularizer()

double atb::tikhonovRegularizer ( double  value,
std::vector< double > const &  parameters 
)

◆ dTikhonovRegularizer()

double atb::dTikhonovRegularizer ( double  value,
std::vector< double > const &  parameters 
)

◆ totalVariationRegularizer()

double atb::totalVariationRegularizer ( double  value,
std::vector< double > const &  parameters 
)

◆ dTotalVariationRegularizer()

double atb::dTotalVariationRegularizer ( double  value,
std::vector< double > const &  parameters 
)

◆ tikhonovCutoffRegularizer()

double atb::tikhonovCutoffRegularizer ( double  value,
std::vector< double > const &  parameters 
)

◆ dTikhonovCutoffRegularizer()

double atb::dTikhonovCutoffRegularizer ( double  value,
std::vector< double > const &  parameters 
)

◆ totalVariationCutoffRegularizer()

double atb::totalVariationCutoffRegularizer ( double  value,
std::vector< double > const &  parameters 
)

◆ dTotalVariationCutoffRegularizer()

double atb::dTotalVariationCutoffRegularizer ( double  value,
std::vector< double > const &  parameters 
)

◆ erfbase()

double atb::erfbase ( const double  x,
ErrorFunctionType  type = Erf 
)

General evaluation of erf, erfc and erfcx, where erf is the error function given as:

\[\mathrm{erf}(x) = \frac{1}{\sqrt(\pi)} \cdot \int_0^x e^{-t^2} ,\mathrm{d}t\]

erfc is the complementary error function:

\[\mathrm{erfc}(x) = 1 - \mathrm{erf}(x)\]

and erfcx is the scaled complementary error function

\[\mathrm{erfcx}(x) = e^{x^2} \cdot \mathrm{erfc}(x)\]

Parameters
xThe position to evaluate the error function at.
typeThe type of error function to evaulate
Returns
The function value at the specified position

◆ gaussian() [1/3]

double atb::gaussian ( double  x,
double  mu,
double  sigma 
)
inline

Evaluate the Gaussian distribution with mean mu and standard deviation sigma at position x.

If the standard deviation is zero the function returns 1 if x equals mu, 0 otherwise (use with care!).

\[\mathcal{G}(x) := \frac{1}{\sqrt{2 \pi} \sigma} e^{ -\frac{(x - \mu)^2}{2 \sigma^2}}\]

Parameters
xThe position to evaluate the Gaussian at
muThe mean of the Gaussian
sigmaThe standard deviation of the Gaussian
Returns
The Gaussian probability for input x

Definition at line 84 of file ATBDataSynthesis.hh.

Referenced by gaussianDerivative().

◆ normalizedHermitePolynomial()

double atb::normalizedHermitePolynomial ( double  x,
double  sigma,
int  d 
)
inline

Evaluate the normalized Hermite polynomial $\tilde{H}$ at position x.

The polynomial is normalized for the generation of Gaussian derivatives with standard deviation sigma.

\[\begin{array}{rcl} \tilde{H}_0(x) & = & 1 \\ \tilde{H}_1(x) & = & \frac{1}{\sigma^2}x \\ \tilde{H}_{n+1}(x) & = & \frac{1}{\sigma^2}(x \tilde{H}_n(x) - n \tilde{H}_{n-1}(x)) \end{array}\]

Parameters
xThe position to evaluate the polynomial at
sigmaThe standard deviation of the Gaussian
dThe degree of the polynomial
Returns
The value of the normalized Hermite polynomial at position x

Definition at line 111 of file ATBDataSynthesis.hh.

Referenced by gaussianDerivative().

◆ gaussianDerivative() [1/3]

double atb::gaussianDerivative ( double  x,
double  mu,
double  sigma,
int  d 
)
inline

Evaluate the Gaussian derivative of degree d with mean mu and standard deviation sigma at position x.

\[\frac{\mathrm{d}^d}{\mathrm{d}x^d} \mathcal{G}(x) := \frac{1}{\sqrt{2 \pi} \sigma} \mathcal{H}_{d,\sigma}(x - \mu) \cdot e^{-\frac{(x - \mu)^2}{2 \sigma^2}}\]

where $\mathcal{H}_{d,\sigma}(x)$ is the normalized Hermite polynomial.

Parameters
xThe position to evaluate the Gaussian at
muThe mean of the Gaussian
sigmaThe standard deviation of the Gaussian
Returns
The Gaussian probability for input x
See also
normalizedHermitePolynomial()

Definition at line 141 of file ATBDataSynthesis.hh.

◆ gaussian() [2/3]

template<typename DataT , int Dim>
void atb::gaussian ( blitz::Array< DataT, Dim > &  gauss,
blitz::TinyVector< double, Dim > const &  sigmaUm,
blitz::TinyVector< double, Dim > const &  elementSizeUm,
int  flags = DEFAULT 
)

Calculate gaussian with non-uniform standard deviation sigmaUm.

If sigmaUm is below the elementSize, the sampling will be replaced by actual integration over the pixel area to retain the Integral which may lead to artifacts when using the gaussian as a filter kernel. This has to be investigated further. You can enforce sampling in any case by giving the FORCESAMPLING flag

Parameters
gaussThe output Array to store the gaussian to (if noresize is not given, it will be resized to fit the gaussian to an extent of 3 * sigmaUm in any direction)
sigmaUmStandard deviation of the gaussian in either direction in micrometers
elementSizeThe gaussian parameters are assumed to be in micron so to render an appropriate gaussian for your Array data provide the element size here
flagsThe following flags can be given:
NORESIZE - Preserve the given output Array dimensions
NORMALIZE - The sum of the sampled Gaussian will be normalized to one before returning it

◆ gaussian() [3/3]

template<typename DataT , int Dim>
void atb::gaussian ( Array< DataT, Dim > &  gauss,
blitz::TinyVector< double, Dim > const &  sigmaUm,
int  flags = DEFAULT 
)

Calculate gaussian with non-uniform standard deviation sigmaUm.

If sigmaUm is below the elementSize, the sampling will be replaced by actual integration over the pixel area to retain the Integral which may lead to artifacts when using the gaussian as a filter kernel. This has to be investigated further. You can enforce sampling in any case by giving the FORCESAMPLING flag

Parameters
gaussThe output Array to store the gaussian to (if noresize is not given, it will be resized to fit the gaussian to an extent of 3 * sigmaUm in any direction)
sigmaUmStandard deviation of the gaussian in either direction in micrometers
flagsThe following flags can be given:
NORESIZE - Preserve the given output Array dimensions
NORMALIZE - The sum of the sampled Gaussian will be normalized to one before returning it

◆ gaussianDerivative() [2/3]

template<typename DataT , int Dim>
void atb::gaussianDerivative ( blitz::Array< DataT, Dim > &  gauss,
blitz::TinyVector< double, Dim > const &  sigmaUm,
blitz::TinyVector< double, Dim > const &  elementSizeUm,
blitz::TinyVector< int, Dim > const &  d,
int  flags = DEFAULT 
)

Compute gaussian partial derivative filter according to specification given in d.

Parameters
gaussThe output Array to store the gaussian to (if noresize is not given, it will be resized to fit the gaussian to an extent of 3 * sigmaUm in any direction)
sigmaUmStandard deviations of the gaussian in micron. The resulting filter will be anisotropic but aligned to the axes. This is the usual case for anisotropic element sizes
elementSizeThe gaussian parameters are assumed to be in micron so to render an appropriate gaussian derivative for your Array data provide the element size here
dThe partial derivative specification. Each entry in this vector indicates the degree of the derivative along the corresponding direction. Example: Dim = 3, d = (2, 1, 0) generates a filter corresponding to

\[\frac{\partial^3}{\partial x_0^2 \partial x_1} \mathcal{G}_{\mu, \sigma}(\vec{x})\]

flagsThe following flags can be given:
NORESIZE - Preserve the given output Array dimensions

◆ gaussianDerivative() [3/3]

template<typename DataT , int Dim>
void atb::gaussianDerivative ( Array< DataT, Dim > &  gauss,
blitz::TinyVector< double, Dim > const &  sigmaUm,
blitz::TinyVector< int, Dim > const &  d,
int  flags = DEFAULT 
)

Compute gaussian partial derivative filter according to specification given in d.

Parameters
gaussThe output Array to store the gaussian to (if noresize is not given, it will be resized to fit the gaussian to an extent of 3 * sigmaUm in any direction)
sigmaUmStandard deviations of the gaussian in micron. The resulting filter will be anisotropic but aligned to the axes. This is the usual case for anisotropic element sizes
dThe partial derivative specification. Each entry in this vector indicates the degree of the derivative along the corresponding direction. Example: Dim = 3, d = (2, 1, 0) generates a filter corresponding to

\[\frac{\partial^3}{\partial x_0^2 \partial x_1} \mathcal{G}_{\mu, \sigma}(\vec{x})\]

flagsThe following flags can be given:
NORESIZE - Preserve the given output Array dimensions

◆ atb_gsl_error_handler()

void atb::atb_gsl_error_handler ( char const *  reason,
char const *  file,
int  line,
int  gsl_errno 
)

Default Arraytoolbox_Qt4 GSL error handler.

This function converts any thrown gsl error into a corresponding ArrayToolbox_Qt4_Error and throws it.

Parameters
reasonA buffer to hold the error string
fileThe file causing the error
lineThe line that caused the error
gsl_errnoThe GSL error code
Exceptions
ArrayToolbox_Qt4_ErrorThis exception is thrown when calling this function, containing a string representation of the provided GSL error data

◆ factorialFraction()

double atb::factorialFraction ( int  n,
int  k 
)

Compute the value of expression $\frac{n!}{k!}$.

Instead of explicitely computing the factorials, they are first cancelled out against each other as far as possible, resulting in the following implementation:

\[\frac{n!}{k!} = \prod_{i=k+1}^{n} i\]

Parameters
nArgument of the factorial of the numerator
kArgument of the factorial of the denominator
Returns
$\frac{n!}{k!}$

◆ modulo() [1/2]

ptrdiff_t atb::modulo ( ptrdiff_t  a,
ptrdiff_t  b 
)

Strictly positive modulo, to compute valid indices for Array access modulo Array size.

\[(a \;\mathrm{mod}\; b) \in \mathds{N}\]

The given and returned integers are ptrdiff_t, because that's the index type of blitz Arrays, but the function will bail out if a negative modulus is given, and will only return positive integers.

Parameters
aAn integer (lefthandside of the modulo operator)
bA positive integer (The base)
Returns
$(a \;\mathrm{mod}\; b) \in \mathds{N}$

◆ modulo() [2/2]

template<int Dim>
blitz::TinyVector<ptrdiff_t,Dim> atb::modulo ( blitz::TinyVector< ptrdiff_t, Dim > const &  a,
blitz::TinyVector< ptrdiff_t, Dim > const &  b 
)

Strictly positive vectorial modulo, to compute valid indices for Array access modulo Array size.

\[\forall i \in \{1, \ldots, \mathds{Dim}\}: (a_i \;\mathrm{mod}\; b_i) \in \mathds{N}\]

The given and returned integers are ptrdiff_t, because that's the index type of blitz Arrays, but the function will bail out if a negative modulus is given, and will only return positive integers.

Parameters
aAn integer-Vector (lefthandside of the modulo operator)
bA positive integer-Vector (The base)
Returns
$(a \;\mathrm{mod}\; b) \in \mathds{N}$

◆ euclideanToHomogeneous()

template<typename DataT , int Dim>
blitz::TinyVector<DataT,Dim+1> atb::euclideanToHomogeneous ( blitz::TinyVector< DataT, Dim > const &  pos)

Convert the given vector to homogeneous coordinates.

Parameters
posEuclidean vector to convert
Returns
The homogeneous representation of the given vector

◆ homogeneousToEuclidean()

template<typename DataT , int Dim>
blitz::TinyVector<DataT,Dim-1> atb::homogeneousToEuclidean ( blitz::TinyVector< DataT, Dim > const &  pos)

Convert the given homogeneous vector to euclidean coordinates.

Parameters
posHomogeneous vector to convert
Returns
The equivalent euclidean representation of the vector

◆ euclideanToSpherical() [1/2]

blitz::TinyVector<double,3> atb::euclideanToSpherical ( blitz::TinyVector< double, 3 > const &  eucl,
blitz::Array< double, 2 > const &  trafo 
)

Get the spherical (theta, phi, r) coordinates of the given euclidean point.

Parameters
euclThe euclidean coordinates (z, y, x) of the point to transform
trafoA homogeneous transformation to apply to the euclidean position prior to spherical transformation. Basically the transform should consist of a translation to fix the sphere center and a rotation to define the sphere orientation and zero meridian.
Returns
The (theta, phi, r) vector corresponding to the euclidean point

◆ euclideanToSpherical() [2/2]

blitz::TinyVector<double,3> atb::euclideanToSpherical ( blitz::TinyVector< double, 3 > const &  eucl)

Get the spherical (theta, phi, r) coordinates of the given euclidean point.

Parameters
euclThe euclidean coordinates (z, y, x) of the point to transform
Returns
The (theta, phi, r) vector corresponding to the euclidean point

◆ sphericalToEuclidean() [1/2]

blitz::TinyVector<double,3> atb::sphericalToEuclidean ( blitz::TinyVector< double, 3 > const &  spherical,
blitz::Array< double, 2 > const &  trafo 
)

Get the euclidean (z, y, x) coordinates of the given point on the 2-sphere.

Parameters
sphericalThe spherical coordinates (theta, phi, r) of the point to transform
trafoA homogeneous transformation to apply the inverse to the euclidean position after spherical back-transformation. Basically the transform should consist of a translation to fix the sphere center and a rotation to define the sphere orientation and zero meridian.
Returns
The euclidean (z, y, x) vector corresponding to the spherical point relative to the given sphere parameters

◆ sphericalToEuclidean() [2/2]

blitz::TinyVector<double,3> atb::sphericalToEuclidean ( blitz::TinyVector< double, 3 > const &  spherical)

Get the euclidean (z, y, x) coordinates of the given point on the 2-sphere.

Parameters
sphericalThe spherical coordinates (theta, phi, r) of the point to transform
Returns
The euclidean (z, y, x) vector corresponding to the spherical point

◆ rotate()

template<typename DataT >
blitz::TinyVector<DataT,3> atb::rotate ( blitz::TinyVector< DataT, 3 > const &  vec,
blitz::TinyVector< DataT, 3 > const &  axis,
DataT  angle 
)

Rotate the given 3-D vector by a specified angle angle around the given axis.

Parameters
vecThe vector to rotate
axisThe rotation axis
angleThe rotation angle in radians
Returns
The rotated vector

◆ dot() [1/6]

template<typename DataT >
double atb::dot ( blitz::Array< DataT, 1 > const &  vec1,
blitz::Array< DataT, 1 > const &  vec2 
)

◆ outerProduct()

template<typename DataT , int Dim1, int Dim2>
blitz::TinyMatrix<DataT,Dim1,Dim2> atb::outerProduct ( blitz::TinyVector< DataT, Dim1 > const &  vec1,
blitz::TinyVector< DataT, Dim2 > const &  vec2 
)

Calculation of the outer product of two vectors.

Parameters
vec1Left hand side vector
vec2Right hand side vector
Returns
The matrix containing the outer product of vec1 and vec2

◆ transpose() [1/2]

template<typename DataT , int Dim1, int Dim2>
blitz::TinyMatrix<DataT,Dim2,Dim1> atb::transpose ( blitz::TinyMatrix< DataT, Dim1, Dim2 > const &  in)

Compute the transpose of the given Matrix.

Parameters
inThe Matrix to transpose
Returns
The transpose of in

◆ transpose() [2/2]

template<typename DataT >
blitz::Array<DataT,2> atb::transpose ( blitz::Array< DataT, 2 > const &  in)

Compute the transpose of the given Matrix.

Make sure to resize the matrix to store the transpose to appropriately before using this function.

Parameters
inThe Matrix to transpose
Returns
The transpose of in

◆ mvMult() [1/3]

template<typename MatrixT , typename BaseT , int Dim>
blitz::TinyVector<BaseT,Dim> atb::mvMult ( MatrixT const &  m,
blitz::TinyVector< BaseT, Dim > const &  v 
)

Quadratic Matrix * Vector product (generic).

Warning matrix bounds are not checked, and the Matrix class must overload the operator()(int, int) for indexing the Matrix entries

Parameters
mThe left hand side quadratic matrix
vThe right hand side vector (is handled as column vector)
Returns
The resulting vector from the product

Referenced by atb::STLFileWriter::drawSphere(), and segmentation::MahalanobisDistance< T >::operator()().

◆ mvMult() [2/3]

template<typename BaseT , int Dim>
blitz::TinyVector<BaseT,Dim> atb::mvMult ( blitz::Array< BaseT, 2 > const &  m,
blitz::TinyVector< BaseT, Dim > const &  v 
)

Quadratic Matrix * Vector product.

Parameters
mThe left hand side quaratic matrix
vThe right hand side vector (is handled as column vector)
Returns
The resulting vector from the product

◆ mvMult() [3/3]

template<typename BaseT >
blitz::Array<BaseT,1> atb::mvMult ( blitz::Array< BaseT, 2 > const &  m,
blitz::Array< BaseT, 1 > const &  v 
)

Matrix * Vector product.

Make sure to resize the vector to store the result to appropriately before using this function.

Parameters
mThe left hand side matrix
vThe right hand side vector (is handled as column vector)
Returns
The resulting vector from the product

◆ mmMult() [1/2]

template<typename DataT >
blitz::Array<DataT,2> atb::mmMult ( blitz::Array< DataT, 2 > const &  A,
blitz::Array< DataT, 2 > const &  B 
)

Naive matrix multiplication A * B = C.

Make sure to resize the matrix to store the result appropriately before using this function.

Parameters
Aleft hand side matrix
Bright hand side matrix
Returns
The matrix product A * B

◆ mmMult() [2/2]

template<typename DataT , int Dim1, int Dim2, int Dim3>
blitz::TinyMatrix<DataT,Dim1,Dim3> atb::mmMult ( blitz::TinyMatrix< DataT, Dim1, Dim2 > const &  A,
blitz::TinyMatrix< DataT, Dim2, Dim3 > const &  B 
)

Naive matrix multiplication A * B = C.

Parameters
Aleft hand side matrix
Bright hand side matrix
Returns
The matrix product A * B

◆ invert() [1/3]

void atb::invert ( blitz::Array< double, 2 > const &  A,
blitz::Array< double, 2 > &  Ainv 
)

Compute the inverse of matrix A.

Parameters
AThe matrix to compute the inverse of
AinvThe inverse of matrix A

Referenced by segmentation::NormalPDF< T >::invertCovariance().

◆ invert() [2/3]

blitz::Array<double,2> atb::invert ( blitz::Array< double, 2 > const &  A)

Compute the inverse of matrix A.

Parameters
AThe matrix to compute the inverse of
Returns
The inverse of matrix A (make sure that the Array you assign the inverse to is resized properly

◆ invert() [3/3]

template<int Dim>
blitz::TinyMatrix<double,Dim,Dim> atb::invert ( blitz::TinyMatrix< double, Dim, Dim > const &  A)

Compute the inverse of matrix A.

Parameters
AThe matrix to compute the inverse of
Returns
The inverse of matrix A

◆ determinant()

template<int Dim>
double atb::determinant ( blitz::TinyMatrix< double, Dim, Dim > const &  A)

Compute the determinant of matrix A.

Parameters
AThe matrix to compute the determinant for
Returns
The determinant of matrix A

◆ eigenvalueDecompositionRealSymmetric() [1/3]

template<int Dim>
void atb::eigenvalueDecompositionRealSymmetric ( blitz::TinyMatrix< double, Dim, Dim > const &  A,
blitz::TinyVector< double, Dim > &  lambda,
SortingType  sort = Descending 
)

Computation of the eigen value decomposition of real symmetric matrices.

This version only returns the eigenvalues.

Parameters
AA real symmetric matrix to compute the eigenvalues and vectors of
lambdaVector to hold the computed eigenvalues
sortThe eigenvalue sorting strategy

◆ computeEigenvectors()

template<int Dim>
void atb::computeEigenvectors ( blitz::TinyMatrix< double, Dim, Dim > const &  A,
blitz::TinyMatrix< double, Dim, Dim > &  U,
blitz::TinyVector< double, Dim > const &  lambda 
)

Computates the eigenvectors of the real symmetric matrix A given the eigenvalues.

Parameters
AA real symmetric matrix to compute the eigenvalues and vectors of
UThe matrix of eigenvectors
lambdaVector to hold the computed eigenvalues

◆ eigenvalueDecompositionRealSymmetric() [2/3]

template<int Dim>
void atb::eigenvalueDecompositionRealSymmetric ( blitz::TinyMatrix< double, Dim, Dim > const &  A,
blitz::TinyMatrix< double, Dim, Dim > &  U,
blitz::TinyVector< double, Dim > &  lambda,
SortingType  sort = Descending 
)

Computation of the eigen value decomposition of real symmetric matrices.

It is computed using the GSL function gsl_eigen_symmv.

Parameters
AA real symmetric matrix to compute the eigenvalues and vectors of
UMatrix to hold the computed eigenvectors. The eigenvectors correspond to the columns of the U-matrix
lambdaVector to hold the computed eigenvalues
sortThe eigenvalue sorting strategy

◆ sortElements()

template<typename DataT >
void atb::sortElements ( blitz::TinyVector< DataT, 3 > &  v,
SortingType  sort 
)

Sort the values of the given TinyVector according to the given SortingType.

Parameters
vThe vector to sort
sortThe SortingType to apply

◆ eigenvalueDecompositionRealSymmetric() [3/3]

void atb::eigenvalueDecompositionRealSymmetric ( blitz::Array< double, 2 > const &  A,
blitz::Array< double, 2 > &  U,
blitz::Array< double, 1 > &  lambda,
SortingType  sort = Descending 
)

Computation of the eigen value decomposition of real symmetric matrices.

It is computed using the GSL function gsl_eigen_symmv.

Parameters
AA real symmetric matrix to compute the eigenvalue and vectors of
UMatrix to hold the computed eigenvectors. The eigenvectors correspond to the columns of the U-matrix.
lambdaVector to hold the computed eigenvalues
sortThe eigenvalue sorting strategy

◆ sphericalStructuringElement()

template<int Dim>
std::vector< blitz::TinyVector<BlitzIndexT,Dim> > atb::sphericalStructuringElement ( blitz::TinyVector< double, Dim > const &  elementSizeUm,
double  radiusUm 
)

Generate a spherical neighborhood for morphological operations.

The reference point is the center of the sphere.

Parameters
elementSizeUmThe element size of the Array to apply the filter to. The structuring element will be spherical wrt. the given element size
radiusUmThe radius of the structuring element in micrometers
Returns
The points within the spherical neighborhood

◆ dilate()

template<typename DataT , int Dim>
void atb::dilate ( blitz::Array< DataT, Dim > const &  data,
blitz::Array< DataT, Dim > &  result,
std::vector< blitz::TinyVector< BlitzIndexT, Dim > > const &  strel,
iRoCS::ProgressReporter progress = NULL 
)

Morphological dilation.

Bright structures are extended using the maximum operation over the given structuring element.

Parameters
dataThe Array to apply the filter to
resultThe output Array the result will be written to. This can be the same Array as the input Array.
strelThe structuring element
progressProgress of the filter will be reported to the given ProgressReporter.

◆ erode()

template<typename DataT , int Dim>
void atb::erode ( blitz::Array< DataT, Dim > const &  data,
blitz::Array< DataT, Dim > &  result,
std::vector< blitz::TinyVector< BlitzIndexT, Dim > > const &  strel,
iRoCS::ProgressReporter progress = NULL 
)

Morphological erosion.

Dark structures are extended using the minimum operation over the given structuring element.

Parameters
dataThe Array to apply the filter to
resultThe output Array the result will be written to. This can be the same Array as the input Array.
strelThe structuring element
progressProgress of the filter will be reported to the given ProgressReporter.

◆ open()

template<typename DataT , int Dim>
void atb::open ( blitz::Array< DataT, Dim > const &  data,
blitz::Array< DataT, Dim > &  result,
std::vector< blitz::TinyVector< BlitzIndexT, Dim > > const &  strel,
iRoCS::ProgressReporter progress = NULL 
)

Morphological opening.

Dilation after Erosion using the given structuring element.

Parameters
dataThe Array to apply the filter to
resultThe output Array the result will be written to. This can be the same Array as the input Array.
strelThe structuring element
progressProgress of the filter will be reported to the given ProgressReporter.

◆ close()

template<typename DataT , int Dim>
void atb::close ( blitz::Array< DataT, Dim > const &  data,
blitz::Array< DataT, Dim > &  result,
std::vector< blitz::TinyVector< BlitzIndexT, Dim > > const &  strel,
iRoCS::ProgressReporter progress = NULL 
)

Morphological closing.

Erosion after Dilation using the given structuring element.

Parameters
dataThe Array to apply the filter to
resultThe output Array the result will be written to. This can be the same Array as the input Array.
strelThe structuring element
progressProgress of the filter will be reported to the given ProgressReporter.

◆ tophat()

template<typename DataT , int Dim>
void atb::tophat ( blitz::Array< DataT, Dim > const &  data,
blitz::TinyVector< double, Dim > const &  elementSizeUm,
blitz::Array< DataT, Dim > &  result,
double  radiusUm,
iRoCS::ProgressReporter progress = NULL 
)

Morphological top-hat filter.

Computes data - open(data). This is useful for background removal, when searching for small structures. The structure element should be a little larger, than the biggest object.

Parameters
dataThe Array to apply the filter to
resultThe output Array the result will be written to. This can be the same Array as the input Array.
strelThe structuring element
progressProgress of the filter will be reported to the given ProgressReporter.

◆ fillHolesGray()

template<typename DataT , int Dim>
void atb::fillHolesGray ( blitz::Array< DataT, Dim > const &  data,
blitz::Array< DataT, Dim > &  result,
typename Neighborhood< Dim >::Type  nh = Neighborhood< Dim >::Complex,
iRoCS::ProgressReporter pr = NULL 
)

Morphological hole filling for gray value data.

Local minima in the input image are filled so that for all pixels there is a path through the image with non-increasing intensities.

Parameters
dataThe dataset to apply the fill holes algorithm to
resultThe result of the hole filling operation
nhConnectivity of adjacant elements (Neighborhood)
Simple - all elements that share hyperplanes
Complex - all elements that share a common vertex
progressProgress of the filter will be reported to the given ProgressReporter.

◆ connectedComponentLabelling()

template<int Dim>
void atb::connectedComponentLabelling ( const blitz::Array< bool, Dim > &  data,
blitz::Array< BlitzIndexT, Dim > &  labels,
NHood  nh = COMPLEX_NHOOD,
iRoCS::ProgressReporter pr = NULL 
)

Connected component labelling of the given binary Array.

Parameters
dataBinary Array to find connected components in
labelsInteger Array the labelled regions are returned in
nhConnectivity of adjacant elements (Neighborhood)
SIMPLE_NHOOD - all elements that share hyperplanes
COMPLEX_NHOOD - all elements that share a common vertex
progressProgress of the filter will be reported to the given ProgressReporter.

◆ operator<<() [2/6]

std::ostream& atb::operator<< ( std::ostream &  os,
Nucleus const &  nc 
)

Appends a string representation of the given Nucleus to the given output stream.

Parameters
osThe stream to output the nucleus string representation
ncThe Nucleus object to dump to the stream
Returns
A reference to the output stream for operator chaining

◆ operator<<() [3/6]

template<int Dim>
std::ostream& atb::operator<< ( std::ostream &  os,
Polyline< Dim > const &  polyline 
)

Insert a pretty-printed version of the polyline into the given stream.

Parameters
osThe stream to append the polyline string to
polylineThe polyline to output to the stream
Returns
A reference to the stream for operator chaining

◆ operator+()

template<typename CoeffT >
Polynomial<CoeffT> atb::operator+ ( const Polynomial< CoeffT > &  p1,
const Polynomial< CoeffT > &  p2 
)

Plus operator.

Adds the given polynomials.

Parameters
p1The left-hand-side polynomial
p2The right-hand-side polynomial
Returns
p1 + p2

◆ operator-()

template<typename CoeffT >
Polynomial<CoeffT> atb::operator- ( const Polynomial< CoeffT > &  p1,
const Polynomial< CoeffT > &  p2 
)

Minus operator.

Subtracts p2 from p1.

Parameters
p1The left-hand-side polynomial
p2The right-hand-side polynomial
Returns
p1 - p2

◆ operator*() [1/5]

template<typename CoeffT >
Polynomial<CoeffT> atb::operator* ( const Polynomial< CoeffT > &  p1,
const Polynomial< CoeffT > &  p2 
)

Multiplication operator.

Multiplies p1 and p2.

Parameters
p1The left-hand-side polynomial
p2The right-hand-side polynomial
Returns
p1 * p2

◆ pow()

template<typename CoeffT >
Polynomial<CoeffT> atb::pow ( const Polynomial< CoeffT > &  p,
int  exponential 
)

Power operator.

Computes the exponential's power of the polynomial.

Parameters
pThe polynomial
exponentialThe exponent
Returns
$\mathrm{p}^{\mathrm{exponential}}$

Referenced by svt::Kernel_DS_TRIA< KERNEL >::k_function(), svt::Kernel_POLY::k_function(), and BlitzDataExplorer::zoom().

◆ operator*() [2/5]

template<typename CoeffT >
Polynomial<CoeffT> atb::operator* ( const Polynomial< CoeffT > &  p,
const CoeffT &  alpha 
)

Multiplication operator.

Multiplies p and alpha.

Parameters
pA polynomial
alphaA scalar value
Returns
p * alpha

◆ operator*() [3/5]

template<typename CoeffT >
Polynomial<CoeffT> atb::operator* ( const CoeffT &  alpha,
const Polynomial< CoeffT > &  p 
)

Multiplication operator.

Multiplies p and alpha.

Parameters
alphaA scalar value
pA polynomial
Returns
alpha * p

◆ operator/()

template<typename CoeffT >
Polynomial<CoeffT> atb::operator/ ( const Polynomial< CoeffT > &  p,
const CoeffT &  alpha 
)

Division operator.

Divides p by alpha.

Parameters
pA polynomial
alphaA scalar value
Returns
p / alpha

◆ operator<<() [4/6]

template<typename CoeffT >
std::ostream& atb::operator<< ( std::ostream &  os,
const Polynomial< CoeffT > &  p 
)

Pretty printer.

Parameters
osThe stream to output the polynomial to
pThe polynomial to write to the stream
Returns
A reference to the output stream for chaining

◆ operator<<() [5/6]

template<typename ControlPointT >
std::ostream& atb::operator<< ( std::ostream &  os,
BSpline< ControlPointT > const &  spline 
)

Pretty print operator for stream output of B-Splines.

Parameters
osOutput stream to append the representation of the BSpline to
splineThe spline to output
Returns
The stream for chaining

◆ fitSplineToSpline() [1/2]

void atb::fitSplineToSpline ( BSpline< double > &  spline,
BSpline< double > const &  reference 
)

Fitting of a spline curve to another spline curve.

The function alters the control point positions to make the resulting spline optimally fit the given spline regarding the mean squared error.

Parameters
splineThe output spline
referenceThe spline to be fitted

◆ fitSplineToSpline() [2/2]

template<int Dim>
void atb::fitSplineToSpline ( BSpline< blitz::TinyVector< double, Dim > > &  spline,
BSpline< blitz::TinyVector< double, Dim > > const &  reference 
)

Fitting of a spline curve to another spline curve.

The function alters the control point positions to make the resulting spline optimally fit the given spline regarding the mean squared error.

Parameters
splineThe output spline
referenceThe spline to be fitted

◆ fitSplineToPointCloud() [1/2]

void atb::fitSplineToPointCloud ( BSpline< double > &  spline,
std::vector< double > const &  u,
std::vector< double > const &  points 
)

Fitting of a spline curve to scalar data.

There must be a functional relation between u and points, thus all entries in u need to be unique otherwise the resulting system of linear equations will be singular. Another necessary condition for the fitting to work is, that each spline segment must at least have one data point to fit it to, thus the number of control points may not exceed the number of data points and they should be well distributed in the spline domain. The function alters the control point positions to make the resulting spline optimally fit the data regarding the mean squared error.

Parameters
splineThe spline to fit to the data values provided
uThe curve position of the corresponding point in the points vector.
pointsThe values to fit the spline to

◆ fitSplineToPointCloud() [2/2]

template<int Dim>
void atb::fitSplineToPointCloud ( BSpline< blitz::TinyVector< double, Dim > > &  spline,
std::vector< double > const &  u,
std::vector< blitz::TinyVector< double, Dim > > const &  points 
)

Fitting of a spline curve to vectorial data.

There must be a functional relation between u and points, thus all entries in u need to be unique otherwise the resulting system of linear equations will be singular. Another necessary condition for the fitting to work is, that each spline segment must at least have one data point to fit it to, thus the number of control points may not exceed the number of data points and they should be well distributed in the spline domain. The function alters the control point positions to make the resulting spline optimally fit the data regarding the mean squared error.

Parameters
splineThe spline to fit to the data points provided
uThe curve position of the corresponding point in the points vector.
pointsThe points to fit the spline to

◆ distance() [1/2]

double atb::distance ( BSpline< double > const &  spline,
double  x,
double &  u 
)

Compute the distance and the corresponding curve position of the given point to the spline.

Parameters
splineA spline
xA point
uThe curve position with minimum distance to x is returned in this reference
Returns
The distance between the spline and the point

◆ distance() [2/2]

template<int Dim>
double atb::distance ( BSpline< blitz::TinyVector< double, Dim > > const &  spline,
blitz::TinyVector< double, Dim > const &  x,
double &  u 
)

Compute the distance and the corresponding curve position of the given point to the spline.

Parameters
splineA spline
xA point
uThe curve position with minimum distance to x is returned in this reference
Returns
The distance between the spline and the point

◆ extendedDistance() [1/2]

double atb::extendedDistance ( BSpline< double > const &  spline,
double  x,
double &  u,
double  lBound = 0.0,
double  uBound = 1.0 
)

Compute the distance and the corresponding curve position of the given point to the spline.

This function behaves as if the spline continues as a straight line beyond the given bounds.

Parameters
splineA spline
xA point
uThe curve position with minimum distance to x is returned in this reference
lBoundThe lower bound up to which the spline behaves as a straight line
uBoundThe lower bound starting from which the spline behaves as a straight line
Returns
The distance between the spline and the point

◆ extendedDistance() [2/2]

template<int Dim>
double atb::extendedDistance ( BSpline< blitz::TinyVector< double, Dim > > const &  spline,
blitz::TinyVector< double, Dim > const &  x,
double &  u,
double  lBound = 0.0,
double  uBound = 1.0 
)

Compute the distance and the corresponding curve position of the given point to the spline.

This function behaves as if the spline continues as a straight line beyond the given bounds.

Parameters
splineA spline
xA point
uThe curve position with minimum distance to x is returned in this reference
lBoundThe lower bound up to which the spline behaves as a straight line
uBoundThe lower bound starting from which the spline behaves as a straight line
Returns
The distance between the spline and the point

◆ tpsDistance()

template<int Dim>
double atb::tpsDistance ( const blitz::TinyVector< double, Dim > &  p1,
const blitz::TinyVector< double, Dim > &  p2 
)

Compute the TPS distance between point p1 on point p2.

This function is the fundamental solution of the biharmonic equation for the according dimension. The resulting value is used to weight the influences of the control points on the current evaluation point.

Parameters
p1The first point
p2The second point
Returns
Sort of distance measure between the two points for TPS computation

◆ computeTPSParameters()

template<int Dim>
void atb::computeTPSParameters ( const std::vector< blitz::TinyVector< double, Dim > > &  source,
const std::vector< blitz::TinyVector< double, Dim > > &  target,
blitz::Array< double, 2 > &  coeffs 
)

Given two vectors of correspondending points of two datasets, compute the weights and offsets of a thin plate spline that transforms the source point set onto the target point set.

To evaluate the spline at some position the coefficient matrix has to be applied to a vector of the form $\mathbf{W} \cdot (U(\vec{s}_0, \vec{x}), ..., U(\vec{s}_n, \vec{x}), x_1, ... x_d, 1)^T$

Thus for evaluation the source points (which are in fact the spline control points) will be needed again!

The following is a test example of how to use the ATBThinplateSpline functions to compute the thin plate spline coefficients and use them for interpolation later on:

#include <ArrayToolbox.hh>
...
std::vector< blitz::TinyVector<double,3> > target;
std::vector< blitz::TinyVector<double,3> > source;
for (atb::BlitzIndexT z = 0; z < 3; ++z)
{
for (atb::BlitzIndexT y = 0; y < 3; ++y)
{
for (atb::BlitzIndexT x = 0; x < 3; ++x)
{
source.push_back(blitz::TinyVector<double,3>(z, y, x));
target.push_back(blitz::TinyVector<double,3>(z - 2, y + 1, x - 1));
}
}
}
blitz::Array<double,2> coeffs;
ATB::computeTPSParameters(source, target, coeffs);
std::cout << coeffs << std::endl;
for (size_t i = 0; i < source.size(); ++i)
std::cout << "TPS(" << source[i] << ") = " << ATB::evaluateTPS(source[i], source, coeffs) << " should be " << target[i] << std::endl;
Parameters
sourceThe source point set (n d-D Points) to map onto the target point set
targetThe corresponding target point set (n d-D Points)
coeffsThe $(n + d + 1 \times 3)$ coefficient matrix

◆ evaluateTPS()

template<int Dim>
blitz::TinyVector<double,Dim> atb::evaluateTPS ( const blitz::TinyVector< double, Dim > &  x,
const std::vector< blitz::TinyVector< double, Dim > > &  controlPoints,
const blitz::Array< double, 2 > &  coeffs 
)

Given a set of controlPoints and a coefficient matrix as computed with computeTPSParameters(), evaluate the thin plate spline at position x.

To evaluate the spline at some position the coefficient matrix has to be applied to a vector of the form $\mathbf{W} \cdot (U(\vec{s}_0, \vec{x}), ..., U(\vec{s}_n, \vec{x}), x_1, ... x_d, 1)^T$

The following is a test example of how to use the ATBThinplateSpline functions to compute the thin plate spline coefficients and use them for interpolation later on:

#include <ArrayToolbox.hh>
...
std::vector< blitz::TinyVector<double,3> > target;
std::vector< blitz::TinyVector<double,3> > source;
for (atb::BlitzIndexT z = 0; z < 3; ++z)
{
for (atb::BlitzIndexT y = 0; y < 3; ++y)
{
for (atb::BlitzIndexT x = 0; x < 3; ++x)
{
source.push_back(blitz::TinyVector<double,3>(z, y, x));
target.push_back(blitz::TinyVector<double,3>(z - 2, y + 1, x - 1));
}
}
}
blitz::Array<double,2> coeffs;
ATB::computeTPSParameters(source, target, coeffs);
std::cout << coeffs << std::endl;
for (size_t i = 0; i < source.size(); ++i)
std::cout << "TPS(" << source[i] << ") = " << ATB::evaluateTPS(source[i], source, coeffs) << " should be " << target[i] << std::endl;
Parameters
x(d-D point) Position to evaluate the spline at
controlPointsThe control points (d-D) (corresponds to source in computeTPSParameters())
coeffsThe $(n + d + 1 \times 3)$ coefficient matrix
Returns
The position the point x is mapped to by the spline interpolator

◆ filterDericheAlongDim()

template<typename DataT , int Dim>
void atb::filterDericheAlongDim ( blitz::Array< DataT, Dim > const &  data,
blitz::TinyVector< double, Dim > const &  elementSizeUm,
blitz::Array< DataT, Dim > &  filtered,
double  sigmaUm,
int  dim,
BoundaryTreatmentType  btType = ValueBT,
DataT const &  boundaryValue = traits< DataT >::zero,
iRoCS::ProgressReporter pr = NULL 
)

◆ computeHoughTransform() [1/3]

template<typename DataT >
void atb::computeHoughTransform ( const blitz::Array< DataT, 3 > &  data,
std::vector< blitz::Array< double, 3 > * > &  houghmaps,
std::vector< blitz::Array< double, 3 > * > &  houghmapsR,
const double  rMin,
const double  rMax,
const double  rStep,
const double  preSmoothing,
const double  postSmoothing,
const double  minMagnitude 
)

Fast implementation of the spherical hough transform for non-overlapping spheres.

Deprecated:
Parameters
dataThe raw gray values to search spherical structures in
houghmapsIn this vector the two houghmaps for each gradient direction are returned
houghmapsRThe corresponding radius maps are returned here
rMinMinimum radius
rMaxMaximum radius
rStepRadius increment
preSmoothingstandard deviation of the gaussian derivative that is used as derivative operator
postSmoothingThe houghmaps will be smoothed with a gaussian of the standard deviation given here to regularize the result and reduce spurious detections
minMagnitudeOnly gradient magnitudes above the threshold provided may vote

◆ computeHoughTransform() [2/3]

template<typename DataT >
void atb::computeHoughTransform ( const Array< DataT, 3 > &  data,
std::vector< Array< double, 3 > * > &  houghmaps,
std::vector< Array< double, 3 > * > &  houghmapsR,
const double  rMin,
const double  rMax,
const double  rStep,
const double  preSmoothing,
const double  postSmoothing,
const double  minMagnitude 
)

Fast implementation of the spherical hough transform for non-overlapping spheres.

Deprecated:
Parameters
dataThe raw gray values to search spherical structures in
houghmapsIn this vector the two houghmaps for each gradient direction are returned
houghmapsRThe corresponding radius maps are returned here
rMinMinimum radius
rMaxMaximum radius
rStepRadius increment
preSmoothingstandard deviation of the gaussian derivative that is used as derivative operator
postSmoothingThe houghmaps will be smoothed with a gaussian of the standard deviation given here to regularize the result and reduce spurious detections
minMagnitudeOnly gradient magnitudes above the threshold provided may vote

◆ computeHoughTransform() [3/3]

template<typename DataT >
void atb::computeHoughTransform ( const Array< DataT, 3 > &  data,
std::map< int, Array< double, 3 > > &  houghFeatures,
const double  rMin,
const double  rMax,
const double  rStep,
const double  preSmoothing,
const double  postSmoothing,
const double  minMagnitude 
)

Fast implementation of the spherical hough transform for non-overlapping spheres.

This is the variant used in the iRoCS Toolbox by the iRoCS::Features class.

Parameters
dataThe raw gray values to search spherical structures in
houghFeaturesThe map to store the houghmaps for positive and negative gradient direction to. It will contain the following map entries after successful execution:
  • 1 ==> Voting map for forward gradient voting (PositiveMagnitude)
  • 2 ==> Voting map for reverse gradient voting (NegativeMagnitude)
  • 3 ==> Radii for forward gradient voting (PositiveRadius)
  • 4 ==> Radii for reverse gradient voting (NegativeRadius)
Existing map entries with these keys will be overwritten, the rest of the map is untouched.
rMinMinimum radius
rMaxMaximum radius
rStepRadius increment
preSmoothingstandard deviation of the gaussian derivative that is used as derivative operator
postSmoothingThe houghmaps will be smoothed with a gaussian of the standard deviation given here to regularize the result and reduce spurious detections
minMagnitudeOnly gradient magnitudes above the threshold provided may vote

◆ houghTransform()

void atb::houghTransform ( Array< float, 3 > const &  data,
Array< float, 3 > &  response,
Array< float, 3 > &  radiusUm,
blitz::TinyVector< double, 2 > const &  radiusRangeUm,
double  radiusStepUm,
double  minMagnitude = 0.0,
bool  invertGradients = false,
iRoCS::ProgressReporter pr = NULL 
)

Compute spherical hough transform using Gradient voting.

Parameters
dataThe raw gray values to search spherical structures in
responseThe magnitude of the hough response
radiusUmThe corresponding structure radii in micrometers
radiusRangeUmThe radius search range in micrometers
radiusStepUmThe radius search step in micrometers
minMagnitudeOnly gradients with magnitudes greater than this threshold may cast votes
invertGradientsIf given the gradients cast votes in the opposite direction resulting in high responses for dark spheres on bright background
prIf given progress is reported using this progress reporter

◆ interpolate()

template<typename DataT , typename IndexT , int Dim>
DataT atb::interpolate ( blitz::Array< DataT, Dim > const &  data,
blitz::TinyVector< IndexT, Dim > const &  pos,
InterpolationType  ipType = LinearIP,
BoundaryTreatmentType  btType = ValueBT,
DataT const &  boundaryValue = traits< DataT >::zero 
)

Interpolation within an n-dimensional blitz::Array.

This function creates a new Interpolator object for accessing the Array position. If you want to query many positions you should explicitely create an Interpolator object instead and use its get() method. To create an Interpolator object for your data you can use the InterpolatorFactory.

Parameters
dataThe array a data element will be interpolated from
posA TinyVector containing the subpixel position the value will be interpolated for
ipTypeThe interpolation type
btTypeThe border treatment type
boundaryValueThe out-of-Array value when btType == Value
Returns
The interpolated value for position pos in data block data
See also
InterpolatorFactory, Interpolator

◆ extractLocalMaxima() [1/4]

template<typename Type , typename IndexT , int Dim>
void atb::extractLocalMaxima ( blitz::Array< Type, Dim > const &  data,
std::list< blitz::TinyVector< IndexT, Dim > > &  localMaxima,
NHood  nh = COMPLEX_NHOOD,
iRoCS::ProgressReporter progress = NULL 
)

Extraction of local maxima of a blitz::Array.

Parameters
dataThe blitz::Array to search maxima in
localMaximaA list of TinyVectors, the local Minima are appended to
nhNeighborhood to compare to. Possible values are
SIMPLE_NHOOD - only direct neighbors along the axes (4-nhood in 2-D)
COMPLEX_NHOOD - all pixels having a common vertex with the current (8-nhood in 2-D, 26-nhood in 3-D)
progressIf desired a progress reporter can be attached. All output will be redirected to the progress reporter and the progress will be updated regularly

◆ extractLocalMaxima() [2/4]

template<typename Type , typename IndexT , int Dim>
void atb::extractLocalMaxima ( blitz::Array< Type, Dim > const &  data,
std::list< blitz::TinyVector< IndexT, Dim > > &  localMaxima,
Type const &  minValue,
NHood  nh = COMPLEX_NHOOD,
iRoCS::ProgressReporter progress = NULL 
)

Extraction of local maxima of a blitz::Array.

Parameters
dataThe blitz::Array to search maxima in
localMaximaA list of TinyVectors, the local Minima are appended to
minValueOnly local maxima with value above minValue will be added to the list (optional, if not given all local maxima are returned)
nhNeighborhood to compare to. Possible values are
SIMPLE_NHOOD - only direct neighbors along the axes (4-nhood in 2-D)
COMPLEX_NHOOD - all pixels having a common vertex with the current (8-nhood in 2-D, 26-nhood in 3-D)
progressIf desired a progress reporter can be attached. All output will be redirected to the progress reporter and the progress will be updated regularly

◆ extractLocalMaxima() [3/4]

template<typename Type , typename IndexT , int Dim>
void atb::extractLocalMaxima ( blitz::Array< Type, Dim > const &  data,
std::vector< blitz::TinyVector< IndexT, Dim > > &  localMaxima,
NHood  nh = COMPLEX_NHOOD,
iRoCS::ProgressReporter progress = NULL 
)

Extraction of local maxima of a blitz::Array.

Parameters
dataThe blitz::Array to search maxima in
localMaximaA vector of TinyVectors, the local Minima are appended to
nhNeighborhood to compare to. Possible values are
SIMPLE_NHOOD - only direct neighbors along the axes (4-nhood in 2-D)
COMPLEX_NHOOD - all pixels having a common vertex with the current (8-nhood in 2-D, 26-nhood in 3-D)
progressIf desired a progress reporter can be attached. All output will be redirected to the progress reporter and the progress will be updated regularly

◆ extractLocalMaxima() [4/4]

template<typename Type , typename IndexT , int Dim>
void atb::extractLocalMaxima ( blitz::Array< Type, Dim > const &  data,
std::vector< blitz::TinyVector< IndexT, Dim > > &  localMaxima,
Type const &  minValue,
NHood  nh = COMPLEX_NHOOD,
iRoCS::ProgressReporter progress = NULL 
)

Extraction of local maxima of a blitz::Array.

Parameters
dataThe blitz::Array to search maxima in
localMaximaA vector of TinyVectors, the local Minima are appended to
minValueOnly local maxima with value above minValue will be added to the list (optional, if not given all local maxima are returned)
nhNeighborhood to compare to. Possible values are
SIMPLE_NHOOD - only direct neighbors along the axes (4-nhood in 2-D)
COMPLEX_NHOOD - all pixels having a common vertex with the current (8-nhood in 2-D, 26-nhood in 3-D)
progressIf desired a progress reporter can be attached. All output will be redirected to the progress reporter and the progress will be updated regularly

◆ normalize()

template<typename ScalarT , int Dim>
void atb::normalize ( blitz::Array< ScalarT, Dim > const &  data,
blitz::Array< ScalarT, Dim > &  dataNorm,
NormType  t 
)

Normalize a blitz::Array.

Parameters
dataThe Array to normalize the gray values
dataNormThe Array the normalized data will be stored to. You may give the same Array for data and dataNorm!
tNormalization Type, one of: MINMAX, STDDEV, ZERO_MEAN_STDDEV
Exceptions
ArrayToolsError

◆ gaussRandomNumber()

double atb::gaussRandomNumber ( const double  mean,
const double  stddev 
)

Compute a normally distributed random variable, with given mean and standard deviation.

Parameters
meanMean of the gaussian distribution to draw a sample of
stddevStandard Deviation of the gaussian distribution to draw a sample of
Returns
A sample point drawn from a normal distribution

◆ drawRandomVector() [1/2]

template<int Dim>
blitz::TinyVector<double,Dim> atb::drawRandomVector ( const blitz::TinyVector< double, Dim > &  maxValue)

Draw random vector from a uniform distribution with given upper bound (lower bound is zero)

Parameters
maxValueThe upper bound of the vector components
Returns
A random vector from a uniform distribution

◆ drawRandomVector() [2/2]

template<int Dim>
blitz::TinyVector<double,Dim> atb::drawRandomVector ( const blitz::TinyVector< double, Dim > &  mean,
const blitz::TinyMatrix< double, Dim, Dim > &  cov 
)

Draw a random vector from a gaussian random variable with given mean and covariance matrix.

Parameters
meanMean of the gaussian distribution
covCovariance matrix of the gaussian distribution
Returns
A random vector drawn from the gaussian distribution

◆ dot() [2/6]

template<typename T >
T atb::dot ( SparseVector< T > const &  v1,
SparseVector< T > const &  v2 
)

◆ dot() [3/6]

template<typename T >
T atb::dot ( blitz::Array< T, 1 > const &  v1,
SparseVector< T > const &  v2 
)

◆ dot() [4/6]

template<typename T >
T atb::dot ( SparseVector< T > const &  v1,
blitz::Array< T, 1 > const &  v2 
)

◆ dot() [5/6]

template<typename T , int Dim>
T atb::dot ( blitz::TinyVector< T, Dim > const &  v1,
SparseVector< T > const &  v2 
)

◆ dot() [6/6]

template<typename T , int Dim>
T atb::dot ( SparseVector< T > const &  v1,
blitz::TinyVector< T, Dim > const &  v2 
)

◆ operator*() [4/5]

template<typename T >
SparseVector<T> atb::operator* ( SparseVector< T > const &  v,
T const &  alpha 
)

◆ operator*() [5/5]

template<typename T >
SparseVector<T> atb::operator* ( T const &  alpha,
SparseVector< T > const &  v 
)

◆ operator<<() [6/6]

std::ostream& atb::operator<< ( std::ostream &  os,
SDMagFeatureIndex const &  index 
)

◆ STderivReal()

void atb::STderivReal ( double *  in,
BlitzIndexT  sz[],
BlitzIndexT  L,
double *  out,
double  factor = 1.0 
)

Compute real spherical derivatives of the tensor with given rank (band).

(c) 2010 Marco Reisert, University of Freiburg.

Remarks:

  • complex numbers are stored interleaved.
  • rank 0 tensor has also to be complex, i.e. of real dimension (2, sz[0],sz[1],sz[2])
  • m-indices of spherical tensor are negative and reversed, i.e. -(L-1),-(L-2)...,0
Parameters
involume of size (L*2 , sz[0], sz[1], sz[2])
szsize array of length 3
Lrank of input, rank of spherical tensor is L-1
outpreallocated output volume of size ((L+1)*2, sz[0], sz[1], sz[2])
factorresult is multiplied by this real factor

Referenced by atb::SDMagFeatureIndex::operator<().

◆ STderiv() [1/3]

template<typename DataT >
void atb::STderiv ( const blitz::Array< DataT, 3 > &  data,
std::map< SDMagFeatureIndex, blitz::Array< DataT, 3 > *> &  out,
const double  sigma,
const int  laplace,
const BlitzIndexT  maxBand 
)

Wrapper method for computing spherical tensorial derivative magnitude features.

Parameters
dataThe input Array to compute voxelwise features for
outThe features sorted by the SDMagFeatureIndex
sigmaThe current feature scale (only for SDMagFeatureIndex)
laplaceThe number of laplacians that have been applied before (only for SDMagFeatureIndex)
maxBandThe maximum expansion band

Referenced by atb::SDMagFeatureIndex::operator<().

◆ STderiv() [2/3]

template<typename DataT >
void atb::STderiv ( Array< DataT, 3 > const &  data,
std::map< SDMagFeatureIndex, Array< DataT, 3 > *> &  out,
double  sigma,
int  laplace,
BlitzIndexT  maxBand 
)

Wrapper method for computing spherical tensorial derivative magnitude features.

Deprecated:
Parameters
dataThe input Array to compute voxelwise features for
outThe features sorted by the SDMagFeatureIndex
sigmaThe current feature scale (only for SDMagFeatureIndex)
laplaceThe number of laplacians that have been applied before (only for SDMagFeatureIndex)
maxBandThe maximum expansion band

◆ STderiv() [3/3]

template<typename DataT >
void atb::STderiv ( Array< DataT, 3 > const &  data,
std::map< SDMagFeatureIndex, Array< DataT, 3 > > &  sdFeatures,
double  sigma,
int  laplace,
BlitzIndexT  maxBand 
)

Wrapper method for computing spherical tensorial derivative magnitude features.

This function is used in iRoCS::Features to compute the Schmidt semi-normalized solid harmonic features.

Parameters
dataThe input Array to compute voxelwise features for
outThe features sorted by the SDMagFeatureIndex
sigmaThe current feature scale (only for SDMagFeatureIndex)
laplaceThe number of laplacians that have been applied before (only for SDMagFeatureIndex)
maxBandThe maximum expansion band

Variable Documentation

◆ dataTermUsePerpendicularPointsOnly

bool const atb::dataTermUsePerpendicularPointsOnly = false
static

Definition at line 41 of file ATBCoupledBSplineModel.hh.

◆ controlPointsUpdatePerpendicularToSpline

bool const atb::controlPointsUpdatePerpendicularToSpline = false
static

Definition at line 42 of file ATBCoupledBSplineModel.hh.

◆ normalizeGradient

bool const atb::normalizeGradient = true
static

Definition at line 43 of file ATBCoupledBSplineModel.hh.

◆ doLineSearch

bool const atb::doLineSearch = false
static

Definition at line 44 of file ATBCoupledBSplineModel.hh.

◆ regrid

bool const atb::regrid = true
static

Definition at line 48 of file ATBCoupledBSplineModel.hh.

◆ weighCurvatureWithSplineLength

bool const atb::weighCurvatureWithSplineLength = true
static

Definition at line 50 of file ATBCoupledBSplineModel.hh.

◆ DEFAULT

const int atb::DEFAULT = 0x00000000

Definition at line 37 of file ATBDataSynthesis.hh.

◆ NORMALIZE

const int atb::NORMALIZE = 0x00000001

Definition at line 38 of file ATBDataSynthesis.hh.

◆ NORESIZE

const int atb::NORESIZE = 0x00000002

Definition at line 39 of file ATBDataSynthesis.hh.

◆ FORCESAMPLING

const int atb::FORCESAMPLING = 0x00000004

Definition at line 40 of file ATBDataSynthesis.hh.