ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itk::RieszRotationMatrix< VImageDimension > Class Template Reference

#include <itkRieszRotationMatrix.h>

Detailed Description

template<unsigned int VImageDimension>
class itk::RieszRotationMatrix< VImageDimension >

Get a steerable matrix for the Riesz transform: \( S_r \) from a rotation matrix R in the spatial domain, and the order of the Riesz transform (T) \( T f( R*x ) = T_{S_r} f(x) \)

\( S_r \) is a MxM matrix, where \( M = p(N,d) \) is the number of components of a riesz transform of order N and dimension d.

\[ M := p(N,d) = \frac{(N+d-1)!}{(d-1)! N!} \]

The rotation matrix is a dxd matrix of real type.

See also
RieszFrequencyFunction
RieszFrequencyFilterBankGenerator

Definition at line 49 of file itkRieszRotationMatrix.h.

+ Inheritance diagram for itk::RieszRotationMatrix< VImageDimension >:
+ Collaboration diagram for itk::RieszRotationMatrix< VImageDimension >:

Public Types

using ComplexImageType = itk::Image<ValueType, VImageDimension>
 
using IndicesArrayType = std::vector<unsigned int>
 
using IndicesMatrix = std::vector<IndicesMatrixRow>
 
using IndicesMatrixRow = std::vector<IndicesVector>
 
using IndicesVector = std::vector<IndicesArrayType>
 
using InternalMatrixType = typename Superclass::InternalMatrixType
 
using RealType = typename ValueType::value_type
 
using Self = RieszRotationMatrix
 
using SpatialRotationMatrixType = itk::Matrix<RealType, VImageDimension, VImageDimension>
 
using Superclass = itk::VariableSizeMatrix<ValueType>
 
using ValueType = std::complex<double>
 
- Public Types inherited from itk::VariableSizeMatrix< std::complex< double > >
using ComponentType
 
using InternalMatrixType
 
using Self
 
using ValueType
 

Public Member Functions

const InternalMatrixType & ComputeSteerableMatrix ()
 
IndicesMatrix GenerateIndicesMatrix ()
 
const unsigned int & GetComponents () const
 
const bool & GetDebug () const
 
const RealType & GetMaxAbsoluteDifferenceCloseToZero () const
 
const unsigned int & GetOrder () const
 
const SpatialRotationMatrixType & GetSpatialRotationMatrix () const
 
template<typename TInputValue>
VariableSizeMatrix< TInputValue > MultiplyWithColumnMatrix (const VariableSizeMatrix< TInputValue > &vect) const
 
template<typename TInputValue>
std::vector< TInputValue > MultiplyWithVector (const std::vector< TInputValue > &vect) const
 
template<typename TImage>
std::vector< typename TImage::Pointer > MultiplyWithVectorOfImages (const std::vector< typename TImage::Pointer > &vect) const
 
 RieszRotationMatrix ()
 
 RieszRotationMatrix (const Self &matrix)
 
 RieszRotationMatrix (const SpatialRotationMatrixType &spatialRotationMatrix, const unsigned int &order)
 
void SetDebug (const bool &boolean)
 
void SetDebugOff ()
 
void SetDebugOn ()
 
void SetMaxAbsoluteDifferenceCloseToZero (const RealType &maxAbsoluteDifference)
 
void SetOrder (const unsigned int &order)
 
void SetSpatialRotationMatrix (const SpatialRotationMatrixType &spatialRotationMatrix)
 
- Public Member Functions inherited from itk::VariableSizeMatrix< std::complex< double > >
unsigned int Cols () const
 
void Fill (const std::complex< double > &value)
 
vnl_matrix< std::complex< double > > GetInverse () const
 
vnl_matrix< std::complex< double > > GetTranspose () const
 
InternalMatrixType & GetVnlMatrix ()
 
const InternalMatrixType & GetVnlMatrix () const
 
 ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION (Self)
 
std::complex< double > & operator() (unsigned int row, unsigned int col)
 
const std::complex< double > & operator() (unsigned int row, unsigned int col) const
 
Array< std::complex< double > > operator* (const Array< std::complex< double > > &vect) const
 
Self operator* (const Self &matrix) const
 
Self operator* (const std::complex< double > &value) const
 
vnl_matrix< std::complex< double > > operator* (const vnl_matrix< std::complex< double > > &matrix) const
 
vnl_vector< std::complex< double > > operator* (const vnl_vector< std::complex< double > > &vc) const
 
void operator*= (const Self &matrix)
 
void operator*= (const std::complex< double > &value)
 
void operator*= (const vnl_matrix< std::complex< double > > &matrix)
 
