ITK  5.2.0
Insight Toolkit
Public Types | Static Public Attributes | List of all members

#include <itkSymmetricSecondRankTensor.h>

+ Inheritance diagram for itk::SymmetricSecondRankTensor< TComponent, NDimension >:
+ Collaboration diagram for itk::SymmetricSecondRankTensor< TComponent, NDimension >:

Public Types

using AccumulateValueType = typename NumericTraits< ValueType >::RealType
 
using BaseArray = FixedArray< TComponent, Self::InternalDimension >
 
using ComponentType = TComponent
 
using EigenValuesArrayType = FixedArray< TComponent, NDimension >
 
using EigenVectorsMatrixType = Matrix< TComponent, NDimension, NDimension >
 
using MatrixType = Matrix< TComponent, NDimension, NDimension >
 
using RealValueType = typename NumericTraits< ValueType >::RealType
 
using Self = SymmetricSecondRankTensor
 
using Superclass = FixedArray< TComponent, NDimension *(NDimension+1)/2 >
 
using SymmetricEigenAnalysisType = SymmetricEigenAnalysisFixedDimension< Dimension, MatrixType, EigenValuesArrayType, EigenVectorsMatrixType >
 
using ValueType = typename Superclass::ValueType
 
- Public Types inherited from itk::FixedArray< TComponent, NDimension *(NDimension+1)/2 >
using CArray = ValueType[VLength]
 
using const_iterator = const ValueType *
 
using const_pointer = const ValueType *
 
using const_reference = const ValueType &
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using ConstIterator = const ValueType *
 
using Iterator = ValueType *
 
using iterator = ValueType *
 
using pointer = ValueType *
 
using reference = ValueType &
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using SizeType = unsigned int
 
using ValueType = TComponent
 

Static Public Attributes

static constexpr unsigned int Dimension = NDimension
 
static constexpr unsigned int InternalDimension = NDimension * (NDimension + 1) / 2
 
- Static Public Attributes inherited from itk::FixedArray< TComponent, NDimension *(NDimension+1)/2 >
static constexpr unsigned int Dimension
 
static constexpr unsigned int Length
 
using ComponentArrayType = ComponentType[Self::InternalDimension]
 
 SymmetricSecondRankTensor ()
 
 SymmetricSecondRankTensor (const SymmetricSecondRankTensor &)=default
 
 SymmetricSecondRankTensor (SymmetricSecondRankTensor &&)=default
 
SymmetricSecondRankTensoroperator= (const SymmetricSecondRankTensor &)=default
 
SymmetricSecondRankTensoroperator= (SymmetricSecondRankTensor &&)=default
 
 ~SymmetricSecondRankTensor ()=default
 
 SymmetricSecondRankTensor (const ComponentType &r)
 
template<typename TCoordRepB >
 SymmetricSecondRankTensor (const SymmetricSecondRankTensor< TCoordRepB, NDimension > &pa)
 
 SymmetricSecondRankTensor (const ComponentArrayType r)
 
template<typename TCoordRepB >
Selfoperator= (const SymmetricSecondRankTensor< TCoordRepB, NDimension > &pa)
 
Selfoperator= (const ComponentType &r)
 
Selfoperator= (const ComponentArrayType r)
 
Self operator+ (const Self &r) const
 
Self operator- (const Self &r) const
 
const Selfoperator+= (const Self &r)
 
const Selfoperator-= (const Self &r)
 
Self operator* (const RealValueType &r) const
 
Self operator/ (const RealValueType &r) const
 
const Selfoperator*= (const RealValueType &r)
 
const Selfoperator/= (const RealValueType &r)
 
ComponentType GetNthComponent (int c) const
 
void SetNthComponent (int c, const ComponentType &v)
 
ValueTypeoperator() (unsigned int row, unsigned int col)
 
const ValueTypeoperator() (unsigned int row, unsigned int col) const
 
void SetIdentity ()
 
AccumulateValueType GetTrace () const
 
void ComputeEigenValues (EigenValuesArrayType &eigenValues) const
 
void ComputeEigenAnalysis (EigenValuesArrayType &eigenValues, EigenVectorsMatrixType &eigenVectors) const
 
template<typename TMatrixValueType >
Self Rotate (const Matrix< TMatrixValueType, NDimension, NDimension > &m) const
 
template<typename TMatrixValueType >
Self Rotate (const vnl_matrix_fixed< TMatrixValueType, NDimension, NDimension > &m) const
 
template<typename TMatrixValueType >
Self Rotate (const vnl_matrix< TMatrixValueType > &m) const
 
MatrixType PreMultiply (const MatrixType &m) const
 
MatrixType PostMultiply (const MatrixType &m) const
 
static unsigned int GetNumberOfComponents ()
 

Additional Inherited Members

- Public Member Functions inherited from itk::FixedArray< TComponent, NDimension *(NDimension+1)/2 >
 FixedArray ()=default
 
 FixedArray (const FixedArray &)=default
 
 FixedArray (FixedArray &&)=default
 
 FixedArray (const ValueType r[VLength])
 
 FixedArray (const ValueType &)
 
 FixedArray (const std::array< ValueType, VLength > &stdArray)
 
 FixedArray (const FixedArray< TFixedArrayValueType, VLength > &r)
 
 FixedArray (const TScalarValue *r)
 
FixedArrayoperator= (const FixedArray &)=default
 
FixedArrayoperator= (FixedArray &&)=default
 
FixedArrayoperator= (const FixedArray< TFixedArrayValueType, VLength > &r)
 
FixedArrayoperator= (const ValueType r[VLength])
 
 ~FixedArray ()=default
 
bool operator== (const FixedArray &r) const
 
bool operator!= (const FixedArray &r) const
 
reference operator[] (short index)
 
const_reference operator[] (short index) const
 
reference operator[] (unsigned short index)
 
const_reference operator[] (unsigned short index) const
 
reference operator[] (int index)
 
const_reference operator[] (int index) const
 
reference operator[] (unsigned int index)
 
const_reference operator[] (unsigned int index) const
 
reference operator[] (long index)
 
const_reference operator[] (long index) const
 
reference operator[] (unsigned long index)
 
const_reference operator[] (unsigned long index) const
 
reference operator[] (long long index)
 
const_reference operator[] (long long index) const
 
reference operator[] (unsigned long long index)
 
const_reference operator[] (unsigned long long index) const
 
void SetElement (unsigned int index, const_reference value)
 
const_reference GetElement (unsigned int index) const
 
ValueTypeGetDataPointer ()
 
const ValueTypeGetDataPointer () const
 
ValueTypedata ()
 
const ValueTypedata () const
 
Iterator Begin ()
 
ConstIterator Begin () const
 
Iterator End ()
 
ConstIterator End () const
 
 itkLegacyMacro (ReverseIterator rBegin())
 
 itkLegacyMacro (ConstReverseIterator rBegin() const)
 
 itkLegacyMacro (ReverseIterator rEnd())
 
 itkLegacyMacro (ConstReverseIterator rEnd() const)
 
const_iterator cbegin () const noexcept
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
const_iterator cend () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator crbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
const_reverse_iterator crend () const
 
SizeType Size () const
 
constexpr SizeType size () const
 
void Fill (const ValueType &)
 
void swap (FixedArray &other)
 
- Static Public Member Functions inherited from itk::FixedArray< TComponent, NDimension *(NDimension+1)/2 >
static FixedArray Filled (const ValueType &)
 

Detailed Description

template<typename TComponent, unsigned int NDimension = 3>
class itk::SymmetricSecondRankTensor< TComponent, NDimension >

Represent a symmetric tensor of second rank.

This class implements a ND symmetric tensor of second rank.

Since SymmetricSecondRankTensor is a subclass of FixedArray, you can access its components as:

using TensorPixelType = itk::SymmetricSecondRankTensor< float >; TensorPixelType tensor;

tensor[0] = 1.233; tensor[1] = 1.456;

for convenience the indexed access is also available as

tensor(0,0) = 1.233; tensor(2,0) = 1.233;

The Tensor in principle represents a NxN matrix, but given that it is always symmetric the representation can be compacted into a N*(N+1)/2 elements array that derives from the itk::FixedArray<T>

Author
Jeffrey Duda from School of Engineering at University of Pennsylvania
Torsten Rohlfing from SRI International Neuroscience Program.

This class was mostly based on files that Jeffrey Duda, Torsten Rohlfing and Martin Styner contributed to the ITK users list during a discussion on support for DiffusionTensorImages. The funding for creating this class was largely provided by NAMIC (National Alliance for Medical Image Computing) (http://www.na-mic.org). A discussion on the design of this class can be found in the WIKI pages of NAMIC:

http://www.na-mic.org/Wiki/index.php/NAMIC_Wiki:DTI:ITK-DiffusionTensorPixelType

See also
DiffusionTensor3D
Examples
SphinxExamples/src/Nonunit/Review/SegmentBloodVesselsWithMultiScaleHessianBasedMeasure/Code.cxx.

Definition at line 75 of file itkSymmetricSecondRankTensor.h.

Member Typedef Documentation

◆ AccumulateValueType

template<typename TComponent, unsigned int NDimension = 3>
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::AccumulateValueType = typename NumericTraits<ValueType>::RealType

Definition at line 99 of file itkSymmetricSecondRankTensor.h.

◆ BaseArray

template<typename TComponent, unsigned int NDimension = 3>
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::BaseArray = FixedArray<TComponent, Self::InternalDimension>

Convenience type alias.

Definition at line 87 of file itkSymmetricSecondRankTensor.h.

◆ ComponentArrayType

template<typename TComponent, unsigned int NDimension = 3>
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::ComponentArrayType = ComponentType[Self::InternalDimension]

Constructors

Definition at line 124 of file itkSymmetricSecondRankTensor.h.

◆ ComponentType

template<typename TComponent, unsigned int NDimension = 3>
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::ComponentType = TComponent

Define the component type.

Definition at line 97 of file itkSymmetricSecondRankTensor.h.

◆ EigenValuesArrayType

template<typename TComponent, unsigned int NDimension = 3>
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::EigenValuesArrayType = FixedArray<TComponent, NDimension>

Array of eigen-values.

Definition at line 90 of file itkSymmetricSecondRankTensor.h.

◆ EigenVectorsMatrixType

template<typename TComponent, unsigned int NDimension = 3>
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::EigenVectorsMatrixType = Matrix<TComponent, NDimension, NDimension>

Definition at line 94 of file itkSymmetricSecondRankTensor.h.

◆ MatrixType

template<typename TComponent, unsigned int NDimension = 3>
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::MatrixType = Matrix<TComponent, NDimension, NDimension>

Matrix of eigen-vectors.

Definition at line 93 of file itkSymmetricSecondRankTensor.h.

◆ RealValueType

template<typename TComponent, unsigned int NDimension = 3>
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::RealValueType = typename NumericTraits<ValueType>::RealType

Definition at line 100 of file itkSymmetricSecondRankTensor.h.

◆ Self

template<typename TComponent, unsigned int NDimension = 3>
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::Self = SymmetricSecondRankTensor

Standard class type aliases.

Definition at line 79 of file itkSymmetricSecondRankTensor.h.

◆ Superclass

template<typename TComponent, unsigned int NDimension = 3>
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::Superclass = FixedArray<TComponent, NDimension *(NDimension + 1) / 2>

Definition at line 80 of file itkSymmetricSecondRankTensor.h.

◆ SymmetricEigenAnalysisType

template<typename TComponent, unsigned int NDimension = 3>
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::SymmetricEigenAnalysisType = SymmetricEigenAnalysisFixedDimension<Dimension, MatrixType, EigenValuesArrayType, EigenVectorsMatrixType>

Definition at line 103 of file itkSymmetricSecondRankTensor.h.

◆ ValueType

template<typename TComponent, unsigned int NDimension = 3>
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::ValueType = typename Superclass::ValueType

Definition at line 98 of file itkSymmetricSecondRankTensor.h.

Constructor & Destructor Documentation

◆ SymmetricSecondRankTensor() [1/6]

template<typename TComponent, unsigned int NDimension = 3>
itk::SymmetricSecondRankTensor< TComponent, NDimension >::SymmetricSecondRankTensor ( )
inline

Constructors

Definition at line 106 of file itkSymmetricSecondRankTensor.h.

◆ SymmetricSecondRankTensor() [2/6]

template<typename TComponent, unsigned int NDimension = 3>
itk::SymmetricSecondRankTensor< TComponent, NDimension >::SymmetricSecondRankTensor ( const SymmetricSecondRankTensor< TComponent, NDimension > &  )
default

Constructors

◆ SymmetricSecondRankTensor() [3/6]

template<typename TComponent, unsigned int NDimension = 3>
itk::SymmetricSecondRankTensor< TComponent, NDimension >::SymmetricSecondRankTensor ( SymmetricSecondRankTensor< TComponent, NDimension > &&  )
default

Constructors

◆ ~SymmetricSecondRankTensor()

template<typename TComponent, unsigned int NDimension = 3>
itk::SymmetricSecondRankTensor< TComponent, NDimension >::~SymmetricSecondRankTensor ( )
default

Constructors

◆ SymmetricSecondRankTensor() [4/6]

template<typename TComponent, unsigned int NDimension = 3>
itk::SymmetricSecondRankTensor< TComponent, NDimension >::SymmetricSecondRankTensor ( const ComponentType r)
inline

Constructors

Definition at line 116 of file itkSymmetricSecondRankTensor.h.

◆ SymmetricSecondRankTensor() [5/6]

template<typename TComponent, unsigned int NDimension = 3>
template<typename TCoordRepB >
itk::SymmetricSecondRankTensor< TComponent, NDimension >::SymmetricSecondRankTensor ( const SymmetricSecondRankTensor< TCoordRepB, NDimension > &  pa)
inline

Constructor to enable casting...

Definition at line 120 of file itkSymmetricSecondRankTensor.h.

◆ SymmetricSecondRankTensor() [6/6]

template<typename TComponent, unsigned int NDimension = 3>
itk::SymmetricSecondRankTensor< TComponent, NDimension >::SymmetricSecondRankTensor ( const ComponentArrayType  r)
inline

Pass-through constructor for the Array base class.

Definition at line 127 of file itkSymmetricSecondRankTensor.h.

Member Function Documentation

◆ ComputeEigenAnalysis()

template<typename TComponent, unsigned int NDimension = 3>
void itk::SymmetricSecondRankTensor< TComponent, NDimension >::ComputeEigenAnalysis ( EigenValuesArrayType eigenValues,
EigenVectorsMatrixType eigenVectors 
) const

Return an array containing EigenValues, and a matrix containing Eigen vectors.

◆ ComputeEigenValues()

template<typename TComponent, unsigned int NDimension = 3>
void itk::SymmetricSecondRankTensor< TComponent, NDimension >::ComputeEigenValues ( EigenValuesArrayType eigenValues) const

Return an array containing EigenValues.

◆ GetNthComponent()

template<typename TComponent, unsigned int NDimension = 3>
ComponentType itk::SymmetricSecondRankTensor< TComponent, NDimension >::GetNthComponent ( int  c) const
inline

Return the value for the Nth component.

Definition at line 183 of file itkSymmetricSecondRankTensor.h.

◆ GetNumberOfComponents()

template<typename TComponent, unsigned int NDimension = 3>
static unsigned int itk::SymmetricSecondRankTensor< TComponent, NDimension >::GetNumberOfComponents ( )
inlinestatic

Return the number of components.

Definition at line 176 of file itkSymmetricSecondRankTensor.h.

◆ GetTrace()

template<typename TComponent, unsigned int NDimension = 3>
AccumulateValueType itk::SymmetricSecondRankTensor< TComponent, NDimension >::GetTrace ( ) const

Get Trace value

◆ operator()() [1/2]

template<typename TComponent, unsigned int NDimension = 3>
ValueType& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator() ( unsigned int  row,
unsigned int  col 
)

Matrix notation, in const and non-const forms.

◆ operator()() [2/2]

template<typename TComponent, unsigned int NDimension = 3>
const ValueType& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator() ( unsigned int  row,
unsigned int  col 
) const

Constructors

◆ operator*()

template<typename TComponent, unsigned int NDimension = 3>
Self itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator* ( const RealValueType r) const

Arithmetic operations between tensors and scalars

◆ operator*=()

template<typename TComponent, unsigned int NDimension = 3>
const Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator*= ( const RealValueType r)

Constructors

◆ operator+()

template<typename TComponent, unsigned int NDimension = 3>
Self itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator+ ( const Self r) const

Aritmetic operations between pixels. Return a new SymmetricSecondRankTensor.

◆ operator+=()

template<typename TComponent, unsigned int NDimension = 3>
const Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator+= ( const Self r)

Constructors

◆ operator-()

template<typename TComponent, unsigned int NDimension = 3>
Self itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator- ( const Self r) const

Constructors

◆ operator-=()

template<typename TComponent, unsigned int NDimension = 3>
const Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator-= ( const Self r)

Constructors

◆ operator/()

template<typename TComponent, unsigned int NDimension = 3>
Self itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator/ ( const RealValueType r) const

Constructors

◆ operator/=()

template<typename TComponent, unsigned int NDimension = 3>
const Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator/= ( const RealValueType r)

Constructors

◆ operator=() [1/5]

template<typename TComponent, unsigned int NDimension = 3>
Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator= ( const ComponentArrayType  r)

Constructors

◆ operator=() [2/5]

template<typename TComponent, unsigned int NDimension = 3>
Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator= ( const ComponentType r)

Pass-through assignment operator for the Array base class.

◆ operator=() [3/5]

template<typename TComponent, unsigned int NDimension = 3>
SymmetricSecondRankTensor& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator= ( const SymmetricSecondRankTensor< TComponent, NDimension > &  )
default

◆ operator=() [4/5]

template<typename TComponent, unsigned int NDimension = 3>
template<typename TCoordRepB >
Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator= ( const SymmetricSecondRankTensor< TCoordRepB, NDimension > &  pa)
inline

Templated Pass-through assignment for the Array base class.

Definition at line 134 of file itkSymmetricSecondRankTensor.h.

◆ operator=() [5/5]

template<typename TComponent, unsigned int NDimension = 3>
SymmetricSecondRankTensor& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator= ( SymmetricSecondRankTensor< TComponent, NDimension > &&  )
default

Constructors

◆ PostMultiply()

template<typename TComponent, unsigned int NDimension = 3>
MatrixType itk::SymmetricSecondRankTensor< TComponent, NDimension >::PostMultiply ( const MatrixType m) const

Post-Multiply by a Matrix as ResultingMatrix = ThisTensor * Matrix.

◆ PreMultiply()

template<typename TComponent, unsigned int NDimension = 3>
MatrixType itk::SymmetricSecondRankTensor< TComponent, NDimension >::PreMultiply ( const MatrixType m) const

Pre-Multiply by a Matrix as ResultingMatrix = Matrix * ThisTensor.

◆ Rotate() [1/3]

template<typename TComponent, unsigned int NDimension = 3>
template<typename TMatrixValueType >
Self itk::SymmetricSecondRankTensor< TComponent, NDimension >::Rotate ( const Matrix< TMatrixValueType, NDimension, NDimension > &  m) const

Returns the tensor rotated by the provided matrix. ResultingTensor = Matrix * ThisTensor * Matrix.GetTranspose()

◆ Rotate() [2/3]

template<typename TComponent, unsigned int NDimension = 3>
template<typename TMatrixValueType >
Self itk::SymmetricSecondRankTensor< TComponent, NDimension >::Rotate ( const vnl_matrix< TMatrixValueType > &  m) const
inline

Constructors

Definition at line 234 of file itkSymmetricSecondRankTensor.h.

◆ Rotate() [3/3]

template<typename TComponent, unsigned int NDimension = 3>
template<typename TMatrixValueType >
Self itk::SymmetricSecondRankTensor< TComponent, NDimension >::Rotate ( const vnl_matrix_fixed< TMatrixValueType, NDimension, NDimension > &  m) const
inline

Constructors

Definition at line 228 of file itkSymmetricSecondRankTensor.h.

◆ SetIdentity()

template<typename TComponent, unsigned int NDimension = 3>
void itk::SymmetricSecondRankTensor< TComponent, NDimension >::SetIdentity ( )

Set the tensor to an identity tensor. This has 1 in its diagonal elements and zero elsewhere.

◆ SetNthComponent()

template<typename TComponent, unsigned int NDimension = 3>
void itk::SymmetricSecondRankTensor< TComponent, NDimension >::SetNthComponent ( int  c,
const ComponentType v 
)
inline

Set the Nth component to v.

Definition at line 190 of file itkSymmetricSecondRankTensor.h.

Member Data Documentation

◆ Dimension

template<typename TComponent, unsigned int NDimension = 3>
constexpr unsigned int itk::SymmetricSecondRankTensor< TComponent, NDimension >::Dimension = NDimension
staticconstexpr

Dimension of the vector space.

Definition at line 83 of file itkSymmetricSecondRankTensor.h.

◆ InternalDimension

template<typename TComponent, unsigned int NDimension = 3>
constexpr unsigned int itk::SymmetricSecondRankTensor< TComponent, NDimension >::InternalDimension = NDimension * (NDimension + 1) / 2
staticconstexpr

Definition at line 84 of file itkSymmetricSecondRankTensor.h.


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