#include <itkArray.h>
Inheritance diagram for itk::Array< TValueType >:
Public Types | |
typedef TValueType | ValueType |
typedef Array | Self |
typedef vnl_vector< TValueType > | VnlVectorType |
Public Member Functions | |
Array () | |
Array (unsigned int dimension) | |
Array (ValueType *data, unsigned int sz, bool LetArrayManageMemory=false) | |
Array (const ValueType *data, unsigned int sz, bool LetArrayManageMemory=false) | |
void | Fill (TValueType const &v) |
const TValueType & | GetElement (unsigned int i) const |
void | SetElement (unsigned int i, const TValueType &value) |
void | SetData (TValueType *data, bool LetArrayManageMemory=false) |
void | SetData (TValueType *data, unsigned int sz, bool LetArrayManageMemory=false) |
~Array () | |
const Self & | operator= (const Self &rhs) |
const Self & | operator= (const VnlVectorType &rhs) |
unsigned int | Size (void) const |
unsigned int | GetNumberOfElements (void) const |
void | SetSize (unsigned int sz) |
unsigned int | GetSize (void) const |
This class derives from the vnl_vector<> class. Its size is assigned at construction time (run time) and can not be changed afterwards except by using assignment to another Array.
The class is templated over the type of the elements.
Template parameters for class Array:
Definition at line 44 of file itkArray.h.
|
Definition at line 50 of file itkArray.h. |
|
The element type stored at each location in the Array. Definition at line 49 of file itkArray.h. |
|
Definition at line 51 of file itkArray.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. |
|
This destructor is not virtual for performance reasons. However, this means that subclasses cannot allocate memory. |
|
Set the all the elements of the array to the specified value Definition at line 80 of file itkArray.h. Referenced by itk::MeasurementVectorTraits::SetLength(). |
|
Get one element Definition at line 95 of file itkArray.h. |
|
Return the number of elements in the Array Definition at line 90 of file itkArray.h. |
|
Destructively set the size to that given. Will lose data. Definition at line 104 of file itkArray.h. Referenced by itk::MeasurementVectorTraits::GetLength(). |
|
Copy opertor |
|
Copy opertor |
|
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 99 of file itkArray.h. |
|
Destructively set the size to that given. Will lose data. Referenced by itk::MeasurementVectorTraits::SetLength(). |
|
Return the number of elements in the Array Definition at line 88 of file itkArray.h. Referenced by itk::MeasurementVectorTraits::Assert(). |