Self operator+ (const Self &matrix) const
 
const Self & operator+= (const Self &matrix)
 
Self & operator- ()
 
Self operator- (const Self &matrix) const
 
const Self & operator-= (const Self &matrix)
 
Self operator/ (const std::complex< double > &value) const
 
void operator/= (const std::complex< double > &value)
 
Self & operator= (const Self &matrix)=default
 
Self & operator= (const vnl_matrix< std::complex< double > > &matrix)
 
bool operator== (const Self &matrix) const
 
std::complex< double > * operator[] (unsigned int i)
 
const std::complex< double > * operator[] (unsigned int i) const
 
unsigned int Rows () const
 
void SetIdentity ()
 
bool SetSize (unsigned int r, unsigned int c)
 
 VariableSizeMatrix ()
 
 VariableSizeMatrix (const Self &matrix)
 
 VariableSizeMatrix (unsigned int rows, unsigned int cols)
 

Private Types

using ResultValueType = std::complex<long double>
 

Private Attributes

unsigned int m_Components { 0 }
 
bool m_Debug { false }
 
RealType m_MaxAbsoluteDifferenceCloseToZero
 
unsigned int m_Order { 0 }
 
SpatialRotationMatrixType m_SpatialRotationMatrix
 

Member Typedef Documentation

◆ ComplexImageType

template<unsigned int VImageDimension>
using itk::RieszRotationMatrix< VImageDimension >::ComplexImageType = itk::Image<ValueType, VImageDimension>

Definition at line 61 of file itkRieszRotationMatrix.h.

◆ IndicesArrayType

template<unsigned int VImageDimension>
using itk::RieszRotationMatrix< VImageDimension >::IndicesArrayType = std::vector<unsigned int>

Typedefs for IndicesMatrix.

Definition at line 98 of file itkRieszRotationMatrix.h.

◆ IndicesMatrix

template<unsigned int VImageDimension>
using itk::RieszRotationMatrix< VImageDimension >::IndicesMatrix = std::vector<IndicesMatrixRow>

Definition at line 101 of file itkRieszRotationMatrix.h.

◆ IndicesMatrixRow

template<unsigned int VImageDimension>
using itk::RieszRotationMatrix< VImageDimension >::IndicesMatrixRow = std::vector<IndicesVector>

Definition at line 100 of file itkRieszRotationMatrix.h.

◆ IndicesVector

template<unsigned int VImageDimension>
using itk::RieszRotationMatrix< VImageDimension >::IndicesVector = std::vector<IndicesArrayType>

Definition at line 99 of file itkRieszRotationMatrix.h.

◆ InternalMatrixType

template<unsigned int VImageDimension>
using itk::RieszRotationMatrix< VImageDimension >::InternalMatrixType = typename Superclass::InternalMatrixType

Definition at line 59 of file itkRieszRotationMatrix.h.

◆ RealType

template<unsigned int VImageDimension>
using itk::RieszRotationMatrix< VImageDimension >::RealType = typename ValueType::value_type

Component value type

Definition at line 58 of file itkRieszRotationMatrix.h.

◆ ResultValueType

template<unsigned int VImageDimension>
using itk::RieszRotationMatrix< VImageDimension >::ResultValueType = std::complex<long double>
private

Definition at line 230 of file itkRieszRotationMatrix.h.

◆ Self

template<unsigned int VImageDimension>
using itk::RieszRotationMatrix< VImageDimension >::Self = RieszRotationMatrix

Standard type alias

Definition at line 53 of file itkRieszRotationMatrix.h.

◆ SpatialRotationMatrixType

template<unsigned int VImageDimension>
using itk::RieszRotationMatrix< VImageDimension >::SpatialRotationMatrixType = itk::Matrix<RealType, VImageDimension, VImageDimension>

Definition at line 60 of file itkRieszRotationMatrix.h.

◆ Superclass

template<unsigned int VImageDimension>
using itk::RieszRotationMatrix< VImageDimension >::Superclass = itk::VariableSizeMatrix<ValueType>

Definition at line 55 of file itkRieszRotationMatrix.h.

◆ ValueType

template<unsigned int VImageDimension>
using itk::RieszRotationMatrix< VImageDimension >::ValueType = std::complex<double>

Definition at line 54 of file itkRieszRotationMatrix.h.

Constructor & Destructor Documentation

◆ RieszRotationMatrix() [1/3]

template<unsigned int VImageDimension>
itk::RieszRotationMatrix< VImageDimension >::RieszRotationMatrix ( )

Default constructor.

◆ RieszRotationMatrix() [2/3]

