| 1 |
|
/*========================================================================= |
| 2 |
|
|
| 3 |
|
Program: Insight Segmentation & Registration Toolkit |
| 4 |
|
Module: $RCSfile: itkArray2D.txx.html,v $ |
| 5 |
|
Language: C++ |
| 6 |
|
Date: $Date: 2006/01/17 19:15:32 $ |
| 7 |
|
Version: $Revision: 1.4 $ |
| 8 |
|
|
| 9 |
|
Copyright (c) Insight Software Consortium. All rights reserved. |
| 10 |
|
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. |
| 11 |
|
|
| 12 |
|
This software is distributed WITHOUT ANY WARRANTY; without even |
| 13 |
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 14 |
|
PURPOSE. See the above copyright notices for more information. |
| 15 |
|
|
| 16 |
|
=========================================================================*/ |
| 17 |
DEF |
#ifndef _itkArray2D_txx |
| 18 |
DEF |
#define _itkArray2D_txx |
| 19 |
|
|
| 20 |
|
#include "itkArray2D.h" |
| 21 |
|
|
| 22 |
|
namespace itk |
| 23 |
|
{ |
| 24 |
|
|
| 25 |
|
|
| 26 |
|
/** |
| 27 |
|
* Default constructor |
| 28 |
|
*/ |
| 29 |
|
template < typename TValueType > |
| 30 |
|
Array2D<TValueType > |
| 31 |
|
::Array2D():vnl_matrix<TValueType>() |
| 32 |
|
{ |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
|
| 36 |
|
/** |
| 37 |
|
* Constructor with number of rows and columns as arguments |
| 38 |
|
*/ |
| 39 |
|
template < typename TValueType > |
| 40 |
|
Array2D<TValueType > |
| 41 |
|
::Array2D(unsigned int rows,unsigned int cols):vnl_matrix<TValueType>(rows,cols) |
| 42 |
|
{ |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
|
| 46 |
EML |
|
| 47 |
|
/** |
| 48 |
|
* Constructor from a vnl_matrix |
| 49 |
|
*/ |
| 50 |
|
template < typename TValueType > |
| 51 |
|
Array2D<TValueType > |
| 52 |
|
::Array2D( const VnlMatrixType & matrix ): |
| 53 |
IND |
**vnl_matrix<TValueType>( matrix ) |
| 54 |
|
{ |
| 55 |
|
} |
| 56 |
|
|
| 57 |
|
|
| 58 |
EML |
|
| 59 |
|
/** |
| 60 |
|
* Copy Constructor |
| 61 |
|
*/ |
| 62 |
|
template < typename TValueType > |
| 63 |
|
Array2D<TValueType > |
| 64 |
|
::Array2D( const Self & array ) |
| 65 |
IND |
**:vnl_matrix<TValueType>( array ) |
| 66 |
|
{ |
| 67 |
|
} |
| 68 |
|
|
| 69 |
|
|
| 70 |
EML |
|
| 71 |
|
/** |
| 72 |
|
* Assignment Operator from Array |
| 73 |
|
*/ |
| 74 |
|
template < typename TValueType > |
| 75 |
|
const Array2D<TValueType > & |
| 76 |
|
Array2D<TValueType > |
| 77 |
|
::operator=( const Self & array ) |
| 78 |
|
{ |
| 79 |
|
this->VnlMatrixType::operator=( array ); |
| 80 |
|
return *this; |
| 81 |
|
} |
| 82 |
|
|
| 83 |
|
|
| 84 |
EML |
|
| 85 |
|
/** |
| 86 |
|
* Assignment Operator from vnl_matrix |
| 87 |
|
*/ |
| 88 |
|
template < typename TValueType > |
| 89 |
|
const Array2D<TValueType > & |
| 90 |
|
Array2D<TValueType > |
| 91 |
|
::operator=( const VnlMatrixType & matrix ) |
| 92 |
|
{ |
| 93 |
|
this->VnlMatrixType::operator=( matrix ); |
| 94 |
|
return *this; |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
template < typename TValueType > |
| 98 |
|
void Array2D<TValueType > |
| 99 |
|
::SetSize(unsigned int m, unsigned int n) |
| 100 |
|
{ |
| 101 |
|
this->set_size(m, n); |
| 102 |
|
} |
| 103 |
|
|
| 104 |
|
|
| 105 |
|
|
| 106 |
|
|
| 107 |
|
|
| 108 |
|
} // namespace itk |
| 109 |
|
|
| 110 |
|
#endif |
| 111 |
|
|