#include <itkSymmetricSecondRankTensor.h>


This class implements a ND symmetric tensor of second rank.
Since SymmetricSecondRankTensor is a subclass of FixedArray, you can access its components as:
typedef itk::SymmetricSecondRankTensor< float > TensorPixelType; 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 74 of file itkSymmetricSecondRankTensor.h.
Public Types | |
| typedef NumericTraits < ValueType >::RealType | AccumulateValueType |
| typedef FixedArray< TComponent, itkGetStaticConstMacro(InternalDimension)> | BaseArray |
| typedef ValueType | CArray [VLength] |
| typedef ComponentType | ComponentArrayType [itkGetStaticConstMacro(InternalDimension)] |
| typedef TComponent | ComponentType |
| typedef const ValueType * | const_pointer |
| typedef const ValueType & | const_reference |
| typedef const ValueType * | ConstIterator |
| typedef FixedArray< TComponent, NDimension > | EigenValuesArrayType |
| typedef Matrix< TComponent, NDimension, NDimension > | EigenVectorsMatrixType |
| typedef ValueType * | Iterator |
| typedef Matrix< TComponent, NDimension, NDimension > | MatrixType |
| typedef ValueType * | pointer |
| typedef NumericTraits < ValueType >::RealType | RealValueType |
| typedef ValueType & | reference |
| typedef SymmetricSecondRankTensor | Self |
| typedef unsigned int | SizeType |
| typedef FixedArray< TComponent, NDimension *(NDimension+1)/2 > | Superclass |
| typedef SymmetricEigenAnalysis < MatrixType, EigenValuesArrayType, EigenVectorsMatrixType > | SymmetricEigenAnalysisType |
| typedef Superclass::ValueType | ValueType |
Public Member Functions | |
| void | ComputeEigenAnalysis (EigenValuesArrayType &eigenValues, EigenVectorsMatrixType &eigenVectors) const |
| void | ComputeEigenValues (EigenValuesArrayType &eigenValues) const |
| ComponentType | GetNthComponent (int c) const |
| AccumulateValueType | GetTrace () const |
| itkStaticConstMacro (Dimension, unsigned int, VLength) | |
| itkStaticConstMacro (Length, unsigned int, VLength) | |
| Self | PostMultiply (const MatrixType &m) const |
| Self | PreMultiply (const MatrixType &m) const |
| void | SetIdentity () |
| void | SetNthComponent (int c, const ComponentType &v) |
| SymmetricSecondRankTensor (const ComponentType &r) | |
| SymmetricSecondRankTensor () | |
| ConstIterator | Begin () const |
| Iterator | Begin () |
| ConstIterator | End () const |
| Iterator | End () |
| void | Fill (const ValueType &) |
| ConstReverseIterator | rBegin () const |
| ReverseIterator | rBegin () |
| ConstReverseIterator | rEnd () const |
| ReverseIterator | rEnd () |
| SizeType | Size () const |
| const ValueType * | GetDataPointer () const |
| ValueType * | GetDataPointer () |
| const_reference | GetElement (unsigned short index) const |
| void | SetElement (unsigned short index, const_reference value) |
| itkStaticConstMacro (InternalDimension, unsigned int, NDimension *(NDimension+1)/2) | |
| itkStaticConstMacro (Dimension, unsigned int, NDimension) | |
| bool | operator!= (const FixedArray &r) const |
| bool | operator== (const FixedArray &r) const |
| const ValueType & | operator() (unsigned int row, unsigned int col) const |
| ValueType & | operator() (unsigned int row, unsigned int col) |
| Self | operator* (const RealValueType &scalar) const |
| const Self & | operator*= (const RealValueType &scalar) |
| 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 ComponentArrayType r) |
| Self & | operator= (const ComponentType &r) |
| Self & | operator= (const Self &r) |
| const_reference | operator[] (unsigned long index) const |
| reference | operator[] (unsigned long index) |
| const_reference | operator[] (long index) const |
| reference | operator[] (long index) |
| const_reference | operator[] (unsigned int index) const |
| reference | operator[] (unsigned int index) |
| const_reference | operator[] (int index) const |
| reference | operator[] (int index) |
| const_reference | operator[] (unsigned short index) const |
| reference | operator[] (unsigned short index) |
| const_reference | operator[] (short index) const |
| reference | operator[] (short index) |
| SymmetricSecondRankTensor (const ComponentArrayType r) | |
| SymmetricSecondRankTensor (const Self &r) | |
Static Public Member Functions | |
| static FixedArray | Filled (const ValueType &) |
| static unsigned int | GetNumberOfComponents () |
| typedef NumericTraits<ValueType>::RealType itk::SymmetricSecondRankTensor< TComponent, NDimension >::AccumulateValueType |
Reimplemented in itk::DiffusionTensor3D< TComponent >.
Definition at line 101 of file itkSymmetricSecondRankTensor.h.
| typedef FixedArray<TComponent, itkGetStaticConstMacro(InternalDimension)> itk::SymmetricSecondRankTensor< TComponent, NDimension >::BaseArray |
Convenience typedefs.
Definition at line 89 of file itkSymmetricSecondRankTensor.h.
typedef ValueType itk::FixedArray< TComponent , VLength >::CArray[VLength] [inherited] |
A type representing the C-array version of this FixedArray.
Definition at line 77 of file itkFixedArray.h.
| typedef ComponentType itk::SymmetricSecondRankTensor< TComponent, NDimension >::ComponentArrayType[itkGetStaticConstMacro(InternalDimension)] |
Reimplemented in itk::DiffusionTensor3D< TComponent >.
Definition at line 112 of file itkSymmetricSecondRankTensor.h.
| typedef TComponent itk::SymmetricSecondRankTensor< TComponent, NDimension >::ComponentType |
Define the component type.
Reimplemented in itk::DiffusionTensor3D< TComponent >.
Definition at line 99 of file itkSymmetricSecondRankTensor.h.
typedef const ValueType* itk::FixedArray< TComponent , VLength >::const_pointer [inherited] |
A const pointer to the ValueType.
Definition at line 125 of file itkFixedArray.h.
typedef const ValueType& itk::FixedArray< TComponent , VLength >::const_reference [inherited] |
A const reference to the ValueType.
Definition at line 131 of file itkFixedArray.h.
typedef const ValueType* itk::FixedArray< TComponent , VLength >::ConstIterator [inherited] |
A const iterator through the array.
Definition at line 83 of file itkFixedArray.h.
| typedef FixedArray<TComponent, NDimension> itk::SymmetricSecondRankTensor< TComponent, NDimension >::EigenValuesArrayType |
Array of eigen-values.
Reimplemented in itk::DiffusionTensor3D< TComponent >.
Definition at line 92 of file itkSymmetricSecondRankTensor.h.
| typedef Matrix<TComponent, NDimension, NDimension> itk::SymmetricSecondRankTensor< TComponent, NDimension >::EigenVectorsMatrixType |
Reimplemented in itk::DiffusionTensor3D< TComponent >.
Definition at line 96 of file itkSymmetricSecondRankTensor.h.
typedef ValueType* itk::FixedArray< TComponent , VLength >::Iterator [inherited] |
An iterator through the array.
Definition at line 80 of file itkFixedArray.h.
| typedef Matrix<TComponent, NDimension, NDimension> itk::SymmetricSecondRankTensor< TComponent, NDimension >::MatrixType |
Matrix of eigen-vectors.
Definition at line 95 of file itkSymmetricSecondRankTensor.h.
typedef ValueType* itk::FixedArray< TComponent , VLength >::pointer [inherited] |
A pointer to the ValueType.
Definition at line 122 of file itkFixedArray.h.
| typedef NumericTraits<ValueType>::RealType itk::SymmetricSecondRankTensor< TComponent, NDimension >::RealValueType |
Reimplemented in itk::DiffusionTensor3D< TComponent >.
Definition at line 102 of file itkSymmetricSecondRankTensor.h.
typedef ValueType& itk::FixedArray< TComponent , VLength >::reference [inherited] |
A reference to the ValueType.
Definition at line 128 of file itkFixedArray.h.
| typedef SymmetricSecondRankTensor itk::SymmetricSecondRankTensor< TComponent, NDimension >::Self |
Standard class typedefs.
Reimplemented in itk::DiffusionTensor3D< TComponent >.
Definition at line 79 of file itkSymmetricSecondRankTensor.h.
typedef unsigned int itk::FixedArray< TComponent , VLength >::SizeType [inherited] |
Definition at line 133 of file itkFixedArray.h.
| typedef FixedArray<TComponent,NDimension*(NDimension+1)/2> itk::SymmetricSecondRankTensor< TComponent, NDimension >::Superclass |
Reimplemented in itk::DiffusionTensor3D< TComponent >.
Definition at line 80 of file itkSymmetricSecondRankTensor.h.
| typedef SymmetricEigenAnalysis< MatrixType, EigenValuesArrayType, EigenVectorsMatrixType > itk::SymmetricSecondRankTensor< TComponent, NDimension >::SymmetricEigenAnalysisType |
Definition at line 105 of file itkSymmetricSecondRankTensor.h.
| typedef Superclass::ValueType itk::SymmetricSecondRankTensor< TComponent, NDimension >::ValueType |
The element type stored at each location in the FixedArray.
Reimplemented from itk::FixedArray< TComponent, NDimension *(NDimension+1)/2 >.
Reimplemented in itk::DiffusionTensor3D< TComponent >.
Definition at line 100 of file itkSymmetricSecondRankTensor.h.
| itk::SymmetricSecondRankTensor< TComponent, NDimension >::SymmetricSecondRankTensor | ( | ) | [inline] |
Default constructor has nothing to do.
Definition at line 108 of file itkSymmetricSecondRankTensor.h.
| itk::SymmetricSecondRankTensor< TComponent, NDimension >::SymmetricSecondRankTensor | ( | const ComponentType & | r | ) | [inline] |
Definition at line 110 of file itkSymmetricSecondRankTensor.h.
| itk::SymmetricSecondRankTensor< TComponent, NDimension >::SymmetricSecondRankTensor | ( | const Self & | r | ) | [inline] |
Pass-through constructor for the Array base class.
Definition at line 115 of file itkSymmetricSecondRankTensor.h.
| itk::SymmetricSecondRankTensor< TComponent, NDimension >::SymmetricSecondRankTensor | ( | const ComponentArrayType | r | ) | [inline] |
Definition at line 116 of file itkSymmetricSecondRankTensor.h.
| ConstIterator itk::FixedArray< TComponent , VLength >::Begin | ( | void | ) | const [inherited] |
| Iterator itk::FixedArray< TComponent , VLength >::Begin | ( | void | ) | [inherited] |
Get various iterators to the array.
| 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.
| ConstIterator itk::FixedArray< TComponent , VLength >::End | ( | void | ) | const [inherited] |
| Iterator itk::FixedArray< TComponent , VLength >::End | ( | void | ) | [inherited] |
| void itk::FixedArray< TComponent , VLength >::Fill | ( | const ValueType & | ) | [inherited] |
| static FixedArray itk::FixedArray< TComponent , VLength >::Filled | ( | const ValueType & | ) | [static, inherited] |
| const ValueType* itk::FixedArray< TComponent , VLength >::GetDataPointer | ( | ) | const [inline, inherited] |
Definition at line 218 of file itkFixedArray.h.
| ValueType* itk::FixedArray< TComponent , VLength >::GetDataPointer | ( | ) | [inline, inherited] |
Return a pointer to the data.
Definition at line 217 of file itkFixedArray.h.
| const_reference itk::FixedArray< TComponent , VLength >::GetElement | ( | unsigned short | index | ) | const [inline, inherited] |
Definition at line 213 of file itkFixedArray.h.
| ComponentType itk::SymmetricSecondRankTensor< TComponent, NDimension >::GetNthComponent | ( | int | c | ) | const [inline] |
Return the value for the Nth component.
Definition at line 146 of file itkSymmetricSecondRankTensor.h.
| static unsigned int itk::SymmetricSecondRankTensor< TComponent, NDimension >::GetNumberOfComponents | ( | ) | [inline, static] |
Return the number of components.
Definition at line 140 of file itkSymmetricSecondRankTensor.h.
| AccumulateValueType itk::SymmetricSecondRankTensor< TComponent, NDimension >::GetTrace | ( | ) | const |
Get Trace value
Reimplemented in itk::DiffusionTensor3D< TComponent >.
| itk::FixedArray< TComponent , VLength >::itkStaticConstMacro | ( | Dimension | , | |
| unsigned | int, | |||
| VLength | ||||
| ) | [inherited] |
Dimension constant
| itk::FixedArray< TComponent , VLength >::itkStaticConstMacro | ( | Length | , | |
| unsigned | int, | |||
| VLength | ||||
| ) | [inherited] |
Length constant
| itk::SymmetricSecondRankTensor< TComponent, NDimension >::itkStaticConstMacro | ( | InternalDimension | , | |
| unsigned | int, | |||
| NDimension *(NDimension+1)/ | 2 | |||
| ) |
| itk::SymmetricSecondRankTensor< TComponent, NDimension >::itkStaticConstMacro | ( | Dimension | , | |
| unsigned | int, | |||
| NDimension | ||||
| ) |
Dimension of the vector space.
| bool itk::FixedArray< TComponent , VLength >::operator!= | ( | const FixedArray< TComponent, NDimension *(NDimension+1)/2 > & | r | ) | const [inline, inherited] |
Definition at line 189 of file itkFixedArray.h.
| const ValueType& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator() | ( | unsigned int | row, | |
| unsigned int | col | |||
| ) | const |
| ValueType& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator() | ( | unsigned int | row, | |
| unsigned int | col | |||
| ) |
Matrix notation, in const and non-const forms.
| 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 | ) |
Arithmetic operations between tensors and scalars
| 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 | ) |
Aritmetic operations between pixels. Return a new SymmetricSecondRankTensor.
| 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 | ) |
Aritmetic operations between pixels. Return a new SymmetricSecondRankTensor.
| 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 | ) |
Arithmetic operations between tensors and scalars
| Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator= | ( | const ComponentArrayType | r | ) |
| Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator= | ( | const ComponentType & | r | ) |
| Self& itk::SymmetricSecondRankTensor< TComponent, NDimension >::operator= | ( | const Self & | r | ) |
Pass-through assignment operator for the Array base class.
| bool itk::FixedArray< TComponent , VLength >::operator== | ( | const FixedArray< TComponent, NDimension *(NDimension+1)/2 > & | r | ) | const [inherited] |
Operators == and != are used to compare whether two arrays are equal. Note that arrays are equal when the number of components (size) is the same, and each component value is equal.
| const_reference itk::FixedArray< TComponent , VLength >::operator[] | ( | unsigned long | index | ) | const [inline, inherited] |
Definition at line 207 of file itkFixedArray.h.
| reference itk::FixedArray< TComponent , VLength >::operator[] | ( | unsigned long | index | ) | [inline, inherited] |
Definition at line 206 of file itkFixedArray.h.
| const_reference itk::FixedArray< TComponent , VLength >::operator[] | ( | long | index | ) | const [inline, inherited] |
Definition at line 205 of file itkFixedArray.h.
| reference itk::FixedArray< TComponent , VLength >::operator[] | ( | long | index | ) | [inline, inherited] |
Definition at line 204 of file itkFixedArray.h.
| const_reference itk::FixedArray< TComponent , VLength >::operator[] | ( | unsigned int | index | ) | const [inline, inherited] |
Definition at line 203 of file itkFixedArray.h.
| reference itk::FixedArray< TComponent , VLength >::operator[] | ( | unsigned int | index | ) | [inline, inherited] |
Definition at line 202 of file itkFixedArray.h.
| const_reference itk::FixedArray< TComponent , VLength >::operator[] | ( | int | index | ) | const [inline, inherited] |
Definition at line 201 of file itkFixedArray.h.
| reference itk::FixedArray< TComponent , VLength >::operator[] | ( | int | index | ) | [inline, inherited] |
Definition at line 200 of file itkFixedArray.h.
| const_reference itk::FixedArray< TComponent , VLength >::operator[] | ( | unsigned short | index | ) | const [inline, inherited] |
Definition at line 199 of file itkFixedArray.h.
| reference itk::FixedArray< TComponent , VLength >::operator[] | ( | unsigned short | index | ) | [inline, inherited] |
Definition at line 198 of file itkFixedArray.h.
| const_reference itk::FixedArray< TComponent , VLength >::operator[] | ( | short | index | ) | const [inline, inherited] |
Definition at line 197 of file itkFixedArray.h.
| reference itk::FixedArray< TComponent , VLength >::operator[] | ( | short | index | ) | [inline, inherited] |
Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.
Definition at line 196 of file itkFixedArray.h.
Referenced by itk::SymmetricSecondRankTensor< TComponent, 3 >::GetNthComponent(), and itk::SymmetricSecondRankTensor< TComponent, 3 >::SetNthComponent().
| Self itk::SymmetricSecondRankTensor< TComponent, NDimension >::PostMultiply | ( | const MatrixType & | m | ) | const |
| Self itk::SymmetricSecondRankTensor< TComponent, NDimension >::PreMultiply | ( | const MatrixType & | m | ) | const |
| ConstReverseIterator itk::FixedArray< TComponent , VLength >::rBegin | ( | ) | const [inherited] |
| ReverseIterator itk::FixedArray< TComponent , VLength >::rBegin | ( | ) | [inherited] |
| ConstReverseIterator itk::FixedArray< TComponent , VLength >::rEnd | ( | ) | const [inherited] |
| ReverseIterator itk::FixedArray< TComponent , VLength >::rEnd | ( | ) | [inherited] |
| void itk::FixedArray< TComponent , VLength >::SetElement | ( | unsigned short | index, | |
| const_reference | value | |||
| ) | [inline, inherited] |
Set/Get element methods are more convenient in wrapping languages
Definition at line 211 of file itkFixedArray.h.
| void itk::SymmetricSecondRankTensor< TComponent, NDimension >::SetIdentity | ( | ) |
Set the tensor to an identity tensor. This has 1 in its diagonal elements zero elsewhere
| void itk::SymmetricSecondRankTensor< TComponent, NDimension >::SetNthComponent | ( | int | c, | |
| const ComponentType & | v | |||
| ) | [inline] |
Set the Nth component to v.
Definition at line 150 of file itkSymmetricSecondRankTensor.h.
| SizeType itk::FixedArray< TComponent , VLength >::Size | ( | void | ) | const [inherited] |
1.5.5 written by Dimitri van Heesch,
© 1997-2000