Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::ContinuousIndex< TCoordRep, VIndexDimension > Class Template Reference
[Image Access ObjectsImage Representation Objects]

#include <itkContinuousIndex.h>

Inheritance diagram for itk::ContinuousIndex< TCoordRep, VIndexDimension >:

Inheritance graph
[legend]
Collaboration diagram for itk::ContinuousIndex< TCoordRep, VIndexDimension >:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<class TCoordRep = double, unsigned int VIndexDimension = 2>
class itk::ContinuousIndex< TCoordRep, VIndexDimension >

A templated class holding a point in n-Dimensional image space.

ContinuousIndex is a templated class that holds a set of coordinates (components). The template parameter TCoordRep can be any data type that behaves like a primitive (or atomic) data type (int, short, float, complex). The VIndexDimension defines the number of components in the continous index array.

See also:
Point

Index

Definition at line 44 of file itkContinuousIndex.h.


Public Types

typedef Superclass::BaseArray BaseArray
typedef ValueType CArray [VLength]
typedef const ValueTypeconst_pointer
typedef const ValueTypeconst_reference
typedef BaseArray::ConstIterator ConstIterator
typedef TCoordRep CoordRepType
typedef Index< VIndexDimension > IndexType
typedef BaseArray::Iterator Iterator
typedef ValueTypepointer
typedef NumericTraits
< ValueType >::RealType 
RealType
typedef ValueTypereference
typedef ContinuousIndex Self
typedef unsigned int SizeType
typedef Point< TCoordRep,
VIndexDimension > 
Superclass
typedef TCoordRep ValueType
typedef Vector< ValueType,
NPointDimension > 
VectorType

Public Member Functions

 ContinuousIndex ()
vnl_vector< TCoordRep > Get_vnl_vector (void) const
vnl_vector_ref< TCoordRep > Get_vnl_vector (void)
VectorType GetVectorFromOrigin () const
vnl_vector< TCoordRep > GetVnlVector (void) const
vnl_vector_ref< TCoordRep > GetVnlVector (void)
 itkStaticConstMacro (Dimension, unsigned int, VLength)
 itkStaticConstMacro (Length, unsigned int, VLength)
 itkStaticConstMacro (PointDimension, unsigned int, NPointDimension)
 itkStaticConstMacro (IndexDimension, unsigned int, VIndexDimension)
Self operator+ (const VectorType &vec) const
const Selfoperator+= (const VectorType &vec)
Self operator- (const VectorType &vec) const
VectorType operator- (const Self &pnt) const
const Selfoperator-= (const VectorType &vec)
void SetToMidPoint (const Self &, const Self &)
RealType SquaredEuclideanDistanceTo (const Point< TCoordRepB, NPointDimension > &pa) const
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
void CastFrom (const Point< TCoordRepB, NPointDimension > &pa)
 ContinuousIndex (const IndexType &index)
 ContinuousIndex (const ValueType r[IndexDimension])
 ContinuousIndex (const Self &r)
RealType EuclideanDistanceTo (const Point< TCoordRepB, NPointDimension > &pa) const
const ValueTypeGetDataPointer () const
ValueTypeGetDataPointer ()
const_reference GetElement (unsigned short index) const
void SetElement (unsigned short index, const_reference value)
bool operator!= (const FixedArray &r) const
bool operator== (const FixedArray &r) const
bool operator!= (const Self &pt) const
bool operator== (const Self &pt) 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)
void SetToBarycentricCombination (const Self *P, const double *weights, unsigned int N)
void SetToBarycentricCombination (const Self &A, const Self &B, const Self &C, double weightA, double weightB)
void SetToBarycentricCombination (const Self &A, const Self &B, double alpha)

Static Public Member Functions

static FixedArray Filled (const ValueType &)
static unsigned int GetPointDimension ()

Member Typedef Documentation

template<class TCoordRep = double, unsigned int VIndexDimension = 2>
typedef Superclass::BaseArray itk::ContinuousIndex< TCoordRep, VIndexDimension >::BaseArray

The Array type from which this Vector is derived.

