#include <itkVariableLengthVector.h>
Collaboration diagram for itk::VariableLengthVector< TValueType >:

This class is templated over the data type. This data-type is meant to a scalar, such as float, double etc...
Arrays. 1. FixedArray - Compile time fixed length arrays that's intended to represent an enumerated collection of n entities. 2. Array - Run time resizeable array that is intended to hold a collection of n entities 3. Vector - Compile time fixed length array that is intended to hold a collection of n data types. A vector usually has a mathematical meaning. It should only be used when mathematical operations such as addition, multiplication by a scalar, product etc make sense. 4. VariableLengthVector - Run time array that is intended to hold a collection of scalar data types. Again, it should be used only when mathematical operations on it are relevant. If not, use an Array. 5. Point - Represents the spatial coordinates of a spatial location. Operators on Point reflect geometrical concepts.VariableLengthVector< bool >
vnl_vector to avoid being limited by the explicit template instantiations of vnl_vector and other hacks that vnl folks have been forced to use.
Definition at line 68 of file itkVariableLengthVector.h.
Public Types | |
| typedef TValueType | ComponentType |
| typedef unsigned int | ElementIdentifier |
| typedef NumericTraits< ValueType >::RealType | RealValueType |
| typedef VariableLengthVector | Self |
| typedef TValueType | ValueType |
Public Member Functions | |
| TValueType * | AllocateElements (ElementIdentifier size) const |
| void | Fill (TValueType const &v) |
| const TValueType * | GetDataPointer () |
| const TValueType & | GetElement (unsigned int i) const |
| unsigned int | GetNumberOfElements (void) const |
| unsigned int | GetSize (void) const |
| RealValueType | GetSquaredNorm () const |
| template<class T> | |
| Self | operator * (T s) const |
| Assignment | operator **/template (const VariableLengthVector< T > &v) |
| template<class T> | |
| Self & | operator *= (T s) |
| bool | operator!= (const Self &v) const |
| Self | operator+ (TValueType s) const |
| template<class T> | |
| Mathematical operators *note For the operators do not check to see of the length of *the vectors are the same For instance it is assumed that if you are adding *VariableLengthVector a and they are of the same length *Self | operator+ (const VariableLengthVector< T > &v) const |
| Self & | operator++ (int) |
| Self & | operator++ () |
| Self & | operator+= (TValueType s) |
| template<class T> | |
| Self & | operator+= (const VariableLengthVector< T > &v) |
| Self & | operator- () |
| Self | operator- (TValueType s) const |
| template<class T> | |
| Self | operator- (const VariableLengthVector< T > &v) const |
| Self & | operator-- (int) |
| Self & | operator-- () |
| Self & | operator-= (TValueType s) |
| template<class T> | |
| Self & | operator-= (const VariableLengthVector< T > &v) |
| template<class T> | |
| Self | operator/ (T s) const |
| template<class T> | |
| Self & | operator/= (T s) |
| const Self & | operator= (const Self &v) |
| bool | operator== (const Self &v) const |
| TValueType const & | operator[] (unsigned int i) const |
| TValueType & | operator[] (unsigned int i) |
| void | Reserve (ElementIdentifier) |
| void | SetData (TValueType *data, unsigned int sz, bool LetArrayManageMemory=false) |
| void | SetData (TValueType *data, bool LetArrayManageMemory=false) |
| void | SetElement (unsigned int i, const TValueType &value) |
| Set the size to that given **If c destroyExistingData is c the existing data is copied over and *new space is if necessary If the length to reserve is less *than the current number of then an appropriate number of elements *are discarded *If c the size is set destructively to the length given If the *length is different from the current existing data will be lost *The default is c true *void | SetSize (unsigned int sz, bool destroyExistingData=true) |
| Return the number of elements in the Array *unsigned int | Size (void) const |
| VariableLengthVector (const VariableLengthVector< TValueType > &v) | |
| template<class T> | |
| *endcode ** | VariableLengthVector (const VariableLengthVector< T > &v) |
| VariableLengthVector (const ValueType *data, unsigned int sz, bool LetArrayManageMemory=false) | |
| VariableLengthVector (ValueType *data, unsigned int sz, bool LetArrayManageMemory=false) | |
| VariableLengthVector (unsigned int dimension) | |
| VariableLengthVector () | |
| *VariableLengthVector< float > | vF (vI) |
| ~VariableLengthVector () | |
Public Attributes | |
| Set the size to that given **If c destroyExistingData is c the existing data is copied over and *new space is | allocated |
| Mathematical operators *note For the operators do not check to see of the length of *the vectors are the same For instance it is assumed that if you are adding *VariableLengthVector a and | b |
| Mathematical operators *note For | efficiency |
| Set the size to that given **If c destroyExistingData is c the existing data is copied over and *new space is if necessary If the length to reserve is less *than the current number of | elements |
| Set the size to that given **If c destroyExistingData is c | false: * If the array already contains data |
| Set the size to that given **If c destroyExistingData is c the existing data is copied over and *new space is if necessary If the length to reserve is less *than the current number of then an appropriate number of elements *are discarded *If c the size is set destructively to the length given If the *length is different from the current | length |
| Copy constructor The reason why the copy constructor and the assignment * | operator are templated is that it will allow implicit casts to be *performed.For instance *\code *VariableLengthVector< int > vI |
| Set the size to that given **If c destroyExistingData is c the existing data is copied over and *new space is if necessary If the length to reserve is less *than the current number of then an appropriate number of elements *are discarded *If c | true |
| *or for instance | vF = static_cast< VariableLengthVector< float > >( vI ) |
|
|||||
|
Definition at line 74 of file itkVariableLengthVector.h. |
|
|||||
|
Typedef used to indicate the number of elements in the vector Definition at line 79 of file itkVariableLengthVector.h. |
|
|||||
|
Definition at line 75 of file itkVariableLengthVector.h. |
|
|||||
|
Definition at line 76 of file itkVariableLengthVector.h. |
|
|||||
|
The element type stored at each location in the Array. Definition at line 73 of file itkVariableLengthVector.h. |
|
|||||||||
|
Default constructor. It is created with an empty array it has to be allocated later by assignment |
|
||||||||||
|
Constructor with size. Size can only be changed by assignment |
|
||||||||||||||||||||
|
Constructor that initializes array with contents from a user supplied buffer. The pointer to the buffer and the length is specified. By default, the array does not manage the memory of the buffer. It merely points to that location and it is the user's responsibility to delete it. If "LetArrayManageMemory" is true, then this class will free the memory when this object is destroyed. |
|
||||||||||||||||||||
|
Constructor that initializes array with contents from a user supplied buffer. The pointer to the buffer and the length is specified. By default, the array does not manage the memory of the buffer. It merely points to that location and it is the user's responsibility to delete it. If "LetArrayManageMemory" is true, then this class will free the memory when this object is destroyed. |
|
||||||||||||||
|
Definition at line 117 of file itkVariableLengthVector.h. References itk::VariableLengthVector< TValueType >::AllocateElements(), and itk::VariableLengthVector< TValueType >::Size(). |
|
||||||||||
|
Copy constructer.. Override the default non-templated copy constructor that the compiler provides |
|
|||||||||
|
This destructor is not virtual for performance reasons. However, this means that subclasses cannot allocate memory. |
|
||||||||||
|
Allocate memory of certain size and return it. Referenced by itk::VariableLengthVector< TValueType >::VariableLengthVector(). |
|
||||||||||
|
Set the all the elements of the array to the specified value |
|
|||||||||
|
Definition at line 229 of file itkVariableLengthVector.h. |
|
||||||||||
|
Get one element Definition at line 172 of file itkVariableLengthVector.h. |
|
||||||||||
|
Definition at line 161 of file itkVariableLengthVector.h. |
|
||||||||||
|
Definition at line 190 of file itkVariableLengthVector.h. Referenced by itk::MeasurementVectorTraits::GetLength(). |
|
|||||||||
|
Returns vector's Squared Euclidean Norm |
|
||||||||||||||
|
Definition at line 267 of file itkVariableLengthVector.h. |
|
||||||||||
|
Definition at line 139 of file itkVariableLengthVector.h. References itk::VariableLengthVector< TValueType >::SetSize(). |
|
||||||||||||||
|
Definition at line 369 of file itkVariableLengthVector.h. |
|
||||||||||
|
|
|
||||||||||
|
Definition at line 285 of file itkVariableLengthVector.h. |
|
||||||||||||||
|
Definition at line 236 of file itkVariableLengthVector.h. References itk::VariableLengthVector< TValueType >::length, and itk::VariableLengthVector< TValueType >::Size(). |
|
||||||||||
|
Definition at line 327 of file itkVariableLengthVector.h. |
|
|||||||||
|
Definition at line 311 of file itkVariableLengthVector.h. |
|
||||||||||
|
Definition at line 361 of file itkVariableLengthVector.h. |
|
||||||||||||||
|
Definition at line 353 of file itkVariableLengthVector.h. |
|
|||||||||
|
|
|
||||||||||
|
Definition at line 294 of file itkVariableLengthVector.h. |
|
||||||||||||||
|
Definition at line 252 of file itkVariableLengthVector.h. References itk::VariableLengthVector< TValueType >::length, and itk::VariableLengthVector< TValueType >::Size(). |
|
||||||||||
|
Definition at line 319 of file itkVariableLengthVector.h. |
|
|||||||||
|
Definition at line 303 of file itkVariableLengthVector.h. |
|
||||||||||
|
Definition at line 344 of file itkVariableLengthVector.h. |
|
||||||||||||||
|
Definition at line 336 of file itkVariableLengthVector.h. |
|
||||||||||||||
|
Definition at line 276 of file itkVariableLengthVector.h. |
|
||||||||||||||
|
Definition at line 377 of file itkVariableLengthVector.h. |
|
||||||||||
|
Assignment operator |
|
||||||||||
|
|
|
||||||||||
|
Return reference to the element at specified index. No range checking. Definition at line 169 of file itkVariableLengthVector.h. |
|
||||||||||
|
Return reference to the element at specified index. No range checking. Definition at line 166 of file itkVariableLengthVector.h. |
|
||||||||||
|
Reserves memory of a certain length. If the array already contains data, the existing data is copied over and new space is allocated, if necessary. If the length to reserve is less than the current number of elements, then an appropriate number of elements are discarded. |
|
||||||||||||||||||||
|
Similar to the previous method. In the above method, the size must be seperately set prior to using user-supplied data. This introduces an unnecessary allocation step to be performed. This method avoids it and should be used to import data whereever possible to avoid this. Set the pointer from which the data is imported. If "LetArrayManageMemory" is false, then the application retains the responsibility of freeing the memory for this data. If "LetArrayManageMemory" is true, then this class will free the memory when this object is destroyed. |
|
||||||||||||||||
|
Set the pointer from which the data is imported. If "LetArrayManageMemory" is false, then the application retains the responsibility of freeing the memory for this data. If "LetArrayManageMemory" is true, then this class will free the memory when this object is destroyed. |
|
||||||||||||||||
|
Set one element Definition at line 176 of file itkVariableLengthVector.h. |
|
||||||||||||||||
|
Referenced by itk::VariableLengthVector< TValueType >::operator **/template(). |
|
||||||||||
|
||||||||||
|
|
|
|||||
|
Definition at line 182 of file itkVariableLengthVector.h. |
|
|||||
|
Definition at line 232 of file itkVariableLengthVector.h. |
|
|||||
|
Definition at line 232 of file itkVariableLengthVector.h. |
|
|||||
|
Definition at line 182 of file itkVariableLengthVector.h. |
|
|||||
|
Definition at line 182 of file itkVariableLengthVector.h. |
|
|||||
|
Definition at line 182 of file itkVariableLengthVector.h. Referenced by itk::VariableLengthVector< TValueType >::operator+(), and itk::VariableLengthVector< TValueType >::operator-(). |
|
|||||
|
Definition at line 111 of file itkVariableLengthVector.h. |
|
|||||
|
Definition at line 182 of file itkVariableLengthVector.h. |
|
|||||
|
Definition at line 113 of file itkVariableLengthVector.h. |
1.4.2 written by Dimitri van Heesch,
© 1997-2000