Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > d5e74628f0e673bb8680aebce32b2c04 > files > 17607

itk-doc-3.12.0-1mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ITK: itkVariableSizeMatrix.h Source File</title>
<link href="DoxygenStyle.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">


<!--  Section customized for INSIGHT : Tue Jul 17 01:02:45 2001 -->
<center>
<a href="index.html" class="qindex">Main Page</a>&nbsp;&nbsp; 
<a href="modules.html" class="qindex">Groups</a>&nbsp;&nbsp;
<a href="namespaces.html" class="qindex">Namespace List</a>&nbsp;&nbsp;
<a href="hierarchy.html" class="qindex">Class Hierarchy</a>&nbsp;&nbsp;
<a href="classes.html" class="qindex">Alphabetical List</a>&nbsp;&nbsp;
<a href="annotated.html" class="qindex">Compound List</a>&nbsp;&nbsp; 
<a href="files.html" class="qindex">File
List</a>&nbsp;&nbsp; 
<a href="namespacemembers.html" class="qindex">Namespace Members</a>&nbsp;&nbsp; 
<a href="functions.html" class="qindex">Compound Members</a>&nbsp;&nbsp; 
<a href="globals.html" class="qindex">File Members</a>&nbsp;&nbsp;
<a href="pages.html" class="qindex">Concepts</a></center>


<!-- Generated by Doxygen 1.5.9 -->
  <div class="navpath"><a class="el" href="dir_02e23d841c198393a6e961e9a0678fff.html">Code</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_ea7fc529ede9a38b0438cf13831ae873.html">Common</a>
  </div>
