Orfeo Toolbox  3.16
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | List of all members
itk::FixedArray< TValueType, VLength > Class Template Reference

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::CovariantVector< PrecisionType, PointDimension >, itk::RGBAPixel< float >, itk::RGBAPixel< TComponentType >, itk::RGBPixel< float >, itk::RGBPixel< TPixel >, 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< PrecisionType, 2 >, itk::Vector< PrecisionType, PointDimension >, 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)>.

+ Collaboration diagram for itk::FixedArray< TValueType, VLength >:

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 ValueTypeconst_pointer
 
typedef const ValueTypeconst_reference
 
typedef const ValueTypeConstIterator
 
typedef ValueTypeIterator
 
typedef ValueTypepointer
 
typedef ValueTypereference
 
typedef unsigned int SizeType
 
typedef TValueType ValueType
 

Public Member Functions

 FixedArray ()
 
 FixedArray (const ValueType r[VLength])
 
 FixedArray (const ValueType &r)
 
template<class TFixedArrayValueType >
 FixedArray (const FixedArray< TFixedArrayValueType, VLength > &r)
 
Iterator Begin ()
 
ConstIterator Begin () const
 
Iterator End ()
 
ConstIterator End () const
 
void Fill (const ValueType &)
 
ValueTypeGetDataPointer ()
 
const ValueTypeGetDataPointer () const
 
const_reference GetElement (unsigned short index) const
 
bool operator!= (const FixedArray &r) const
 
template<class TFixedArrayValueType >
FixedArrayoperator= (const FixedArray< TFixedArrayValueType, VLength > &r)
 
FixedArrayoperator= (const ValueType r[VLength])
 
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
 
ReverseIterator rBegin ()
 
ConstReverseIterator rBegin () const
 
ReverseIterator rEnd ()
 
ConstReverseIterator rEnd () const
 
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
 

Private Attributes

CArray m_InternalArray
 

Detailed Description

template<typename TValueType, unsigned int VLength = 3>
class itk::FixedArray< TValueType, 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.

Member Typedef Documentation

template<typename TValueType, unsigned int VLength = 3>
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.

template<typename TValueType, unsigned int VLength = 3>
typedef const ValueType* itk::FixedArray< TValueType, VLength >::const_pointer

A const pointer to the ValueType.

Definition at line 129 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
typedef const ValueType& itk::FixedArray< TValueType, VLength >::const_reference

A const reference to the ValueType.

Definition at line 135 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
typedef const ValueType* itk::FixedArray< TValueType, VLength >::ConstIterator

A const iterator through the array.

Definition at line 83 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
typedef ValueType* itk::FixedArray< TValueType, VLength >::Iterator

An iterator through the array.

Definition at line 80 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
typedef ValueType* itk::FixedArray< TValueType, VLength >::pointer

A pointer to the ValueType.

Definition at line 126 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
typedef ValueType& itk::FixedArray< TValueType, VLength >::reference

A reference to the ValueType.

Definition at line 132 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
typedef unsigned int itk::FixedArray< TValueType, VLength >::SizeType

Definition at line 137 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
typedef TValueType itk::FixedArray< TValueType, VLength >::ValueType

The element type stored at each location in the FixedArray.

Definition at line 74 of file itkFixedArray.h.

Constructor & Destructor Documentation

template<typename TValueType , unsigned int VLength>
itk::FixedArray< TValueType, VLength >::FixedArray ( )

Constructors

Default constructor uses compiler's default initialization of memory. For efficiency, no initialization to zero is done.

Definition at line 32 of file itkFixedArray.txx.

template<typename TValueType , unsigned int VLength>
itk::FixedArray< TValueType, VLength >::FixedArray ( const ValueType  r[VLength])

Constructor assumes input points to array of correct size. Values are copied individually instead of with a binary copy. This allows the ValueType's assignment operator to be executed.

Definition at line 56 of file itkFixedArray.txx.

template<typename TValueType , unsigned int VLength>
itk::FixedArray< TValueType, VLength >::FixedArray ( const ValueType r)

Constructor to initialize entire array to one value.

Definition at line 41 of file itkFixedArray.txx.

template<typename TValueType, unsigned int VLength = 3>
template<class TFixedArrayValueType >
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 147 of file itkFixedArray.h.

Member Function Documentation