Reimplemented from itk::Point< TCoordRep, VIndexDimension >.

Definition at line 63 of file itkContinuousIndex.h.

typedef ValueType itk::FixedArray< TCoordRep , VLength >::CArray[VLength] [inherited]

A type representing the C-array version of this FixedArray.

Definition at line 77 of file itkFixedArray.h.

typedef const ValueType* itk::FixedArray< TCoordRep , VLength >::const_pointer [inherited]

A const pointer to the ValueType.

Definition at line 125 of file itkFixedArray.h.

typedef const ValueType& itk::FixedArray< TCoordRep , VLength >::const_reference [inherited]

A const reference to the ValueType.

Definition at line 131 of file itkFixedArray.h.

template<class TCoordRep = double, unsigned int VIndexDimension = 2>
typedef BaseArray::ConstIterator itk::ContinuousIndex< TCoordRep, VIndexDimension >::ConstIterator

A const iterator through the array.

Reimplemented from itk::Point< TCoordRep, VIndexDimension >.

Definition at line 65 of file itkContinuousIndex.h.

template<class TCoordRep = double, unsigned int VIndexDimension = 2>
typedef TCoordRep itk::ContinuousIndex< TCoordRep, VIndexDimension >::CoordRepType

Reimplemented from itk::Point< TCoordRep, VIndexDimension >.

Definition at line 54 of file itkContinuousIndex.h.

template<class TCoordRep = double, unsigned int VIndexDimension = 2>
typedef Index<VIndexDimension> itk::ContinuousIndex< TCoordRep, VIndexDimension >::IndexType

Corresponding discrete index type

Definition at line 60 of file itkContinuousIndex.h.

template<class TCoordRep = double, unsigned int VIndexDimension = 2>
typedef BaseArray::Iterator itk::ContinuousIndex< TCoordRep, VIndexDimension >::Iterator

An iterator through the array.

Reimplemented from itk::Point< TCoordRep, VIndexDimension >.

Definition at line 64 of file itkContinuousIndex.h.

typedef ValueType* itk::FixedArray< TCoordRep , VLength >::pointer [inherited]

A pointer to the ValueType.

Definition at line 122 of file itkFixedArray.h.

typedef NumericTraits< ValueType >::RealType itk::Point< TCoordRep , NPointDimension >::RealType [inherited]

Definition at line 57 of file itkPoint.h.

typedef ValueType& itk::FixedArray< TCoordRep , VLength >::reference [inherited]

A reference to the ValueType.

Definition at line 128 of file itkFixedArray.h.

template<class TCoordRep = double, unsigned int VIndexDimension = 2>
typedef ContinuousIndex itk::ContinuousIndex< TCoordRep, VIndexDimension >::Self

Standard class typedefs.

Reimplemented from itk::Point< TCoordRep, VIndexDimension >.

Definition at line 48 of file itkContinuousIndex.h.

typedef unsigned int itk::FixedArray< TCoordRep , VLength >::SizeType [inherited]

Definition at line 133 of file itkFixedArray.h.

template<class TCoordRep = double, unsigned int VIndexDimension = 2>
typedef Point<TCoordRep,VIndexDimension> itk::ContinuousIndex< TCoordRep, VIndexDimension >::Superclass

Reimplemented from itk::Point< TCoordRep, VIndexDimension >.

Definition at line 49 of file itkContinuousIndex.h.

template<class TCoordRep = double, unsigned int VIndexDimension = 2>
typedef TCoordRep itk::ContinuousIndex< TCoordRep, VIndexDimension >::ValueType

ValueType can be used to declare a variable that is the same type as a data element held in an Point.

Reimplemented from itk::Point< TCoordRep, VIndexDimension >.

Definition at line 53 of file itkContinuousIndex.h.

typedef Vector< ValueType, NPointDimension > itk::Point< TCoordRep , NPointDimension >::VectorType [inherited]

VectorType define the difference between two Points

Definition at line 72 of file itkPoint.h.


Constructor & Destructor Documentation