template<unsigned int VImageDimension>
itk::RieszRotationMatrix< VImageDimension >::RieszRotationMatrix ( const Self & matrix)

Copy constructor.

◆ RieszRotationMatrix() [3/3]

template<unsigned int VImageDimension>
itk::RieszRotationMatrix< VImageDimension >::RieszRotationMatrix ( const SpatialRotationMatrixType & spatialRotationMatrix,
const unsigned int & order )

Compute constructor.

Member Function Documentation

◆ ComputeSteerableMatrix()

template<unsigned int VImageDimension>
const InternalMatrixType & itk::RieszRotationMatrix< VImageDimension >::ComputeSteerableMatrix ( )

Multi-index notation

\[ S[n = (n_1, \cdots, n_d)][m = (m_1, \cdots, m_d)] = \sqrt{\frac{m!}{n!}} \sum_{|k_1| = n_1} \cdots \sum_{|k_d| = n_d} \delta_{k_1 + \cdots + k_d, m} x \frac{n!}{k_1! \cdots k_d!} r_1^{k_1} \cdots r_d^{k_d} \]

The indices are ordered in descending order: For example, for order = 2: ( 2, 0, 0, )( 1, 1, 0, )( 1, 0, 1, )( 0, 2, 0, )( 0, 1, 1, )( 0, 0, 2, )

◆ GenerateIndicesMatrix()

template<unsigned int VImageDimension>
IndicesMatrix itk::RieszRotationMatrix< VImageDimension >::GenerateIndicesMatrix ( )

Generate a matrix-like structure of the same size than the steering matrix containing a pair of indices n,m.

Examples: 2D: order:1, components:2 S_{|n| = 1,|m| = 1} = S_{2x2} =: (1,0),(1,0) (1,0),(0,1) (0,1),(1,0) (0,1),(0,1)

3D: order:1, components:3 S_{|n| = 1,|m| = 1} = S_{3x3} =: (1,0,0),(1,0,0) (1,0,0),(0,1,0) (1,0,0),(0,0,1) (0,1,0),(1,0,0) (0,1,0),(0,1,0) (0,1,0),(0,0,1) (0,0,1),(1,0,0) (0,0,1),(0,1,0) (0,0,1),(0,0,1)

2D: order:2, components:3 S_{|n| = 2,|m| = 2} = S_{3x3} =: (2, 0),(2, 0) (2, 0),(1, 1) (2, 0),(0, 2) (1, 1),(2, 0) (1, 1),(1, 1) (1, 1),(0, 2) (0, 2),(2, 0) (0, 2),(1, 1) (0, 2),(0, 2)

Returns
the matrix with the n,m multi-index

◆ GetComponents()

template<unsigned int VImageDimension>
const unsigned int & itk::RieszRotationMatrix< VImageDimension >::GetComponents ( ) const
inline

Get the number of componets M of the steerable matrix. The size of the steerable matrix is MxM. The number of components is based on the m_Order of the Riesz transform and the dimension.

See also
RieszFrequencyFunction

Definition at line 166 of file itkRieszRotationMatrix.h.

References m_Components.

◆ GetDebug()

template<unsigned int VImageDimension>
const bool & itk::RieszRotationMatrix< VImageDimension >::GetDebug ( ) const
inline

Get/Set Debug flag to print extra information.

Definition at line 209 of file itkRieszRotationMatrix.h.

References m_Debug.

◆ GetMaxAbsoluteDifferenceCloseToZero()

template<unsigned int VImageDimension>
const RealType & itk::RieszRotationMatrix< VImageDimension >::GetMaxAbsoluteDifferenceCloseToZero ( ) const
inline

Round the computed result S[i][j] to zero if it is close enough to zero. How close is controlled by this value.

Computation requires a quite a few trivial multiplications, generating float errors. It is specially noticiable because the domain of rotations is in a small interval around zero. This tries to fix them, but there is no fit for all solution.

The default in this class: itk::NumericTraits<ValueType>::epsilon() The default in the function FloatAlmostEqual is : 0.1 * itk::NumericTraits<ValueType>::epsilon()

See also
itk::Math::FloatAlmostEqual

Definition at line 197 of file itkRieszRotationMatrix.h.

References m_MaxAbsoluteDifferenceCloseToZero.

◆ GetOrder()

template<unsigned int VImageDimension>
const unsigned int & itk::RieszRotationMatrix< VImageDimension >::GetOrder ( ) const
inline

Get/Set the order of the Riesz transform. The order modifies the number of components and the size of the steerable matrix.

See also
GetComponents
RieszFrequencyFunction

Definition at line 145 of file itkRieszRotationMatrix.h.