template<typename TValueType , unsigned int VLength>
FixedArray< TValueType, VLength >::Iterator itk::FixedArray< TValueType, VLength >::Begin ( void  )
template<typename TValueType , unsigned int VLength>
FixedArray< TValueType, VLength >::ConstIterator itk::FixedArray< TValueType, VLength >::Begin ( void  ) const

Get a ConstIterator for the beginning of the FixedArray.

Definition at line 130 of file itkFixedArray.txx.

template<typename TValueType , unsigned int VLength>
FixedArray< TValueType, VLength >::Iterator itk::FixedArray< TValueType, VLength >::End ( void  )
template<typename TValueType , unsigned int VLength>
FixedArray< TValueType, VLength >::ConstIterator itk::FixedArray< TValueType, VLength >::End ( void  ) const

Get a ConstIterator for the end of the FixedArray.

Definition at line 154 of file itkFixedArray.txx.

template<typename TValueType , unsigned int VLength>
void itk::FixedArray< TValueType, VLength >::Fill ( const ValueType value)

Fill all elements of the array with the given value.

Definition at line 226 of file itkFixedArray.txx.

Referenced by itk::bio::CellularAggregate< NSpaceDimension >::Add(), otb::KMeansImageClassificationFilter< TInputImage, TOutputImage, VMaxSampleDimension, TMaskImage >::BeforeThreadedGenerateData(), itk::FlatStructuringElement< VDimension >::Box(), itk::VectorFuzzyConnectednessImageFilter< TInputImage, TOutputImage >::Compute_Affinity(), itk::SpatialObject< TDimension >::ComputeBoundingBox(), otb::PolyLineParametricPathWithValue< TValue, VDimension >::ComputeBoundingRegion(), itk::DeformableSimplexMesh3DBalloonForceFilter< TInputMesh, TOutputMesh >::ComputeExternalForce(), itk::DeformableSimplexMesh3DGradientConstraintForceFilter< TInputMesh, TOutputMesh >::ComputeExternalForce(), itk::DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >::ComputeExternalForce(), itk::DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >::ComputeGeometry(), itk::DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >::ComputeInternalForce(), itk::FiniteDifferenceFunction< TImageType >::ComputeNeighborhoodScales(), itk::SimplexMesh< TPixelType, VDimension, TMeshTraits >::ComputeNormal(), itk::TubeSpatialObject< TDimension, TTubePointType >::ComputeTangentAndNormals(), itk::NCCRegistrationFunction< TFixedImage, TMovingImage, TDeformationField >::ComputeUpdate(), otb::NCCRegistrationFunction< TFixedImage, TMovingImage, TDeformationField >::ComputeUpdate(), otb::VectorDataExtractROI< TVectorData >::ComputeVertexListBoundingRegion(), otb::OGRIOHelper::ConvertGeometryToPointNode(), otb::KMLVectorDataIO::ConvertGeometryToPointNode(), otb::Curve2D::Curve2D(), otb::Curves2DWidget::Curves2DWidget(), itk::SpatialObject< TDimension >::DerivativeAt(), otb::ViewerViewGUI::DisplayDiaporama(), itk::fem::FEMRegistrationFilter< TMovingImage, TFixedImage >::EnforceDiffeomorphism(), otb::GroundSpacingImageFunction< TInputImage, TCoordRep >::EvaluateAtIndex(), itk::VectorMeanImageFunction< TInputImage, TCoordRep >::EvaluateAtIndex(), itk::FourierSeriesPath< VDimension >::EvaluateDerivative(), itk::FixedArray< TValueType, VLength >::Filled(), otb::BSplinesInterpolateTransformDeformationFieldGenerator< TPointSet, TDeformationField >::GenerateData(), otb::ImageToSURFKeyPointSetFilter< TInputImage, TOutputPointSet >::GenerateData(), itk::ActiveShapeModelGradientSearchMethod< TImage >::GenerateData(), itk::ActiveShapeModelCalculator< TImage >::GenerateData(), itk::BSplineScatteredDataPointSetToImageFilter< TInputPointSet, TOutputImage >::GenerateOutputImageFast(), itk::VoronoiDiagram2DGenerator< TCoordType >::GenerateVDFortune(), itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetAxesLength(), itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetBoundingBox(), otb::ogr::ImageReference< double >::ImageReference(), otb::RationalTransform< TScalarType, Dimension >::InitalizeParameters(), itk::FastMarchingUpwindGradientImageFilter< TLevelSet, TSpeedImage >::Initialize(), otb::Functor::LabelObjectToPolygonFunctor< TLabelObject, TPolygon >::LabelObjectToPolygonFunctor(), itk::LineSpatialObjectPoint< TPointDimension >::LineSpatialObjectPoint(), itk::MatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::MatrixOffsetTransformBase(), otb::Functor::StatisticsAttributesLabelObjectFunctor< TLabelObject, TFeatureImage >::operator()(), otb::Functor::AlphaBlendingFunctor< itk::RGBAPixel< TInputInternalPixel1 >, itk::RGBAPixel< TInputInternalPixel2 >, itk::RGBAPixel< TOutputInternalPixel > >::operator()(), otb::Functor::PolarimetricSynthesisFunctor< TInput1, TInput2, TInput3, TInput4, TOutput >::PolarimetricSynthesisFunctor(), itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >::RecomputeGaussianKernel(), otb::RegionGlComponent::RegionGlComponent(), otb::CrossGlComponent::Render(), otb::CircleGlComponent::Render(), otb::VectorDataGlComponent< TVectorData >::Render(), otb::Curves2DWidget::RenderAxis(), itk::Rigid3DPerspectiveTransform< TScalarType >::Rigid3DPerspectiveTransform(), itk::ScaleSkewVersor3DTransform< TScalarType >::ScaleSkewVersor3DTransform(), itk::ScaleTransform< TScalarType, NDimensions >::ScaleTransform(), itk::ScaleVersor3DTransform< TScalarType >::ScaleVersor3DTransform(), itk::ImageSpatialObject< TDimension, TPixelType >::SetImage(), itk::MovingHistogramImageFilterBase< TInputImage, TOutputImage, TKernel >::SetKernel(), itk::MeasurementVectorTraits::SetLength(), itk::DiscreteGaussianDerivativeImageFilter< TInputImage, TOutputImage >::SetMaximumError(), itk::PermuteAxesImageFilter< TImage >::SetOrder(), itk::DiscreteGaussianDerivativeImageFilter< TInputImage, TOutputImage >::SetOrder(), itk::DiscreteGaussianDerivativeImageFilter< TInputImage, TOutputImage >::SetVariance(), otb::ImageViewerBase< TPixel, TLabel >::SetViewModel(), itk::SimplexMeshGeometry::SimplexMeshGeometry(), itk::SymmetricEigenSystem< TMatrixElement, VNumberOfRows >::SymmetricEigenSystem(), otb::KMeansImageClassificationFilter< TInputImage, TOutputImage, VMaxSampleDimension, TMaskImage >::ThreadedGenerateData(), itk::MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel, THistogram >::ThreadedGenerateData(), itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::ThreadedGenerateData(), itk::KernelTransform< TScalarType, NDimensions >::TransformPoint(), itk::MattesMutualInformationImageToImageMetric< TFixedImage, TMovingImage >::TransformPoint(), itk::BSplineDeformableTransform< TScalarType, NDimensions, VSplineOrder >::TransformPoint(), itk::TranslationTransform< TScalarType, NDimensions >::TranslationTransform(), otb::StandardImageViewer< TImage, TVectorData, TWidgetManager >::Update(), itk::BSplineScatteredDataPointSetToImageFilter< TInputPointSet, TOutputImage >::UpdatePointSet(), otb::VectorDataModel::VectorDataModel(), and otb::VerticalAsymptoteCurve::VerticalAsymptoteCurve().