template<class TCoordRep = double, unsigned int VIndexDimension = 2>
itk::ContinuousIndex< TCoordRep, VIndexDimension >::ContinuousIndex (  )  [inline]

Default constructor has nothing to do.

Definition at line 68 of file itkContinuousIndex.h.

template<class TCoordRep = double, unsigned int VIndexDimension = 2>
itk::ContinuousIndex< TCoordRep, VIndexDimension >::ContinuousIndex ( const Self r  )  [inline]

Pass-through constructor to the Point base class.

Definition at line 71 of file itkContinuousIndex.h.

template<class TCoordRep = double, unsigned int VIndexDimension = 2>
itk::ContinuousIndex< TCoordRep, VIndexDimension >::ContinuousIndex ( const ValueType  r[IndexDimension]  )  [inline]

Definition at line 72 of file itkContinuousIndex.h.

template<class TCoordRep = double, unsigned int VIndexDimension = 2>
itk::ContinuousIndex< TCoordRep, VIndexDimension >::ContinuousIndex ( const IndexType index  )  [inline]

Construct from discrete index type

Definition at line 76 of file itkContinuousIndex.h.


Member Function Documentation

ConstIterator itk::FixedArray< TCoordRep , VLength >::Begin ( void   )  const [inherited]

Iterator itk::FixedArray< TCoordRep , VLength >::Begin ( void   )  [inherited]

Get various iterators to the array.

void itk::Point< TCoordRep , NPointDimension >::CastFrom ( const Point< TCoordRepB, NPointDimension > &  pa  )  [inline, inherited]

Copy from another Point with a different representation type. Casting is done with C-Like rules

Definition at line 220 of file itkPoint.h.

ConstIterator itk::FixedArray< TCoordRep , VLength >::End ( void   )  const [inherited]

Iterator itk::FixedArray< TCoordRep , VLength >::End ( void   )  [inherited]

RealType itk::Point< TCoordRep , NPointDimension >::EuclideanDistanceTo ( const Point< TCoordRepB, NPointDimension > &  pa  )  const [inline, inherited]

Compute the Euclidean Distance from this point to another point with a different representation type. Casting is done with C-Like rules

Definition at line 250 of file itkPoint.h.

void itk::FixedArray< TCoordRep , VLength >::Fill ( const ValueType &   )  [inherited]

static FixedArray itk::FixedArray< TCoordRep , VLength >::Filled ( const ValueType &   )  [static, inherited]

vnl_vector<TCoordRep > itk::Point< TCoordRep , NPointDimension >::Get_vnl_vector ( void   )  const [inherited]

Get a vnl_vector with a copy of the internal memory block.

Deprecated:
Use GetVnlVector() instead.

vnl_vector_ref<TCoordRep > itk::Point< TCoordRep , NPointDimension >::Get_vnl_vector ( void   )  [inherited]

Get a vnl_vector_ref referencing the same memory block

Deprecated:
Use GetVnlVector() instead.

const ValueType* itk::FixedArray< TCoordRep , VLength >::GetDataPointer (  )  const [inline, inherited]

Definition at line 218 of file itkFixedArray.h.

ValueType* itk::FixedArray< TCoordRep , VLength >::GetDataPointer (  )  [inline, inherited]

Return a pointer to the data.

Definition at line 217 of file itkFixedArray.h.

const_reference itk::FixedArray< TCoordRep , VLength >::GetElement ( unsigned short  index  )  const [inline, inherited]

Definition at line 213 of file itkFixedArray.h.

static unsigned int itk::Point< TCoordRep , NPointDimension >::GetPointDimension (  )  [inline, static, inherited]

Get the dimension (size) of the point.

Definition at line 68 of file itkPoint.h.

VectorType itk::Point< TCoordRep , NPointDimension >::GetVectorFromOrigin (  )  const [inherited]

Access an element of a point.

vnl_vector<TCoordRep > itk::Point< TCoordRep , NPointDimension >::GetVnlVector ( void   )  const [inherited]

Get a vnl_vector with a copy of the internal memory block.

vnl_vector_ref<TCoordRep > itk::Point< TCoordRep , NPointDimension >::GetVnlVector ( void   )  [inherited]

