Simulate a standard C array with copy semnatics. More...
#include <itkFixedArray.h>
Inherited by itk::CovariantVector< double, 2 >, itk::CovariantVector< double, 3 >, itk::CovariantVector< double, TImageDimension >, itk::CovariantVector< double, TPointDimension >, itk::CovariantVector< double, VDimension >, itk::CovariantVector< double, VImageDimension >, itk::RGBAPixel< float >, itk::RGBAPixel< TComponentType >, itk::RGBPixel< float >, itk::RGBPixel< TPixel >, itk::SymmetricSecondRankTensor< TComponent, 3 >, itk::Vector< CoordRepType, itkGetStaticConstMacro(SpaceDimension)>, itk::Vector< double, 2 >, itk::Vector< double, 3 >, itk::Vector< double, itkGetStaticConstMacro(ImageDimension) >, itk::Vector< double, NSpaceDimension >, itk::Vector< double, TDimension >, itk::Vector< double, TPointDimension >, itk::Vector< double, TSampleDimension >, itk::Vector< double, VDimension >, itk::Vector< double, VImageDimension >, itk::Vector< float, VDimension >, itk::Vector< int, 2 >, itk::Vector< NodeValueType,::itk::GetImageDimension< TImageType >::ImageDimension >, itk::Vector< ScalarType, itkGetStaticConstMacro(ImageDimension)>, itk::Vector< SpacingValueType, VImageDimension >, itk::Vector< TScalarType, 3 >, itk::Vector< TScalarType, 6 >, itk::Vector< TScalarType, itkGetStaticConstMacro(InputSpaceDimension)>, itk::Vector< TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)>, and itk::Vector< TScalarType, itkGetStaticConstMacro(SpaceDimension)>.
Classes | |
class | ConstReverseIterator |
A const reverse iterator through the array. More... | |
class | ReverseIterator |
A reverse iterator through the array. More... | |
Public Types | |
typedef ValueType | CArray [VLength] |
typedef const ValueType * | const_pointer |
typedef const ValueType & | const_reference |
typedef const ValueType * | ConstIterator |
typedef ValueType * | Iterator |
typedef ValueType * | pointer |
typedef ValueType & | reference |
typedef unsigned int | SizeType |
typedef TValueType | ValueType |
Public Member Functions | |
FixedArray & | operator= (const ValueType r[VLength]) |
ConstIterator | Begin () const |
Iterator | Begin () |
ConstIterator | End () const |
Iterator | End () |
void | Fill (const ValueType &) |
template<class TFixedArrayValueType > | |
FixedArray (const FixedArray< TFixedArrayValueType, VLength > &r) | |
FixedArray (const ValueType &r) | |
FixedArray (const ValueType r[VLength]) | |
FixedArray () | |
const ValueType * | GetDataPointer () const |
ValueType * | GetDataPointer () |
const_reference | GetElement (unsigned short index) const |
bool | operator!= (const FixedArray &r) const |
template<class TFixedArrayValueType > | |
FixedArray & | operator= (const FixedArray< TFixedArrayValueType, VLength > &r) |
bool | operator== (const FixedArray &r) const |
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) |
ConstReverseIterator | rBegin () const |
ReverseIterator | rBegin () |
ConstReverseIterator | rEnd () const |
ReverseIterator | rEnd () |
void | SetElement (unsigned short index, const_reference value) |
SizeType | Size () const |
Static Public Member Functions | |
static FixedArray | Filled (const ValueType &) |
Static Public Attributes | |
static const unsigned int | Dimension = VLength |
static const unsigned int | Length = VLength |
Simulate a standard C array with copy semnatics.
Simulates a standard C array, except that copy semantics are used instead of reference semantics. Also, arrays of different sizes cannot be assigned to one another, and size information is known for function returns.
Template parameters for class FixedArray:
The length of the array is fixed at compile time. If you wish to specify the length of the array at run-time, use the class itk::Array. If you wish to change to change the length of the array at run-time, you're best off using std::vector<>.
Definition at line 64 of file itkFixedArray.h.
typedef ValueType itk::FixedArray< TValueType, VLength >::CArray[VLength] |
A type representing the C-array version of this FixedArray.
Definition at line 77 of file itkFixedArray.h.
typedef const ValueType* itk::FixedArray< TValueType, VLength >::const_pointer |
A const pointer to the ValueType.
Definition at line 129 of file itkFixedArray.h.
typedef const ValueType& itk::FixedArray< TValueType, VLength >::const_reference |
A const reference to the ValueType.
Definition at line 135 of file itkFixedArray.h.
typedef const ValueType* itk::FixedArray< TValueType, VLength >::ConstIterator |
A const iterator through the array.
Reimplemented in itk::ContinuousIndex< TCoordRep, VIndexDimension >, itk::Point< TCoordRep, NPointDimension >, itk::QuadEdgeMeshPoint< TCoordRep, VPointDimension, TQuadEdge >, itk::ContinuousIndex< TOutput, itkGetStaticConstMacro(ImageDimension)>, itk::ContinuousIndex< TCoordRep, itkGetStaticConstMacro(ImageDimension)>, itk::ContinuousIndex< float, itkGetStaticConstMacro(ImageDimension)>, itk::Point< TOutput, VIndexDimension >, itk::Point< float, VIndexDimension >, itk::Point< double, VImageDimension >, itk::Point< TCoordRep, VPointDimension >, itk::Point< TCoordRep, VIndexDimension >, itk::Point< double, TImageDimension >, itk::Point< PointValueType, VImageDimension >, itk::Point< double, NDimensions >, itk::Point< double, 3 >, itk::Point< double, TDimension >, itk::Point< double, 2 >, itk::Point< TScalarType, itkGetStaticConstMacro(InputSpaceDimension)>, itk::Point< double, itkGetStaticConstMacro(ImageDimension) >, itk::Point< TScalarType, itkGetStaticConstMacro(SpaceDimension)>, itk::Point< double, TPointDimension >, itk::Point< double, VDimensions >, and itk::Point< CoordRepType, itkGetStaticConstMacro(ImageDimension)>.
Definition at line 83 of file itkFixedArray.h.
typedef ValueType* itk::FixedArray< TValueType, VLength >::Iterator |
An iterator through the array.
Reimplemented in itk::ContinuousIndex< TCoordRep, VIndexDimension >, itk::Point< TCoordRep, NPointDimension >, itk::QuadEdgeMeshPoint< TCoordRep, VPointDimension, TQuadEdge >, itk::ContinuousIndex< TOutput, itkGetStaticConstMacro(ImageDimension)>, itk::ContinuousIndex< TCoordRep, itkGetStaticConstMacro(ImageDimension)>, itk::ContinuousIndex< float, itkGetStaticConstMacro(ImageDimension)>, itk::Point< TOutput, VIndexDimension >, itk::Point< float, VIndexDimension >, itk::Point< double, VImageDimension >, itk::Point< TCoordRep, VPointDimension >, itk::Point< TCoordRep, VIndexDimension >, itk::Point< double, TImageDimension >, itk::Point< PointValueType, VImageDimension >, itk::Point< double, NDimensions >, itk::Point< double, 3 >, itk::Point< double, TDimension >, itk::Point< double, 2 >, itk::Point< TScalarType, itkGetStaticConstMacro(InputSpaceDimension)>, itk::Point< double, itkGetStaticConstMacro(ImageDimension) >, itk::Point< TScalarType, itkGetStaticConstMacro(SpaceDimension)>, itk::Point< double, TPointDimension >, itk::Point< double, VDimensions >, and itk::Point< CoordRepType, itkGetStaticConstMacro(ImageDimension)>.
Definition at line 80 of file itkFixedArray.h.
typedef ValueType* itk::FixedArray< TValueType, VLength >::pointer |
A pointer to the ValueType.
Definition at line 126 of file itkFixedArray.h.
typedef ValueType& itk::FixedArray< TValueType, VLength >::reference |
A reference to the ValueType.
Definition at line 132 of file itkFixedArray.h.
typedef unsigned int itk::FixedArray< TValueType, VLength >::SizeType |
Definition at line 137 of file itkFixedArray.h.
typedef TValueType itk::FixedArray< TValueType, VLength >::ValueType |
The element type stored at each location in the FixedArray.
Reimplemented in itk::ContinuousIndex< TCoordRep, VIndexDimension >, itk::CovariantVector< T, NVectorDimension >, itk::DiffusionTensor3D< TComponent >, itk::Point< TCoordRep, NPointDimension >, itk::RGBPixel< TComponent >, itk::SymmetricSecondRankTensor< TComponent, NDimension >, itk::Vector< T, NVectorDimension >, itk::QuadEdgeMeshPoint< TCoordRep, VPointDimension, TQuadEdge >, itk::ContinuousIndex< TOutput, itkGetStaticConstMacro(ImageDimension)>, itk::ContinuousIndex< TCoordRep, itkGetStaticConstMacro(ImageDimension)>, itk::ContinuousIndex< float, itkGetStaticConstMacro(ImageDimension)>, itk::CovariantVector< double, VImageDimension >, itk::CovariantVector< double, TImageDimension >, itk::CovariantVector< double, 3 >, itk::CovariantVector< double, 2 >, itk::CovariantVector< double, VDimension >, itk::CovariantVector< double, TPointDimension >, itk::Point< TOutput, VIndexDimension >, itk::Point< float, VIndexDimension >, itk::Point< double, VImageDimension >, itk::Point< TCoordRep, VPointDimension >, itk::Point< TCoordRep, VIndexDimension >, itk::Point< double, TImageDimension >, itk::Point< PointValueType, VImageDimension >, itk::Point< double, NDimensions >, itk::Point< double, 3 >, itk::Point< double, TDimension >, itk::Point< double, 2 >, itk::Point< TScalarType, itkGetStaticConstMacro(InputSpaceDimension)>, itk::Point< double, itkGetStaticConstMacro(ImageDimension) >, itk::Point< TScalarType, itkGetStaticConstMacro(SpaceDimension)>, itk::Point< double, TPointDimension >, itk::Point< double, VDimensions >, itk::Point< CoordRepType, itkGetStaticConstMacro(ImageDimension)>, itk::RGBPixel< float >, itk::RGBPixel< TPixel >, itk::SymmetricSecondRankTensor< TComponent, 3 >, itk::Vector< double, VImageDimension >, itk::Vector< double, TSampleDimension >, itk::Vector< TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)>, itk::Vector< ScalarType, itkGetStaticConstMacro(ImageDimension)>, itk::Vector< double, 3 >, itk::Vector< TScalarType, itkGetStaticConstMacro(InputSpaceDimension)>, itk::Vector< double, TDimension >, itk::Vector< double, 2 >, itk::Vector< SpacingValueType, VImageDimension >, itk::Vector< NodeValueType,::itk::GetImageDimension< TImageType >::ImageDimension >, itk::Vector< TScalarType, 3 >, itk::Vector< double, VDimension >, itk::Vector< TScalarType, itkGetStaticConstMacro(SpaceDimension)>, itk::Vector< double, itkGetStaticConstMacro(ImageDimension) >, itk::Vector< double, TPointDimension >, itk::Vector< int, 2 >, itk::Vector< double, NSpaceDimension >, itk::Vector< float, VDimension >, itk::Vector< TScalarType, 6 >, and itk::Vector< CoordRepType, itkGetStaticConstMacro(SpaceDimension)>.
Definition at line 74 of file itkFixedArray.h.
itk::FixedArray< TValueType, VLength >::FixedArray | ( | ) |
Constructors
itk::FixedArray< TValueType, VLength >::FixedArray | ( | const ValueType | r[VLength] | ) |
Get various iterators to the array.
itk::FixedArray< TValueType, VLength >::FixedArray | ( | const ValueType & | r | ) |
Get various iterators to the array.
itk::FixedArray< TValueType, VLength >::FixedArray | ( | const FixedArray< TFixedArrayValueType, VLength > & | r | ) | [inline] |
Constructor to initialize a fixed array from another of any data type
Definition at line 148 of file itkFixedArray.h.
ConstIterator itk::FixedArray< TValueType, VLength >::Begin | ( | ) | const |
Get various iterators to the array.
Iterator itk::FixedArray< TValueType, VLength >::Begin | ( | ) |
Get various iterators to the array.
Referenced by itk::FixedArray< KernelType, itkGetStaticConstMacro(ImageDimension2)>::FixedArray(), itk::FixedArray< KernelType, itkGetStaticConstMacro(ImageDimension2)>::operator=(), and itk::DTITubeSpatialObjectPoint< TPointDimension >::SetTensorMatrix().
ConstIterator itk::FixedArray< TValueType, VLength >::End | ( | ) | const |
Get various iterators to the array.
Iterator itk::FixedArray< TValueType, VLength >::End | ( | ) |
Get various iterators to the array.
Referenced by itk::FixedArray< KernelType, itkGetStaticConstMacro(ImageDimension2)>::FixedArray(), itk::FixedArray< KernelType, itkGetStaticConstMacro(ImageDimension2)>::operator=(), and itk::DTITubeSpatialObjectPoint< TPointDimension >::SetTensorMatrix().
void itk::FixedArray< TValueType, VLength >::Fill | ( | const ValueType & | ) |
Get various iterators to the array.
Referenced by itk::Statistics::MeasurementVectorTraits::SetLength(), itk::MeasurementVectorTraits::SetLength(), itk::DiscreteGaussianDerivativeImageFilter< TInputImage, TOutputImage >::SetMaximumError(), itk::DiscreteGaussianDerivativeImageFilter< TInputImage, TOutputImage >::SetOrder(), and itk::DiscreteGaussianDerivativeImageFilter< TInputImage, TOutputImage >::SetVariance().
static FixedArray itk::FixedArray< TValueType, VLength >::Filled | ( | const ValueType & | ) | [static] |
const ValueType* itk::FixedArray< TValueType, VLength >::GetDataPointer | ( | ) | const [inline] |
Get various iterators to the array.
Definition at line 223 of file itkFixedArray.h.
ValueType* itk::FixedArray< TValueType, VLength >::GetDataPointer | ( | ) | [inline] |
Return a pointer to the data.
Definition at line 222 of file itkFixedArray.h.
Referenced by itk::Accessor::VectorToRGBPixelAccessor< TImage::PixelType::ValueType >::Get(), itk::Accessor::RGBToVectorPixelAccessor< TImage::PixelType::ComponentType >::Get(), and itk::MetaArrayWriter::SetInput().
const_reference itk::FixedArray< TValueType, VLength >::GetElement | ( | unsigned short | index | ) | const [inline] |
Get various iterators to the array.
Definition at line 218 of file itkFixedArray.h.
bool itk::FixedArray< TValueType, VLength >::operator!= | ( | const FixedArray< TValueType, VLength > & | r | ) | const [inline] |
Get various iterators to the array.
Definition at line 194 of file itkFixedArray.h.
FixedArray& itk::FixedArray< TValueType, VLength >::operator= | ( | const ValueType | r[VLength] | ) |
FixedArray& itk::FixedArray< TValueType, VLength >::operator= | ( | const FixedArray< TFixedArrayValueType, VLength > & | r | ) | [inline] |
This destructor is not virtual for performance reasons. However, this means that subclasses cannot allocate memory.
The destructor is PURPOSELY NOT DEFINED, in order to prevent inefficient byte alignment of arrays of this object.
~FixedArray();
For a full discussion, see http://www.itk.org/mailman/private/insight-developers/2008-June/010480.html Operator= defined for a variety of types.
Reimplemented in itk::DiffusionTensor3D< TComponent >, and itk::DiffusionTensor3D< TComponent >.
Definition at line 175 of file itkFixedArray.h.
Referenced by itk::SymmetricSecondRankTensor< TComponent, 3 >::operator=().
bool itk::FixedArray< TValueType, VLength >::operator== | ( | const FixedArray< TValueType, VLength > & | r | ) | const |
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.
Referenced by itk::FixedArray< KernelType, itkGetStaticConstMacro(ImageDimension2)>::operator!=().
const_reference itk::FixedArray< TValueType, VLength >::operator[] | ( | unsigned long | index | ) | const [inline] |
Get various iterators to the array.
Definition at line 212 of file itkFixedArray.h.
reference itk::FixedArray< TValueType, VLength >::operator[] | ( | unsigned long | index | ) | [inline] |
Get various iterators to the array.
Definition at line 211 of file itkFixedArray.h.
const_reference itk::FixedArray< TValueType, VLength >::operator[] | ( | long | index | ) | const [inline] |
Get various iterators to the array.
Definition at line 210 of file itkFixedArray.h.
reference itk::FixedArray< TValueType, VLength >::operator[] | ( | long | index | ) | [inline] |
Get various iterators to the array.
Definition at line 209 of file itkFixedArray.h.
const_reference itk::FixedArray< TValueType, VLength >::operator[] | ( | unsigned int | index | ) | const [inline] |
Get various iterators to the array.
Definition at line 208 of file itkFixedArray.h.
reference itk::FixedArray< TValueType, VLength >::operator[] | ( | unsigned int | index | ) | [inline] |
Get various iterators to the array.
Definition at line 207 of file itkFixedArray.h.
const_reference itk::FixedArray< TValueType, VLength >::operator[] | ( | int | index | ) | const [inline] |
Get various iterators to the array.
Definition at line 206 of file itkFixedArray.h.
reference itk::FixedArray< TValueType, VLength >::operator[] | ( | int | index | ) | [inline] |
Get various iterators to the array.
Definition at line 205 of file itkFixedArray.h.
const_reference itk::FixedArray< TValueType, VLength >::operator[] | ( | unsigned short | index | ) | const [inline] |
Get various iterators to the array.
Definition at line 204 of file itkFixedArray.h.
reference itk::FixedArray< TValueType, VLength >::operator[] | ( | unsigned short | index | ) | [inline] |
Get various iterators to the array.
Definition at line 203 of file itkFixedArray.h.
const_reference itk::FixedArray< TValueType, VLength >::operator[] | ( | short | index | ) | const [inline] |
Get various iterators to the array.
Definition at line 202 of file itkFixedArray.h.
reference itk::FixedArray< TValueType, VLength >::operator[] | ( | short | index | ) | [inline] |
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 201 of file itkFixedArray.h.
ConstReverseIterator itk::FixedArray< TValueType, VLength >::rBegin | ( | ) | const |
Get various iterators to the array.
ReverseIterator itk::FixedArray< TValueType, VLength >::rBegin | ( | ) |
Get various iterators to the array.
ConstReverseIterator itk::FixedArray< TValueType, VLength >::rEnd | ( | ) | const |
Get various iterators to the array.
ReverseIterator itk::FixedArray< TValueType, VLength >::rEnd | ( | ) |
Get various iterators to the array.
void itk::FixedArray< TValueType, VLength >::SetElement | ( | unsigned short | index, | |
const_reference | value | |||
) | [inline] |
Set/Get element methods are more convenient in wrapping languages
Definition at line 216 of file itkFixedArray.h.
SizeType itk::FixedArray< TValueType, VLength >::Size | ( | ) | const |
Get various iterators to the array.
const unsigned int itk::FixedArray< TValueType, VLength >::Dimension = VLength [static] |
Dimension constant
Reimplemented in itk::CovariantVector< T, NVectorDimension >, itk::RGBAPixel< TComponent >, itk::RGBPixel< TComponent >, itk::SymmetricSecondRankTensor< TComponent, NDimension >, itk::Vector< T, NVectorDimension >, itk::CovariantVector< double, VImageDimension >, itk::CovariantVector< double, TImageDimension >, itk::CovariantVector< double, 3 >, itk::CovariantVector< double, 2 >, itk::CovariantVector< double, VDimension >, itk::CovariantVector< double, TPointDimension >, itk::RGBAPixel< TComponentType >, itk::RGBAPixel< float >, itk::RGBPixel< float >, itk::RGBPixel< TPixel >, itk::SymmetricSecondRankTensor< TComponent, 3 >, itk::Vector< double, VImageDimension >, itk::Vector< double, TSampleDimension >, itk::Vector< TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)>, itk::Vector< ScalarType, itkGetStaticConstMacro(ImageDimension)>, itk::Vector< double, 3 >, itk::Vector< TScalarType, itkGetStaticConstMacro(InputSpaceDimension)>, itk::Vector< double, TDimension >, itk::Vector< double, 2 >, itk::Vector< SpacingValueType, VImageDimension >, itk::Vector< NodeValueType,::itk::GetImageDimension< TImageType >::ImageDimension >, itk::Vector< TScalarType, 3 >, itk::Vector< double, VDimension >, itk::Vector< TScalarType, itkGetStaticConstMacro(SpaceDimension)>, itk::Vector< double, itkGetStaticConstMacro(ImageDimension) >, itk::Vector< double, TPointDimension >, itk::Vector< int, 2 >, itk::Vector< double, NSpaceDimension >, itk::Vector< float, VDimension >, itk::Vector< TScalarType, 6 >, and itk::Vector< CoordRepType, itkGetStaticConstMacro(SpaceDimension)>.
Definition at line 71 of file itkFixedArray.h.
const unsigned int itk::FixedArray< TValueType, VLength >::Length = VLength [static] |
Length constant
Reimplemented in itk::RGBAPixel< TComponent >, itk::RGBPixel< TComponent >, itk::RGBAPixel< TComponentType >, itk::RGBAPixel< float >, itk::RGBPixel< float >, and itk::RGBPixel< TPixel >.
Definition at line 68 of file itkFixedArray.h.