Class for n-dimensional image index. More...
#include <cmtkFixedVector.h>
Classes | |
class | Init |
Initialization class: use this to select initialization constructor. More... | |
Public Types | |
typedef FixedVector< NDIM, T > | Self |
This class. | |
typedef T | ValueType |
Type of the stored values. | |
typedef SmartPointer< Self > | SmartPtr |
Smart pointer to this class. | |
typedef SmartConstPointer< Self > | SmartConstPtr |
Smart pointer-to-const to this class. | |
Public Member Functions | |
FixedVector () | |
Default constructor. | |
FixedVector (const typename Self::Init &init) | |
Initialization constructor. | |
template<class T2 > | |
FixedVector (const T2 *const ptr) | |
Constructor from const pointer. | |
template<class T2 > | |
FixedVector (const FixedVector< NDIM, T2 > &rhs) | |
Type conversion constructor template. | |
T & | operator[] (const size_t i) |
Get element reference. | |
const T & | operator[] (const size_t i) const |
Get const element reference. | |
Self & | operator+= (const Self &rhs) |
In-place addition operator. | |
Self & | operator-= (const Self &rhs) |
In-place subtraction operator. | |
bool | operator== (const Self &rhs) const |
Equality operator. | |
Self & | operator*= (const T a) |
Multiply by a scalar. | |
Self & | operator*= (const Self &rhs) |
Elementwise multiplication with another vector. | |
Self & | operator/= (const T a) |
Divide by a scalar. | |
Self & | operator/= (const Self &rhs) |
Elementwise dvision with another vector. | |
const Self | operator- () |
Unary minus. | |
T * | begin () |
Pointer to first array element. | |
T * | end () |
Pointer behind last array element. | |
const T * | begin () const |
Pointer to first array element. | |
const T * | end () const |
Pointer behind last array element. | |
T | MaxValue () const |
Maximum value. | |
T | MinValue () const |
Minimum value. | |
T | Sum () const |
Calculate sum of vector elements. | |
T | Product () const |
Calculate product of vector elements. | |
T | SumOfSquares () const |
Calculate sum of squares of vector elements (that is, square of Euclid's norm). | |
T | MaxAbsValue () const |
Calculate maximum absolute value in the vector. | |
T | RootSumOfSquares () const |
Shorthand for root of sum of squares (i.e., Euclid's norm) | |
Static Public Member Functions | |
static const Self | Zero () |
Zero operator. | |
Private Attributes | |
T | m_Data [NDIM] |
The actual index array. |
Class for n-dimensional image index.
Definition at line 49 of file cmtkFixedVector.h.
typedef FixedVector<NDIM,T> cmtk::FixedVector< NDIM, T >::Self |
This class.
Definition at line 53 of file cmtkFixedVector.h.
typedef SmartConstPointer<Self> cmtk::FixedVector< NDIM, T >::SmartConstPtr |
Smart pointer-to-const to this class.
Definition at line 62 of file cmtkFixedVector.h.
typedef SmartPointer<Self> cmtk::FixedVector< NDIM, T >::SmartPtr |
Smart pointer to this class.
Definition at line 59 of file cmtkFixedVector.h.
typedef T cmtk::FixedVector< NDIM, T >::ValueType |
Type of the stored values.
Definition at line 56 of file cmtkFixedVector.h.
cmtk::FixedVector< NDIM, T >::FixedVector | ( | ) | [inline] |
Default constructor.
Definition at line 73 of file cmtkFixedVector.h.
cmtk::FixedVector< NDIM, T >::FixedVector | ( | const typename Self::Init & | init ) | [inline, explicit] |
Initialization constructor.
Definition at line 87 of file cmtkFixedVector.h.
cmtk::FixedVector< NDIM, T >::FixedVector | ( | const T2 *const | ptr ) | [inline, explicit] |
Constructor from const pointer.
Definition at line 94 of file cmtkFixedVector.h.
cmtk::FixedVector< NDIM, T >::FixedVector | ( | const FixedVector< NDIM, T2 > & | rhs ) | [inline] |
Type conversion constructor template.
Definition at line 102 of file cmtkFixedVector.h.
T* cmtk::FixedVector< NDIM, T >::begin | ( | ) | [inline] |
Pointer to first array element.
Definition at line 188 of file cmtkFixedVector.h.
Referenced by cmtk::MakeInitialAffineTransformation::AlignCentersOfMass(), cmtk::MakeInitialAffineTransformation::AlignFieldsOfView(), cmtk::ClassStream::Get(), cmtk::GroupwiseRegistrationFunctionalAffineInitializer::InitializeXforms(), cmtk::AffineRegistration::InitRegistration(), cmtk::AffineMultiChannelRegistrationFunctional< TMultiChannelMetricFunctional >::InitTransformation(), cmtk::operator<<(), cmtk::ClassStream::PutWarp(), cmtk::SplineWarpGroupwiseRegistrationRMIFunctional::UpdateActiveControlPoints(), cmtk::SplineWarpCongealingFunctional::UpdateActiveControlPoints(), and cmtk::FixedVector< 3, UniformVolume::SpaceVectorType * >::Zero().
const T* cmtk::FixedVector< NDIM, T >::begin | ( | ) | const [inline] |
Pointer to first array element.
Definition at line 200 of file cmtkFixedVector.h.
T* cmtk::FixedVector< NDIM, T >::end | ( | ) | [inline] |
Pointer behind last array element.
Definition at line 194 of file cmtkFixedVector.h.
Referenced by cmtk::GroupwiseRegistrationFunctionalAffineInitializer::InitializeXforms(), and cmtk::FixedVector< 3, UniformVolume::SpaceVectorType * >::Zero().
const T* cmtk::FixedVector< NDIM, T >::end | ( | ) | const [inline] |
Pointer behind last array element.
Definition at line 206 of file cmtkFixedVector.h.
T cmtk::FixedVector< NDIM, T >::MaxAbsValue | ( | ) | const [inline] |
Calculate maximum absolute value in the vector.
Definition at line 254 of file cmtkFixedVector.h.
Referenced by cmtk::VolumeFromSlices::CheckImage().
T cmtk::FixedVector< NDIM, T >::MaxValue | ( | ) | const [inline] |
Maximum value.
Definition at line 212 of file cmtkFixedVector.h.
Referenced by cmtk::AffineXform::GetParamStep().
T cmtk::FixedVector< NDIM, T >::MinValue | ( | ) | const [inline] |
Minimum value.
Definition at line 218 of file cmtkFixedVector.h.
Self& cmtk::FixedVector< NDIM, T >::operator*= | ( | const Self & | rhs ) | [inline] |
Elementwise multiplication with another vector.
Definition at line 154 of file cmtkFixedVector.h.
Self& cmtk::FixedVector< NDIM, T >::operator*= | ( | const T | a ) | [inline] |
Multiply by a scalar.
Definition at line 146 of file cmtkFixedVector.h.
Self& cmtk::FixedVector< NDIM, T >::operator+= | ( | const Self & | rhs ) | [inline] |
In-place addition operator.
Definition at line 121 of file cmtkFixedVector.h.
const Self cmtk::FixedVector< NDIM, T >::operator- | ( | ) | [inline] |
Unary minus.
Definition at line 178 of file cmtkFixedVector.h.
Self& cmtk::FixedVector< NDIM, T >::operator-= | ( | const Self & | rhs ) | [inline] |
In-place subtraction operator.
Definition at line 129 of file cmtkFixedVector.h.
Self& cmtk::FixedVector< NDIM, T >::operator/= | ( | const T | a ) | [inline] |
Divide by a scalar.
Definition at line 162 of file cmtkFixedVector.h.
Self& cmtk::FixedVector< NDIM, T >::operator/= | ( | const Self & | rhs ) | [inline] |
Elementwise dvision with another vector.
Definition at line 170 of file cmtkFixedVector.h.
bool cmtk::FixedVector< NDIM, T >::operator== | ( | const Self & | rhs ) | const [inline] |
Equality operator.
Definition at line 137 of file cmtkFixedVector.h.
const T& cmtk::FixedVector< NDIM, T >::operator[] | ( | const size_t | i ) | const [inline] |
Get const element reference.
Definition at line 115 of file cmtkFixedVector.h.
T& cmtk::FixedVector< NDIM, T >::operator[] | ( | const size_t | i ) | [inline] |
Get element reference.
Definition at line 109 of file cmtkFixedVector.h.
T cmtk::FixedVector< NDIM, T >::Product | ( | ) | const [inline] |
Calculate product of vector elements.
Definition at line 234 of file cmtkFixedVector.h.
T cmtk::FixedVector< NDIM, T >::RootSumOfSquares | ( | ) | const [inline] |
Shorthand for root of sum of squares (i.e., Euclid's norm)
Definition at line 264 of file cmtkFixedVector.h.
Referenced by cmtk::SplineWarpXform::ApplyInverseInPlaceWithInitial(), cmtk::UniformVolumePainter::DrawSphere(), cmtk::Slicer::Execute(), cmtk::SplineWarpXform::FindClosestControlPoint(), cmtk::ScalarImage::GetImageOrigin(), cmtk::WarpXform::GetInverseConsistencyError(), cmtk::SplineWarpXform::GetInverseConsistencyError(), cmtk::ParametricPlane::SetNormal(), and cmtk::VolumeInjectionReconstruction::VolumeInjectionAnisotropic().
T cmtk::FixedVector< NDIM, T >::Sum | ( | ) | const [inline] |
Calculate sum of vector elements.
Definition at line 224 of file cmtkFixedVector.h.
T cmtk::FixedVector< NDIM, T >::SumOfSquares | ( | ) | const [inline] |
Calculate sum of squares of vector elements (that is, square of Euclid's norm).
Definition at line 244 of file cmtkFixedVector.h.
Referenced by cmtk::SplineWarpXform::RelaxToUnfold().
static const Self cmtk::FixedVector< NDIM, T >::Zero | ( | ) | [inline, static] |
Zero operator.
Definition at line 65 of file cmtkFixedVector.h.
T cmtk::FixedVector< NDIM, T >::m_Data[NDIM] [private] |
The actual index array.
Definition at line 271 of file cmtkFixedVector.h.
Referenced by cmtk::FixedVector< 3, UniformVolume::SpaceVectorType * >::operator+=(), cmtk::FixedVector< 3, UniformVolume::SpaceVectorType * >::operator-(), cmtk::FixedVector< 3, UniformVolume::SpaceVectorType * >::operator-=(), and cmtk::FixedVector< 3, UniformVolume::SpaceVectorType * >::operator==().