References m_Order.

◆ GetSpatialRotationMatrix()

template<unsigned int VImageDimension>
const SpatialRotationMatrixType & itk::RieszRotationMatrix< VImageDimension >::GetSpatialRotationMatrix ( ) const
inline

Get/Set the spatial rotation matrix from which the steerable matrix is composed.

Definition at line 173 of file itkRieszRotationMatrix.h.

References m_SpatialRotationMatrix.

◆ MultiplyWithColumnMatrix()

template<unsigned int VImageDimension>
template<typename TInputValue>
VariableSizeMatrix< TInputValue > itk::RieszRotationMatrix< VImageDimension >::MultiplyWithColumnMatrix ( const VariableSizeMatrix< TInputValue > & vect) const

◆ MultiplyWithVector()

template<unsigned int VImageDimension>
template<typename TInputValue>
std::vector< TInputValue > itk::RieszRotationMatrix< VImageDimension >::MultiplyWithVector ( const std::vector< TInputValue > & vect) const

◆ MultiplyWithVectorOfImages()

template<unsigned int VImageDimension>
template<typename TImage>
std::vector< typename TImage::Pointer > itk::RieszRotationMatrix< VImageDimension >::MultiplyWithVectorOfImages ( const std::vector< typename TImage::Pointer > & vect) const

Matrix by std::vector<TImage> multiplication. To perform the rotation with the output of RieszFrequencyFilterBankGenerator.

◆ SetDebug()

template<unsigned int VImageDimension>
void itk::RieszRotationMatrix< VImageDimension >::SetDebug ( const bool & boolean)
inline

Definition at line 214 of file itkRieszRotationMatrix.h.

References m_Debug.

◆ SetDebugOff()

template<unsigned int VImageDimension>
void itk::RieszRotationMatrix< VImageDimension >::SetDebugOff ( )
inline

Definition at line 224 of file itkRieszRotationMatrix.h.

References m_Debug.

◆ SetDebugOn()

template<unsigned int VImageDimension>
void itk::RieszRotationMatrix< VImageDimension >::SetDebugOn ( )
inline

Definition at line 219 of file itkRieszRotationMatrix.h.

References m_Debug.

◆ SetMaxAbsoluteDifferenceCloseToZero()

template<unsigned int VImageDimension>
void itk::RieszRotationMatrix< VImageDimension >::SetMaxAbsoluteDifferenceCloseToZero ( const RealType & maxAbsoluteDifference)
inline

Definition at line 202 of file itkRieszRotationMatrix.h.

References m_MaxAbsoluteDifferenceCloseToZero.

◆ SetOrder()

template<unsigned int VImageDimension>
void itk::RieszRotationMatrix< VImageDimension >::SetOrder ( const unsigned int & order)
inline

◆ SetSpatialRotationMatrix()

template<unsigned int VImageDimension>
void itk::RieszRotationMatrix< VImageDimension >::SetSpatialRotationMatrix ( const SpatialRotationMatrixType & spatialRotationMatrix)
inline

Definition at line 179 of file itkRieszRotationMatrix.h.

References m_SpatialRotationMatrix.

Member Data Documentation

◆ m_Components

template<unsigned int VImageDimension>
unsigned int itk::RieszRotationMatrix< VImageDimension >::m_Components { 0 }
private

Definition at line 233 of file itkRieszRotationMatrix.h.

Referenced by GetComponents(), and SetOrder().

◆ m_Debug

template<unsigned int VImageDimension>
bool itk::RieszRotationMatrix< VImageDimension >::m_Debug { false }
private

Definition at line 235 of file itkRieszRotationMatrix.h.

Referenced by GetDebug(), SetDebug(), SetDebugOff(), and SetDebugOn().

◆ m_MaxAbsoluteDifferenceCloseToZero

template<unsigned int VImageDimension>
RealType itk::RieszRotationMatrix< VImageDimension >::m_MaxAbsoluteDifferenceCloseToZero
private

◆ m_Order

template<unsigned int VImageDimension>
unsigned int itk::RieszRotationMatrix< VImageDimension >::m_Order { 0 }
private

Definition at line 232 of file itkRieszRotationMatrix.h.

Referenced by GetOrder(), and SetOrder().

◆ m_SpatialRotationMatrix

template<unsigned int VImageDimension>
SpatialRotationMatrixType itk::RieszRotationMatrix< VImageDimension >::m_SpatialRotationMatrix
private

Definition at line 231 of file itkRieszRotationMatrix.h.

Referenced by GetSpatialRotationMatrix(), and SetSpatialRotationMatrix().


The documentation for this class was generated from the following file: