ITK
5.0.0
Insight Segmentation and Registration Toolkit
|
#include <itkSymmetricSecondRankTensor.h>
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>
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
Definition at line 75 of file itkSymmetricSecondRankTensor.h.
Public Member Functions | |
void | ComputeEigenAnalysis (EigenValuesArrayType &eigenValues, EigenVectorsMatrixType &eigenVectors) const |
void | ComputeEigenValues (EigenValuesArrayType &eigenValues) const |
ComponentType | GetNthComponent (int c) const |
AccumulateValueType | GetTrace () const |
ValueType & | operator() (unsigned int row, unsigned int col) |
const ValueType & | operator() (unsigned int row, unsigned int col) const |
Self | operator* (const RealValueType &scalar) const |
const Self & | operator*= (const RealValueType &scalar) |
Self | operator+ (const Self &vec) const |
const Self & | operator+= (const Self &vec) |
Self | operator- (const Self &vec) const |
const Self & | operator-= (const Self &vec) |
Self | operator/ (const RealValueType &scalar) const |
const Self & | operator/= (const RealValueType &scalar) |
Self & | operator= (const ComponentType &r) |
Self & | operator= (const ComponentArrayType r) |
MatrixType | PostMultiply (const MatrixType &m) const |
MatrixType | PreMultiply (const MatrixType &m) const |
void | SetIdentity () |
void | SetNthComponent (int c, const ComponentType &v) |
SymmetricSecondRankTensor (const ComponentType &r) | |
template<typename TCoordRepB > | |
SymmetricSecondRankTensor (const SymmetricSecondRankTensor< TCoordRepB, NDimension > &pa) | |
SymmetricSecondRankTensor (const ComponentArrayType r) | |
SymmetricSecondRankTensor () | |
SymmetricSecondRankTensor (const SymmetricSecondRankTensor &)=default | |
SymmetricSecondRankTensor (SymmetricSecondRankTensor &&)=default | |
SymmetricSecondRankTensor & | operator= (const SymmetricSecondRankTensor &)=default |
SymmetricSecondRankTensor & | operator= (SymmetricSecondRankTensor &&)=default |
~SymmetricSecondRankTensor ()=default | |
template<typename TCoordRepB > | |
Self & | operator= (const SymmetricSecondRankTensor< TCoordRepB, NDimension > &pa) |
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 |
Public Member Functions inherited from itk::FixedArray< TComponent, NDimension *(NDimension+1)/2 > | |
Iterator | Begin () |
ConstIterator | Begin () const |
Iterator | End () |
ConstIterator | End () const |
void | Fill (const ValueType &) |
FixedArray (const TScalarValue *r) | |
ValueType * | GetDataPointer () |
const ValueType * | GetDataPointer () const |
bool | operator!= (const FixedArray &r) const |
FixedArray & | operator= (const ValueType r[VLength]) |
bool | operator== (const FixedArray &r) const |
ReverseIterator | rBegin () |
ConstReverseIterator | rBegin () const |
ReverseIterator | rEnd () |
ConstReverseIterator | rEnd () const |
SizeType | Size () const |
void | swap (FixedArray &other) |
FixedArray ()=default | |
FixedArray (const FixedArray &)=default | |
FixedArray (FixedArray &&)=default | |
FixedArray & | operator= (const FixedArray &)=default |
FixedArray & | operator= (FixedArray &&)=default |
~FixedArray ()=default | |
FixedArray (const ValueType r[VLength]) | |
FixedArray (const ValueType &) | |
FixedArray (const FixedArray< TFixedArrayValueType, VLength > &r) | |
FixedArray & | operator= (const FixedArray< TFixedArrayValueType, VLength > &r) |
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 short index, const_reference value) |
const_reference | GetElement (unsigned short index) const |
Static Public Member Functions | |
static unsigned int | GetNumberOfComponents () |
Static Public Member Functions inherited from itk::FixedArray< TComponent, NDimension *(NDimension+1)/2 > | |
static FixedArray | Filled (const ValueType &) |
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 itk::SymmetricSecondRankTensor< TComponent, NDimension >::AccumulateValueType = typename NumericTraits< ValueType >::RealType |
Definition at line 101 of file itkSymmetricSecondRankTensor.h.
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::BaseArray = FixedArray< TComponent, Self::InternalDimension > |
Convenience type alias.
Definition at line 89 of file itkSymmetricSecondRankTensor.h.
typedef ComponentType itk::SymmetricSecondRankTensor< TComponent, NDimension >::ComponentArrayType[Self::InternalDimension] |
Definition at line 123 of file itkSymmetricSecondRankTensor.h.
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::ComponentType = TComponent |
Define the component type.
Definition at line 99 of file itkSymmetricSecondRankTensor.h.
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::EigenValuesArrayType = FixedArray< TComponent, NDimension > |
Array of eigen-values.
Definition at line 92 of file itkSymmetricSecondRankTensor.h.
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::EigenVectorsMatrixType = Matrix< TComponent, NDimension, NDimension > |
Definition at line 96 of file itkSymmetricSecondRankTensor.h.
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::MatrixType = Matrix< TComponent, NDimension, NDimension > |
Matrix of eigen-vectors.
Definition at line 95 of file itkSymmetricSecondRankTensor.h.
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::RealValueType = typename NumericTraits< ValueType >::RealType |
Definition at line 102 of file itkSymmetricSecondRankTensor.h.
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::Self = SymmetricSecondRankTensor |
Standard class type aliases.
Definition at line 80 of file itkSymmetricSecondRankTensor.h.
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::Superclass = FixedArray< TComponent, NDimension *( NDimension + 1 ) / 2 > |
Definition at line 81 of file itkSymmetricSecondRankTensor.h.
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::SymmetricEigenAnalysisType = SymmetricEigenAnalysisFixedDimension< Dimension, MatrixType, EigenValuesArrayType, EigenVectorsMatrixType > |
Definition at line 105 of file itkSymmetricSecondRankTensor.h.
using itk::SymmetricSecondRankTensor< TComponent, NDimension >::ValueType = typename Superclass::ValueType |
Definition at line 100 of file itkSymmetricSecondRankTensor.h.
|
inline |
Constructors
Definition at line 108 of file itkSymmetricSecondRankTensor.h.
|
default |
Constructors
|
default |
Constructors
|
default |
Constructors
|
inline |
Definition at line 116 of file itkSymmetricSecondRankTensor.h.
|
inline |
Constructor to enable casting...
Definition at line 120 of file itkSymmetricSecondRankTensor.h.
|
inline |
Pass-through constructor for the Array base class.
Definition at line 126 of file itkSymmetricSecondRankTensor.h.
void itk::SymmetricSecondRankTensor< TComponent, NDimension >::ComputeEigenAnalysis | ( | EigenValuesArrayType & | eigenValues, |
EigenVectorsMatrixType & | eigenVectors | ||
) | const |
Return an array containing EigenValues, and a matrix containing Eigen vectors.
void itk::SymmetricSecondRankTensor< TComponent, NDimension >::ComputeEigenValues | ( | EigenValuesArrayType & | eigenValues | ) | const |
Return an array containing EigenValues.
|
inline |
Return the value for the Nth component.
Definition at line 168 of file itkSymmetricSecondRankTensor.h.
|
inlinestatic |
Return the number of components.
Definition at line 162 of file itkSymmetricSecondRankTensor.h.
AccumulateValueType itk::SymmetricSecondRankTensor< TComponent, NDimension >::GetTrace | ( | ) | const |
Get Trace value
ValueType& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator() | ( | unsigned int | row, |
unsigned int | col | ||
) |
Matrix notation, in const and non-const forms.
const ValueType& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator() | ( | unsigned int | row, |
unsigned int | col | ||
) | const |
Self itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator* | ( | const RealValueType & | scalar | ) | const |
Arithmetic operations between tensors and scalars
const Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator*= | ( | const RealValueType & | scalar | ) |
Self itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator+ | ( | const Self & | vec | ) | const |
Aritmetic operations between pixels. Return a new SymmetricSecondRankTensor.
const Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator+= | ( | const Self & | vec | ) |
Self itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator- | ( | const Self & | vec | ) | const |
const Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator-= | ( | const Self & | vec | ) |
Self itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator/ | ( | const RealValueType & | scalar | ) | const |
const Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator/= | ( | const RealValueType & | scalar | ) |
|
default |
Constructors
Referenced by itk::DiffusionTensor3D< TComponent >::operator=().
|
default |
Constructors
|
inline |
Templated Pass-through assignment for the Array base class.
Definition at line 130 of file itkSymmetricSecondRankTensor.h.
Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator= | ( | const ComponentType & | r | ) |
Pass-through assignment operator for the Array base class.
Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator= | ( | const ComponentArrayType | r | ) |
MatrixType itk::SymmetricSecondRankTensor< TComponent, NDimension >::PostMultiply | ( | const MatrixType & | m | ) | const |
MatrixType itk::SymmetricSecondRankTensor< TComponent, NDimension >::PreMultiply | ( | const MatrixType & | m | ) | const |
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()
|
inline |
Returns the tensor rotated by the provided matrix. ResultingTensor = Matrix * ThisTensor * Matrix.GetTranspose()
Definition at line 199 of file itkSymmetricSecondRankTensor.h.
|
inline |
Returns the tensor rotated by the provided matrix. ResultingTensor = Matrix * ThisTensor * Matrix.GetTranspose()
Definition at line 204 of file itkSymmetricSecondRankTensor.h.
void itk::SymmetricSecondRankTensor< TComponent, NDimension >::SetIdentity | ( | ) |
Set the tensor to an identity tensor. This has 1 in its diagonal elements and zero elsewhere.
|
inline |
Set the Nth component to v.
Definition at line 171 of file itkSymmetricSecondRankTensor.h.
|
static |
Dimension of the vector space.
Definition at line 84 of file itkSymmetricSecondRankTensor.h.
|
static |
Definition at line 85 of file itkSymmetricSecondRankTensor.h.