Get a vnl_vector_ref referencing the same memory block

itk::FixedArray< TCoordRep , VLength >::itkStaticConstMacro ( Dimension  ,
unsigned  int,
VLength   
) [inherited]

Dimension constant

itk::FixedArray< TCoordRep , VLength >::itkStaticConstMacro ( Length  ,
unsigned  int,
VLength   
) [inherited]

Length constant

itk::Point< TCoordRep , NPointDimension >::itkStaticConstMacro ( PointDimension  ,
unsigned  int,
NPointDimension   
) [inherited]

Dimension of the Space

template<class TCoordRep = double, unsigned int VIndexDimension = 2>
itk::ContinuousIndex< TCoordRep, VIndexDimension >::itkStaticConstMacro ( IndexDimension  ,
unsigned  int,
VIndexDimension   
)

Dimension of the Space

bool itk::FixedArray< TCoordRep , VLength >::operator!= ( const FixedArray< TCoordRep, NPointDimension > &  r  )  const [inline, inherited]

Definition at line 189 of file itkFixedArray.h.

bool itk::Point< TCoordRep , NPointDimension >::operator!= ( const Self pt  )  const [inline, inherited]

Compare two points for inequality.

Definition at line 101 of file itkPoint.h.

Self itk::Point< TCoordRep , NPointDimension >::operator+ ( const VectorType vec  )  const [inherited]

Add a vector to a point. Return a new point.

const Self& itk::Point< TCoordRep , NPointDimension >::operator+= ( const VectorType vec  )  [inherited]

Point operator+=. Adds a vector to the current point.

Self itk::Point< TCoordRep , NPointDimension >::operator- ( const VectorType vec  )  const [inherited]

Subtract a vector from a point. Return a new point.

VectorType itk::Point< TCoordRep , NPointDimension >::operator- ( const Self pnt  )  const [inherited]

Computes the Vector difference between two points

const Self& itk::Point< TCoordRep , NPointDimension >::operator-= ( const VectorType vec  )  [inherited]

Point operator-=. Subtracts a vector from a current point.