template<typename TValueType , unsigned int VLength>
FixedArray< TValueType, VLength > itk::FixedArray< TValueType, VLength >::Filled ( const ValueType value)
static

Return an FixedArray with all elements assigned to the given value.

Definition at line 242 of file itkFixedArray.txx.

References itk::FixedArray< TValueType, VLength >::Fill().

template<typename TValueType, unsigned int VLength = 3>
ValueType* itk::FixedArray< TValueType, VLength >::GetDataPointer ( )
inline
template<typename TValueType, unsigned int VLength = 3>
const ValueType* itk::FixedArray< TValueType, VLength >::GetDataPointer ( ) const
inline

Definition at line 217 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::GetElement ( unsigned short  index) const
inline
template<typename TValueType, unsigned int VLength = 3>
bool itk::FixedArray< TValueType, VLength >::operator!= ( const FixedArray< TValueType, VLength > &  r) const
inline

Definition at line 191 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
template<class TFixedArrayValueType >
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.htmlOperator= defined for a variety of types.

Definition at line 173 of file itkFixedArray.h.

Referenced by itk::SymmetricSecondRankTensor< TComponent, 3 >::operator=().

template<typename TValueType , unsigned int VLength>
FixedArray< TValueType, VLength > & itk::FixedArray< TValueType, VLength >::operator= ( const ValueType  r[VLength])

Assignment operator assumes input points to array of correct size. Values are copied individually instead of with a binary copy. This allows the ValueType's assignment operator to be executed.

Definition at line 75 of file itkFixedArray.txx.

template<typename TValueType , unsigned int VLength>
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.

Operator != compares different types of arrays.

Definition at line 94 of file itkFixedArray.txx.

References itk::FixedArray< TValueType, VLength >::Begin().

Referenced by itk::FixedArray< TInternalImageFunctionType::CoordRepType, NPointDimension >::operator!=().

template<typename TValueType, unsigned int VLength = 3>
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 197 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::operator[] ( short  index) const
inline

Definition at line 198 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
reference itk::FixedArray< TValueType, VLength >::operator[] ( unsigned short  index)
inline

Definition at line 199 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::operator[] ( unsigned short  index) const
inline

Definition at line 200 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
reference itk::FixedArray< TValueType, VLength >::operator[] ( int  index)
inline

Definition at line 201 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::operator[] ( int  index) const
inline

Definition at line 202 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
reference itk::FixedArray< TValueType, VLength >::operator[] ( unsigned int  index)
inline

Definition at line 203 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::operator[] ( unsigned int  index) const
inline

Definition at line 204 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
reference itk::FixedArray< TValueType, VLength >::operator[] ( long  index)
inline

Definition at line 205 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::operator[] ( long  index) const
inline

Definition at line 206 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
reference itk::FixedArray< TValueType, VLength >::operator[] ( unsigned long  index)
inline

Definition at line 207 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::operator[] ( unsigned long  index) const
inline

Definition at line 208 of file itkFixedArray.h.

template<typename TValueType , unsigned int VLength>
FixedArray< TValueType, VLength >::ReverseIterator itk::FixedArray< TValueType, VLength >::rBegin ( )

Get a begin ReverseIterator.

Definition at line 166 of file itkFixedArray.txx.

template<typename TValueType , unsigned int VLength>
FixedArray< TValueType, VLength >::ConstReverseIterator itk::FixedArray< TValueType, VLength >::rBegin ( ) const

Get a begin ConstReverseIterator.

Definition at line 178 of file itkFixedArray.txx.

template<typename TValueType , unsigned int VLength>
FixedArray< TValueType, VLength >::ReverseIterator itk::FixedArray< TValueType, VLength >::rEnd ( )

Get an end ReverseIterator.

Definition at line 190 of file itkFixedArray.txx.

template<typename TValueType , unsigned int VLength>
FixedArray< TValueType, VLength >::ConstReverseIterator itk::FixedArray< TValueType, VLength >::rEnd ( ) const

Get an end ConstReverseIterator.

Definition at line 202 of file itkFixedArray.txx.

template<typename TValueType, unsigned int VLength = 3>
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 211 of file itkFixedArray.h.

template<typename TValueType , unsigned int VLength>
FixedArray< TValueType, VLength >::SizeType itk::FixedArray< TValueType, VLength >::Size ( void  ) const

Member Data Documentation

template<typename TValueType, unsigned int VLength = 3>
const unsigned int itk::FixedArray< TValueType, VLength >::Dimension = VLength
static

Dimension constant

Definition at line 71 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const unsigned int itk::FixedArray< TValueType, VLength >::Length = VLength
static

Length constant

Definition at line 68 of file itkFixedArray.h.

Referenced by itk::MetaArrowConverter< NDimensions >::ArrowSpatialObjectToMetaArrow().

template<typename TValueType, unsigned int VLength = 3>
CArray itk::FixedArray< TValueType, VLength >::m_InternalArray
private

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

Generated at Sun May 26 2013 01:47:04 for Orfeo Toolbox with doxygen 1.8.3.1