<div class="contents">
<h1>itkVariableSizeMatrix.h</h1><a href="itkVariableSizeMatrix_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*=========================================================================</span>
<a name="l00002"></a>00002 <span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment">  Program:   Insight Segmentation &amp; Registration Toolkit</span>
<a name="l00004"></a>00004 <span class="comment">  Module:    $RCSfile: itkVariableSizeMatrix.h,v $</span>
<a name="l00005"></a>00005 <span class="comment">  Language:  C++</span>
<a name="l00006"></a>00006 <span class="comment">  Date:      $Date: 2007-11-05 00:34:00 $</span>
<a name="l00007"></a>00007 <span class="comment">  Version:   $Revision: 1.8 $</span>
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment">  Copyright (c) Insight Software Consortium. All rights reserved.</span>
<a name="l00010"></a>00010 <span class="comment">  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.</span>
<a name="l00011"></a>00011 <span class="comment"></span>
<a name="l00012"></a>00012 <span class="comment">     This software is distributed WITHOUT ANY WARRANTY; without even </span>
<a name="l00013"></a>00013 <span class="comment">     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR </span>
<a name="l00014"></a>00014 <span class="comment">     PURPOSE.  See the above copyright notices for more information.</span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment">=========================================================================*/</span>
<a name="l00017"></a>00017 <span class="preprocessor">#ifndef __itkVariableSizeMatrix_h</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define __itkVariableSizeMatrix_h</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#include "<a class="code" href="itkPoint_8h.html">itkPoint.h</a>"</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include "<a class="code" href="itkVector_8h.html">itkVector.h</a>"</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include "<a class="code" href="itkCovariantVector_8h.html">itkCovariantVector.h</a>"</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include "vnl/vnl_matrix_fixed.h"</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include "vnl/algo/vnl_matrix_inverse.h"</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include "vnl/vnl_transpose.h"</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include "vnl/vnl_matrix.h"</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="itkArray_8h.html">itkArray.h</a>"</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="keyword">namespace </span>itk
<a name="l00032"></a>00032 {
<a name="l00033"></a>00033 
<a name="l00043"></a>00043 <span class="keyword">template</span>&lt;<span class="keyword">class</span> T &gt;
<a name="l00044"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html">00044</a> <span class="keyword">class </span><a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">VariableSizeMatrix</a> {
<a name="l00045"></a>00045 <span class="keyword">public</span>:
<a name="l00047"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#b7e7cc0496cbf54aca58df689b153085">00047</a>   <span class="keyword">typedef</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">VariableSizeMatrix</a>  <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a>;
<a name="l00048"></a>00048 
<a name="l00050"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#01f5fbee85ce00e9768e8f031ce9accd">00050</a>   <span class="keyword">typedef</span> T <a class="code" href="classitk_1_1VariableSizeMatrix.html#01f5fbee85ce00e9768e8f031ce9accd">ValueType</a>;
<a name="l00051"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#9966f0911de819d870797f1c32df76ee">00051</a>   <span class="keyword">typedef</span> T <a class="code" href="classitk_1_1VariableSizeMatrix.html#9966f0911de819d870797f1c32df76ee">ComponentType</a>;
<a name="l00052"></a>00052 
<a name="l00054"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#8319c2c26335949346ef14b5419ad7ea">00054</a>   <span class="keyword">typedef</span> <a class="code" href="classvnl__matrix.html">vnl_matrix&lt;T&gt;</a>  <a class="code" href="classvnl__matrix.html">InternalMatrixType</a>;
<a name="l00055"></a>00055 
<a name="l00057"></a>00057   <a class="code" href="classitk_1_1Array.html" title="Array class with size defined at construction time.">Array&lt;T&gt;</a> <a class="code" href="classitk_1_1VariableSizeMatrix.html#7eb23e9b23e312ac75ae0f7df1e64be1">operator*</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Array.html" title="Array class with size defined at construction time.">Array&lt;T&gt;</a> &amp; <a class="code" href="classstd_1_1vector.html">vector</a>) <span class="keyword">const</span>;
<a name="l00058"></a>00058 
<a name="l00060"></a>00060   <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> <a class="code" href="classitk_1_1VariableSizeMatrix.html#7eb23e9b23e312ac75ae0f7df1e64be1">operator*</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> &amp; matrix) <span class="keyword">const</span>;
<a name="l00061"></a>00061 
<a name="l00063"></a>00063   <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> <a class="code" href="classitk_1_1VariableSizeMatrix.html#6f60358cade983a52c1670ccf8c374c5">operator+</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> &amp; matrix) <span class="keyword">const</span>;
<a name="l00064"></a>00064   <span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> &amp; <a class="code" href="classitk_1_1VariableSizeMatrix.html#5c9ffa17891986537bf64bd09ce02c78">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> &amp; matrix );
<a name="l00066"></a>00066 
<a name="l00068"></a>00068   <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> <a class="code" href="classitk_1_1VariableSizeMatrix.html#7d616f15135f6a7988f4ee4ef1e8b449">operator-</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> &amp; matrix) <span class="keyword">const</span>;
<a name="l00069"></a>00069   <span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> &amp; <a class="code" href="classitk_1_1VariableSizeMatrix.html#27010e9e89ae777e366d2b80663642d9">operator-=</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> &amp; matrix );
<a name="l00071"></a>00071 
<a name="l00073"></a>00073   <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> &amp; <a class="code" href="classitk_1_1VariableSizeMatrix.html#7d616f15135f6a7988f4ee4ef1e8b449">operator- </a>();
<a name="l00074"></a>00074 
<a name="l00076"></a>00076   <a class="code" href="classvnl__matrix.html">vnl_matrix&lt;T&gt;</a> <a class="code" href="classitk_1_1VariableSizeMatrix.html#7eb23e9b23e312ac75ae0f7df1e64be1">operator*</a>(<span class="keyword">const</span> <a class="code" href="classvnl__matrix.html">vnl_matrix&lt;T&gt;</a> &amp; matrix) <span class="keyword">const</span>;
<a name="l00077"></a>00077 
<a name="l00079"></a>00079   <span class="keywordtype">void</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html#d1f2c5d12ef2e8e59fcfb874c312890d">operator*=</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> &amp; matrix);
<a name="l00080"></a>00080 
<a name="l00082"></a>00082   <span class="keywordtype">void</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html#d1f2c5d12ef2e8e59fcfb874c312890d">operator*=</a>(<span class="keyword">const</span> <a class="code" href="classvnl__matrix.html">vnl_matrix&lt;T&gt;</a> &amp; matrix);
<a name="l00083"></a>00083 
<a name="l00085"></a>00085   <a class="code" href="classvnl__vector.html">vnl_vector&lt;T&gt;</a> <a class="code" href="classitk_1_1VariableSizeMatrix.html#7eb23e9b23e312ac75ae0f7df1e64be1">operator*</a>(<span class="keyword">const</span> <a class="code" href="classvnl__vector.html">vnl_vector&lt;T&gt;</a> &amp; matrix) <span class="keyword">const</span>;
<a name="l00086"></a>00086 
<a name="l00088"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#566f09227de695ec24b2f6122895a9ff">00088</a>   <span class="keywordtype">void</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html#d1f2c5d12ef2e8e59fcfb874c312890d">operator*=</a>(<span class="keyword">const</span> T &amp; value)
<a name="l00089"></a>00089     { m_Matrix *= value; }
<a name="l00090"></a>00090 
<a name="l00092"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#fc49ed14e7c6dfbc9368a510a01eba75">00092</a>   <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> <a class="code" href="classitk_1_1VariableSizeMatrix.html#7eb23e9b23e312ac75ae0f7df1e64be1">operator*</a>(<span class="keyword">const</span> T &amp; value)
<a name="l00093"></a>00093     {
<a name="l00094"></a>00094     <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> result( *<span class="keyword">this</span> );
<a name="l00095"></a>00095     result *= value;
<a name="l00096"></a>00096     <span class="keywordflow">return</span> result;
<a name="l00097"></a>00097     }
<a name="l00099"></a>00099 
<a name="l00101"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#96e9d76a9597f958b677e6f2972a7d7f">00101</a>   <span class="keywordtype">void</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html#96e9d76a9597f958b677e6f2972a7d7f">operator/=</a>(<span class="keyword">const</span> T &amp; value)
<a name="l00102"></a>00102     {
<a name="l00103"></a>00103     m_Matrix /= value;
<a name="l00104"></a>00104     }
<a name="l00105"></a>00105 
<a name="l00107"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#a6a91d1c314417203392afd870da3ee7">00107</a>   <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> <a class="code" href="classitk_1_1VariableSizeMatrix.html#a6a91d1c314417203392afd870da3ee7">operator/</a>(<span class="keyword">const</span> T &amp; value)
<a name="l00108"></a>00108     {
<a name="l00109"></a>00109     <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> result( *<span class="keyword">this</span> );
<a name="l00110"></a>00110     result /= value;
<a name="l00111"></a>00111     <span class="keywordflow">return</span> result;
<a name="l00112"></a>00112     }
<a name="l00114"></a>00114 
<a name="l00116"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#95fa0e325250740630371310a495ae67">00116</a>   <span class="keyword">inline</span> T &amp; <a class="code" href="classitk_1_1VariableSizeMatrix.html#95fa0e325250740630371310a495ae67">operator()</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> row, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> col )
<a name="l00117"></a>00117     {
<a name="l00118"></a>00118     <span class="keywordflow">return</span> m_Matrix(row,col);
<a name="l00119"></a>00119     }
<a name="l00120"></a>00120 
<a name="l00122"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#8db8fa5b52883627794183ed829b7890">00122</a>   <span class="keyword">inline</span> <span class="keyword">const</span> T &amp; <a class="code" href="classitk_1_1VariableSizeMatrix.html#95fa0e325250740630371310a495ae67">operator()</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> row, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> col )<span class="keyword"> const</span>
<a name="l00123"></a>00123 <span class="keyword">    </span>{
<a name="l00124"></a>00124     <span class="keywordflow">return</span> m_Matrix(row,col);
<a name="l00125"></a>00125     }
<a name="l00126"></a>00126 
<a name="l00128"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#1819fa3b904bdb506bb3514d3ba027fb">00128</a>   <span class="keyword">inline</span> T * <a class="code" href="classitk_1_1VariableSizeMatrix.html#1819fa3b904bdb506bb3514d3ba027fb">operator[]</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i )
<a name="l00129"></a>00129     {
<a name="l00130"></a>00130     <span class="keywordflow">return</span> m_Matrix[i];
<a name="l00131"></a>00131     }
<a name="l00132"></a>00132 
<a name="l00134"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#8b7906f5179741e93c0331f8433e3dc1">00134</a>   <span class="keyword">inline</span> <span class="keyword">const</span> T * <a class="code" href="classitk_1_1VariableSizeMatrix.html#1819fa3b904bdb506bb3514d3ba027fb">operator[]</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i )<span class="keyword"> const</span>
<a name="l00135"></a>00135 <span class="keyword">    </span>{
<a name="l00136"></a>00136     <span class="keywordflow">return</span> m_Matrix[i];
<a name="l00137"></a>00137     }
<a name="l00138"></a>00138 
<a name="l00140"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#3a3871702bfa3e9e957fe9e1d608f761">00140</a>   <span class="keyword">inline</span> <a class="code" href="classvnl__matrix.html">InternalMatrixType</a> &amp; <a class="code" href="classitk_1_1VariableSizeMatrix.html#3a3871702bfa3e9e957fe9e1d608f761">GetVnlMatrix</a>( <span class="keywordtype">void</span> )
<a name="l00141"></a>00141     {
<a name="l00142"></a>00142     <span class="keywordflow">return</span> m_Matrix;
<a name="l00143"></a>00143     }
<a name="l00144"></a>00144 
<a name="l00146"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#1a74d1f9e9343e5f72d5013c3d27c7b8">00146</a>   <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classvnl__matrix.html">InternalMatrixType</a> &amp; <a class="code" href="classitk_1_1VariableSizeMatrix.html#3a3871702bfa3e9e957fe9e1d608f761">GetVnlMatrix</a>( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00147"></a>00147 <span class="keyword">    </span>{
<a name="l00148"></a>00148     <span class="keywordflow">return</span> m_Matrix;
<a name="l00149"></a>00149     }
<a name="l00150"></a>00150 
<a name="l00152"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#78dff63b5ecd3cf9eca548ae0e9587a8">00152</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html#78dff63b5ecd3cf9eca548ae0e9587a8">SetIdentity</a>( <span class="keywordtype">void</span> ) 
<a name="l00153"></a>00153     {
<a name="l00154"></a>00154     m_Matrix.set_identity();
<a name="l00155"></a>00155     }
<a name="l00156"></a>00156 
<a name="l00158"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#fc75c292b6153d11dcb58b3af509d996">00158</a>   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html#fc75c292b6153d11dcb58b3af509d996">Fill</a>( <span class="keyword">const</span> T &amp; value ) 
<a name="l00159"></a>00159     {
<a name="l00160"></a>00160     m_Matrix.fill( value );
<a name="l00161"></a>00161     }
<a name="l00162"></a>00162 
<a name="l00164"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#bb41b5589c555a3574c628d139e80062">00164</a>   <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> &amp; <a class="code" href="classitk_1_1VariableSizeMatrix.html#bb41b5589c555a3574c628d139e80062">operator=</a>( <span class="keyword">const</span> <a class="code" href="classvnl__matrix.html">vnl_matrix&lt;T&gt;</a> &amp; matrix)
<a name="l00165"></a>00165     {
<a name="l00166"></a>00166     m_Matrix = matrix;
<a name="l00167"></a>00167     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00168"></a>00168     }
<a name="l00169"></a>00169 
<a name="l00171"></a>00171   <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html#dcf638bbb76c23b47595a17dcdcacc08">operator==</a>( <span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html#b7e7cc0496cbf54aca58df689b153085">Self</a> &amp; matrix) <span class="keyword">const</span>;
<a name="l00172"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#b39acc105af939b4805d69757ec70973">00172</a>   <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html#b39acc105af939b4805d69757ec70973">operator!=</a>( <span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> &amp; matrix)<span class="keyword"> const</span>
<a name="l00173"></a>00173 <span class="keyword">    </span>{
<a name="l00174"></a>00174     <span class="keywordflow">return</span> !this-&gt;<a class="code" href="classitk_1_1VariableSizeMatrix.html#dcf638bbb76c23b47595a17dcdcacc08">operator==</a>(matrix);
<a name="l00175"></a>00175     }
<a name="l00177"></a>00177 
<a name="l00179"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#9c6ffb6cb5c03e8c52c400fc5a9257ca">00179</a>   <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> &amp; <a class="code" href="classitk_1_1VariableSizeMatrix.html#bb41b5589c555a3574c628d139e80062">operator=</a>( <span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> &amp; matrix)
<a name="l00180"></a>00180     {
<a name="l00181"></a>00181     m_Matrix = matrix.m_Matrix;
<a name="l00182"></a>00182     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00183"></a>00183     }
<a name="l00184"></a>00184 
<a name="l00185"></a>00185 
<a name="l00187"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#15ee565bb0f96c9b6a588a2360c53594">00187</a>   <span class="keyword">inline</span> <a class="code" href="classvnl__matrix.html">vnl_matrix&lt;T&gt;</a> <a class="code" href="classitk_1_1VariableSizeMatrix.html#15ee565bb0f96c9b6a588a2360c53594">GetInverse</a>( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00188"></a>00188 <span class="keyword">    </span>{
<a name="l00189"></a>00189     <a class="code" href="classvnl__matrix.html">vnl_matrix&lt;T&gt;</a> temp = vnl_matrix_inverse&lt;T&gt;( m_Matrix );
<a name="l00190"></a>00190     <span class="keywordflow">return</span> temp;
<a name="l00191"></a>00191     }
<a name="l00193"></a>00193 
<a name="l00194"></a>00194  
<a name="l00196"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#4ea6ba74630c0bda25775c5da7b9b580">00196</a>   <span class="keyword">inline</span> <a class="code" href="classvnl__matrix.html">vnl_matrix&lt;T&gt;</a> <a class="code" href="classitk_1_1VariableSizeMatrix.html#4ea6ba74630c0bda25775c5da7b9b580">GetTranspose</a>( <span class="keywordtype">void</span> )<span class="keyword"> const</span>
<a name="l00197"></a>00197 <span class="keyword">    </span>{
<a name="l00198"></a>00198     <span class="keywordflow">return</span> m_Matrix.transpose();
<a name="l00199"></a>00199     }
<a name="l00200"></a>00200 
<a name="l00202"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#a4948a074e2db8f0d4c5aa2df3f785cf">00202</a>   <a class="code" href="classitk_1_1VariableSizeMatrix.html#a4948a074e2db8f0d4c5aa2df3f785cf">VariableSizeMatrix</a>() : m_Matrix() {};
<a name="l00203"></a>00203 
<a name="l00204"></a>00204   <a class="code" href="classitk_1_1VariableSizeMatrix.html#a4948a074e2db8f0d4c5aa2df3f785cf">VariableSizeMatrix</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> rows, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> cols);
<a name="l00205"></a>00205 
<a name="l00207"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#5f4b70d2f8cd4ad1b3b6d7694727fe53">00207</a>   <a class="code" href="classitk_1_1VariableSizeMatrix.html#5f4b70d2f8cd4ad1b3b6d7694727fe53">VariableSizeMatrix</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> &amp; matrix) : m_Matrix( matrix.m_Matrix ) {};
<a name="l00208"></a>00208 
<a name="l00210"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#1851093b460d8fa334160582c804fcd5">00210</a>   <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html#1851093b460d8fa334160582c804fcd5">Rows</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_Matrix.rows(); } 
<a name="l00211"></a>00211 
<a name="l00213"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#56af128629dd97fa4dfd1dfa59e38896">00213</a>   <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html#56af128629dd97fa4dfd1dfa59e38896">Cols</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_Matrix.cols(); } 
<a name="l00214"></a>00214 
<a name="l00216"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#422d01338a63aa30041b1fc7c7e504a2">00216</a>   <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html#422d01338a63aa30041b1fc7c7e504a2">SetSize</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> r, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> c)
<a name="l00217"></a>00217     {  <span class="keywordflow">return</span> m_Matrix.set_size( r, c );  }
<a name="l00218"></a>00218 
<a name="l00219"></a>00219 <span class="keyword">private</span>:
<a name="l00220"></a>00220   <a class="code" href="classitk_1_1VariableSizeMatrix.html#8319c2c26335949346ef14b5419ad7ea">InternalMatrixType</a>     m_Matrix;
<a name="l00221"></a>00221 };
<a name="l00222"></a>00222 
<a name="l00223"></a>00223 <span class="keyword">template</span>&lt; <span class="keyword">class</span> T &gt;  
<a name="l00224"></a><a class="code" href="namespaceitk.html#9e824a4d2833615f95c0ee6742cee3bd">00224</a> <a class="code" href="itkWin32Header_8h.html#7d4384322557205d75f0719c012dded6">ITK_EXPORT</a> std::ostream&amp; <a class="code" href="namespaceitk.html#1a9c40969bca6a50e9d688a35d3c4984">operator&lt;&lt;</a>(std::ostream&amp; os, 
<a name="l00225"></a>00225                                     <span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">VariableSizeMatrix&lt;T&gt;</a> &amp; v) 
<a name="l00226"></a>00226 {
<a name="l00227"></a>00227   os &lt;&lt; v.<a class="code" href="classitk_1_1VariableSizeMatrix.html#3a3871702bfa3e9e957fe9e1d608f761">GetVnlMatrix</a>(); <span class="keywordflow">return</span> os;
<a name="l00228"></a>00228 }
<a name="l00229"></a>00229 
<a name="l00230"></a>00230 
<a name="l00231"></a>00231   
<a name="l00235"></a>00235 <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;
<a name="l00236"></a>00236 <span class="keyword">inline</span>
<a name="l00237"></a>00237 <span class="keywordtype">bool</span>
<a name="l00238"></a>00238 <a class="code" href="classitk_1_1VariableSizeMatrix.html#dcf638bbb76c23b47595a17dcdcacc08">VariableSizeMatrix&lt;T&gt;</a>
<a name="l00239"></a><a class="code" href="classitk_1_1VariableSizeMatrix.html#dcf638bbb76c23b47595a17dcdcacc08">00239</a> <a class="code" href="classitk_1_1VariableSizeMatrix.html#dcf638bbb76c23b47595a17dcdcacc08">::operator==</a>( <span class="keyword">const</span> <a class="code" href="classitk_1_1VariableSizeMatrix.html" title="A templated class holding a M x N size Matrix This class contains a vnl_matrix in...">Self</a> &amp; matrix )<span class="keyword"> const  </span>
<a name="l00240"></a>00240 <span class="keyword"></span>{
<a name="l00241"></a>00241   <span class="keywordflow">if</span>( (matrix.<a class="code" href="classitk_1_1VariableSizeMatrix.html#1851093b460d8fa334160582c804fcd5">Rows</a>() != this-&gt;Rows()) ||
<a name="l00242"></a>00242       (matrix.<a class="code" href="classitk_1_1VariableSizeMatrix.html#56af128629dd97fa4dfd1dfa59e38896">Cols</a>() != this-&gt;Cols()))
<a name="l00243"></a>00243     { 
<a name="l00244"></a>00244     <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00245"></a>00245     }
<a name="l00246"></a>00246   <span class="keywordtype">bool</span> equal = <span class="keyword">true</span>;
<a name="l00248"></a>00248 
<a name="l00249"></a>00249   <span class="keywordflow">for</span>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> r=0; r&lt;this-&gt;Rows(); r++) 
<a name="l00250"></a>00250     {
<a name="l00251"></a>00251     <span class="keywordflow">for</span>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> c=0; c&lt;this-&gt;Cols(); c++ ) 
<a name="l00252"></a>00252       {
<a name="l00253"></a>00253       <span class="keywordflow">if</span> (m_Matrix(r,c) != matrix.m_Matrix(r,c))
<a name="l00254"></a>00254         {
<a name="l00255"></a>00255         equal = <span class="keyword">false</span>;
<a name="l00256"></a>00256         <span class="keywordflow">break</span>;
<a name="l00257"></a>00257         }
<a name="l00258"></a>00258       }
<a name="l00259"></a>00259     }
<a name="l00260"></a>00260   <span class="keywordflow">return</span> equal;
<a name="l00261"></a>00261 }
<a name="l00262"></a>00262 
<a name="l00263"></a>00263 } <span class="comment">// end namespace itk</span>
<a name="l00264"></a>00264   
<a name="l00265"></a>00265 
<a name="l00266"></a>00266 <span class="preprocessor">#ifndef ITK_MANUAL_INSTANTIATION</span>
<a name="l00267"></a>00267 <span class="preprocessor"></span><span class="preprocessor">#include "itkVariableSizeMatrix.txx"</span>
<a name="l00268"></a>00268 <span class="preprocessor">#endif</span>
<a name="l00269"></a>00269 <span class="preprocessor"></span>
<a name="l00270"></a>00270 
<a name="l00271"></a>00271 <span class="preprocessor">#endif </span>
<a name="l00272"></a>00272 <span class="preprocessor"></span>
</pre></div></div>
<hr><address><small>
Generated at Fri May 8 00:26:49 2009 for ITK  by <a href="http://www.stack.nl/~dimitri/doxygen/index.html"> <img 
src="http://www.stack.nl/~dimitri/doxygen/doxygen.png" alt="doxygen"
align="middle" border=0 width=110 height=53>
</a> 1.5.9 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
 &copy;&nbsp;1997-2000</small></address>
</body>
</html>