bool itk::FixedArray< TCoordRep , VLength >::operator== ( const FixedArray< TCoordRep, NPointDimension > &  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.

bool itk::Point< TCoordRep , NPointDimension >::operator== ( const Self pt  )  const [inline, inherited]

Compare two points for equality.

Definition at line 90 of file itkPoint.h.

const_reference itk::FixedArray< TCoordRep , VLength >::operator[] ( unsigned long  index  )  const [inline, inherited]

Definition at line 207 of file itkFixedArray.h.

reference itk::FixedArray< TCoordRep , VLength >::operator[] ( unsigned long  index  )  [inline, inherited]

Definition at line 206 of file itkFixedArray.h.

const_reference itk::FixedArray< TCoordRep , VLength >::operator[] ( long  index  )  const [inline, inherited]

Definition at line 205 of file itkFixedArray.h.

reference itk::FixedArray< TCoordRep , VLength >::operator[] ( long  index  )  [inline, inherited]

Definition at line 204 of file itkFixedArray.h.

const_reference itk::FixedArray< TCoordRep , VLength >::operator[] ( unsigned int  index  )  const [inline, inherited]

Definition at line 203 of file itkFixedArray.h.

reference itk::FixedArray< TCoordRep , VLength >::operator[] ( unsigned int  index  )  [inline, inherited]

Definition at line 202 of file itkFixedArray.h.

const_reference itk::FixedArray< TCoordRep , VLength >::operator[] ( int  index  )  const [inline, inherited]

Definition at line 201 of file itkFixedArray.h.

reference itk::FixedArray< TCoordRep , VLength >::operator[] ( int  index  )  [inline, inherited]

Definition at line 200 of file itkFixedArray.h.

const_reference itk::FixedArray< TCoordRep , VLength >::operator[] ( unsigned short  index  )  const [inline, inherited]

Definition at line 199 of file itkFixedArray.h.

reference itk::FixedArray< TCoordRep , VLength >::operator[] ( unsigned short  index  )  [inline, inherited]

Definition at line 198 of file itkFixedArray.h.

const_reference itk::FixedArray< TCoordRep , VLength >::operator[] ( short  index  )  const [inline, inherited]

Definition at line 197 of file itkFixedArray.h.

reference itk::FixedArray< TCoordRep , 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.

ConstReverseIterator itk::FixedArray< TCoordRep , VLength >::rBegin (  )  const [inherited]

ReverseIterator itk::FixedArray< TCoordRep , VLength >::rBegin (  )  [inherited]

ConstReverseIterator itk::FixedArray< TCoordRep , VLength >::rEnd (  )  const [inherited]

ReverseIterator itk::FixedArray< TCoordRep , VLength >::rEnd (  )  [inherited]

void itk::FixedArray< TCoordRep , 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::Point< TCoordRep , NPointDimension >::SetToBarycentricCombination ( const Self P,
const double *  weights,
unsigned int  N 
) [inherited]

Set the current point to a barycentric combination of an array of N points An array of (N-1) values is expected to weight the contribution of the first (N-1) points, the weight of the Nth point is computed to ensure that the N weights sum 1.

This method computes:

\[ \overrightarrow{P}= \sum_{i=1}^{N-1} w_i * \overrightarrow{P}_i + \left(1- \sum_{i=1}^{N-1} w_i\right) * \overrightarrow{P}_N \]

void itk::Point< TCoordRep , NPointDimension >::SetToBarycentricCombination ( const Self A,
const Self B,
const Self C,
double  weightA,
double  weightB 
) [inherited]

Set the current point to a barycentric combination of three points Two values are expected to weight the contribution of the first two points, the weight of for the third point is computed to ensure that the three weights sum 1.

This method computes:

\[ \overrightarrow{P}= w_1 * \overrightarrow{P}_1 + w_2 * \overrightarrow{P}_2 + (1-w_1-w_2 ) * \overrightarrow{P}_3 \]

If the two weight are $ \in [0,1] $ , The resulting point will alway be placed inside the triangle formed by the three points given as arguments.

void itk::Point< TCoordRep , NPointDimension >::SetToBarycentricCombination ( const Self A,
const Self B,
double  alpha 
) [inherited]

Set the current point to a barycentric combination of the two points given as arguments.

Parameters:
\form::154 = weight for the first point
The first point is multiplied by $ \alpha $, the second is multiplied by * $ (1-\alpha) $, and the sum is stored in the Point on which the method is invoked.

\[ \overrightarrow{P}=\alpha * \overrightarrow{A}+ (1-\alpha)*\overrightarrow{B} \]

If the value of $ \alpha \in [0,1] $, the resulting point will be placed in the line segment $ \overline{AB} $ joining $ \overrightarrow{A} $ and $ \overrightarrow{A} $

If the value of $ \alpha < 0 $ the resulting point will be placed outside the line segment $ \overline{AB} $ on the side of $ \overrightarrow{A} $.

If the value of $ \alpha > 1 $ the resulting point will be placed outside the line segment $ \overline{AB} $ on the side of $ \overrightarrow{B} $.

See also:
SetToMedian

void itk::Point< TCoordRep , NPointDimension >::SetToMidPoint ( const Self ,
const Self  
) [inherited]

Set to median point between the two points given as arguments

This method computes:

\[ \overrightarrow{P}=\frac{(\overrightarrow{A}+\overrightarrow{B})}{2} \]

using the two Points given as arguments, and store the result in the Point on which the method is invoked.

SizeType itk::FixedArray< TCoordRep , VLength >::Size ( void   )  const [inherited]

RealType itk::Point< TCoordRep , NPointDimension >::SquaredEuclideanDistanceTo ( const Point< TCoordRepB, NPointDimension > &  pa  )  const [inline, inherited]

Compute the Squared Euclidean Distance from this point to another point with a different representation type. Casting is done with C-Like rules

Definition at line 234 of file itkPoint.h.


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

Generated at Thu May 28 13:26:52 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000