<!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: itkAffineTransform.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> <a href="modules.html" class="qindex">Groups</a> <a href="namespaces.html" class="qindex">Namespace List</a> <a href="hierarchy.html" class="qindex">Class Hierarchy</a> <a href="classes.html" class="qindex">Alphabetical List</a> <a href="annotated.html" class="qindex">Compound List</a> <a href="files.html" class="qindex">File List</a> <a href="namespacemembers.html" class="qindex">Namespace Members</a> <a href="functions.html" class="qindex">Compound Members</a> <a href="globals.html" class="qindex">File Members</a> <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> » <a class="el" href="dir_ea7fc529ede9a38b0438cf13831ae873.html">Common</a> </div> <div class="contents"> <h1>itkAffineTransform.h</h1><a href="itkAffineTransform_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 & Registration Toolkit</span> <a name="l00004"></a>00004 <span class="comment"> Module: $RCSfile: itkAffineTransform.h,v $</span> <a name="l00005"></a>00005 <span class="comment"> Language: C++</span> <a name="l00006"></a>00006 <span class="comment"> Date: $Date: 2008-10-07 08:18:58 $</span> <a name="l00007"></a>00007 <span class="comment"> Version: $Revision: 1.69 $</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 <a name="l00018"></a>00018 <span class="preprocessor">#ifndef __itkAffineTransform_h</span> <a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define __itkAffineTransform_h</span> <a name="l00020"></a>00020 <span class="preprocessor"></span> <a name="l00021"></a>00021 <span class="preprocessor">#include <iostream></span> <a name="l00022"></a>00022 <a name="l00023"></a>00023 <span class="preprocessor">#include "<a class="code" href="itkMatrix_8h.html">itkMatrix.h</a>"</span> <a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="itkMatrixOffsetTransformBase_8h.html">itkMatrixOffsetTransformBase.h</a>"</span> <a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="itkExceptionObject_8h.html">itkExceptionObject.h</a>"</span> <a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="itkMacro_8h.html">itkMacro.h</a>"</span> <a name="l00027"></a>00027 <a name="l00028"></a>00028 <span class="keyword">namespace </span>itk <a name="l00029"></a>00029 { <a name="l00030"></a>00030 <a name="l00031"></a>00031 <a name="l00104"></a>00104 <a name="l00105"></a>00105 <span class="keyword">template</span> < <a name="l00106"></a>00106 <span class="keyword">class </span>TScalarType=double, <span class="comment">// Data type for scalars </span> <a name="l00107"></a>00107 <span class="comment">// (e.g. float or double)</span> <a name="l00108"></a>00108 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> NDimensions=3> <span class="comment">// Number of dimensions in the input space</span> <a name="l00109"></a><a class="code" href="classitk_1_1AffineTransform.html">00109</a> <span class="keyword">class </span><a class="code" href="classitk_1_1AffineTransform.html">AffineTransform</a> <a name="l00110"></a>00110 : <span class="keyword">public</span> <a class="code" href="classitk_1_1MatrixOffsetTransformBase.html">MatrixOffsetTransformBase</a>< TScalarType, NDimensions, NDimensions > <a name="l00111"></a>00111 { <a name="l00112"></a>00112 <span class="keyword">public</span>: <a name="l00114"></a><a class="code" href="classitk_1_1AffineTransform.html#448071ad4ed2232dd9ce64b984f746d8">00114</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1AffineTransform.html">AffineTransform</a> <a class="code" href="classitk_1_1AffineTransform.html">Self</a>; <a name="l00115"></a>00115 <span class="keyword">typedef</span> <a class="code" href="classitk_1_1MatrixOffsetTransformBase.html">MatrixOffsetTransformBase</a>< TScalarType, <a name="l00116"></a>00116 NDimensions, <a name="l00117"></a><a class="code" href="classitk_1_1AffineTransform.html#b38eb704f77cd8c0df2030e0d50c37fd">00117</a> NDimensions > <a class="code" href="classitk_1_1MatrixOffsetTransformBase.html">Superclass</a>; <a name="l00118"></a><a class="code" href="classitk_1_1AffineTransform.html#e75982638011c846c2a3c001ffcb5dd3">00118</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">SmartPointer<Self></a> <a class="code" href="classitk_1_1SmartPointer.html">Pointer</a>; <a name="l00119"></a><a class="code" href="classitk_1_1AffineTransform.html#9eeef8c9c33d60883c97932c133e2ca2">00119</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">SmartPointer<const Self></a> <a class="code" href="classitk_1_1SmartPointer.html">ConstPointer</a>; <a name="l00120"></a>00120 <a name="l00122"></a>00122 <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>( <a class="code" href="classitk_1_1AffineTransform.html">AffineTransform</a>, <a class="code" href="classitk_1_1MatrixOffsetTransformBase.html">MatrixOffsetTransformBase</a> ); <a name="l00123"></a>00123 <a name="l00125"></a>00125 <a class="code" href="itkMacro_8h.html#0fdc15685afa271857c57e7cd482f30c">itkNewMacro</a>( <a class="code" href="classitk_1_1AffineTransform.html">Self</a> ); <a name="l00126"></a>00126 <a name="l00128"></a>00128 <a class="code" href="classitk_1_1AffineTransform.html#1cc3c44cfc2774fc6efaa32557b563bc">itkStaticConstMacro</a>(InputSpaceDimension, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, NDimensions); <a name="l00129"></a>00129 <a class="code" href="classitk_1_1AffineTransform.html#1cc3c44cfc2774fc6efaa32557b563bc">itkStaticConstMacro</a>(OutputSpaceDimension, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, NDimensions); <a name="l00130"></a>00130 <a class="code" href="classitk_1_1AffineTransform.html#1cc3c44cfc2774fc6efaa32557b563bc">itkStaticConstMacro</a>(SpaceDimension, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, NDimensions); <a name="l00131"></a>00131 <a class="code" href="classitk_1_1AffineTransform.html#1cc3c44cfc2774fc6efaa32557b563bc">itkStaticConstMacro</a>(ParametersDimension, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <a name="l00132"></a>00132 NDimensions*(NDimensions+1)); <a name="l00134"></a>00134 <a name="l00135"></a>00135 <a name="l00137"></a><a class="code" href="classitk_1_1AffineTransform.html#80b08a56e6d6e2cc2623e5ac284a7635">00137</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1Array.html">Superclass::ParametersType</a> <a class="code" href="classitk_1_1Array.html">ParametersType</a>; <a name="l00138"></a><a class="code" href="classitk_1_1AffineTransform.html#8e52b56f8519812af7dc452fedc58029">00138</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1MatrixOffsetTransformBase.html#9fb2ca287b41ee9535727cef4a591359">Superclass::JacobianType</a> <a class="code" href="classitk_1_1AffineTransform.html#8e52b56f8519812af7dc452fedc58029">JacobianType</a>; <a name="l00139"></a><a class="code" href="classitk_1_1AffineTransform.html#5d603a601edad41d062713dbe7d15af0">00139</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1MatrixOffsetTransformBase.html#48ea486858b11578c573ed2ae5049a02">Superclass::ScalarType</a> <a class="code" href="classitk_1_1AffineTransform.html#5d603a601edad41d062713dbe7d15af0">ScalarType</a>; <a name="l00140"></a><a class="code" href="classitk_1_1AffineTransform.html#378d3f44813d2d3a591a564bbacb5697">00140</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1Point.html">Superclass::InputPointType</a> <a class="code" href="classitk_1_1Point.html">InputPointType</a>; <a name="l00141"></a><a class="code" href="classitk_1_1AffineTransform.html#774668199574642f36b6101c8a95e738">00141</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">Superclass::OutputPointType</a> <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">OutputPointType</a>; <a name="l00142"></a><a class="code" href="classitk_1_1AffineTransform.html#8edb409d76a9abce279eda2bec498539">00142</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1Vector.html">Superclass::InputVectorType</a> <a class="code" href="classitk_1_1Vector.html">InputVectorType</a>; <a name="l00143"></a><a class="code" href="classitk_1_1AffineTransform.html#33cad0d368c406d850f5f16869697860">00143</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1Vector.html">Superclass::OutputVectorType</a> <a class="code" href="classitk_1_1Vector.html">OutputVectorType</a>; <a name="l00144"></a><a class="code" href="classitk_1_1AffineTransform.html#716c9e03a15d7c913de9035ee4d1528c">00144</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1MatrixOffsetTransformBase.html#b702d697470ff52439290fa74340df57">Superclass::InputVnlVectorType</a> <a class="code" href="classitk_1_1AffineTransform.html#716c9e03a15d7c913de9035ee4d1528c">InputVnlVectorType</a>; <a name="l00145"></a><a class="code" href="classitk_1_1AffineTransform.html#3a1ce9a7508236a09897736f10e92eb3">00145</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1MatrixOffsetTransformBase.html#3834e12b5eba107f009c1b9dd9b183dd">Superclass::OutputVnlVectorType</a> <a class="code" href="classitk_1_1AffineTransform.html#3a1ce9a7508236a09897736f10e92eb3">OutputVnlVectorType</a>; <a name="l00146"></a>00146 <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1CovariantVector.html" title="A templated class holding a n-Dimensional covariant vector.">Superclass::InputCovariantVectorType</a> <a name="l00147"></a><a class="code" href="classitk_1_1AffineTransform.html#b0c316d2b578651be0d883cbb05403e3">00147</a> <a class="code" href="classitk_1_1CovariantVector.html" title="A templated class holding a n-Dimensional covariant vector.">InputCovariantVectorType</a>; <a name="l00148"></a>00148 <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1CovariantVector.html" title="A templated class holding a n-Dimensional covariant vector.">Superclass::OutputCovariantVectorType</a> <a name="l00149"></a><a class="code" href="classitk_1_1AffineTransform.html#71a411da439eb6d05651a163ad31c8b2">00149</a> <a class="code" href="classitk_1_1CovariantVector.html" title="A templated class holding a n-Dimensional covariant vector.">OutputCovariantVectorType</a>; <a name="l00150"></a><a class="code" href="classitk_1_1AffineTransform.html#7543c5eece332e1dad63383d3c4fbb4f">00150</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1Matrix.html">Superclass::MatrixType</a> <a class="code" href="classitk_1_1Matrix.html">MatrixType</a>; <a name="l00151"></a><a class="code" href="classitk_1_1AffineTransform.html#2038510d1e843f7643a35ffe79aaf3f1">00151</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1Matrix.html">Superclass::InverseMatrixType</a> <a class="code" href="classitk_1_1Matrix.html">InverseMatrixType</a>; <a name="l00152"></a><a class="code" href="classitk_1_1AffineTransform.html#4d914ac7f6668b988bba2dd1b6201163">00152</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1Point.html">Superclass::CenterType</a> <a class="code" href="classitk_1_1Point.html">CenterType</a>; <a name="l00153"></a><a class="code" href="classitk_1_1AffineTransform.html#3e7b98307ae10441a548e68d4753a3a0">00153</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1Vector.html">Superclass::OffsetType</a> <a class="code" href="classitk_1_1Vector.html">OffsetType</a>; <a name="l00154"></a><a class="code" href="classitk_1_1AffineTransform.html#da4996f0bc5ce7ced65cd04864d04920">00154</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1Vector.html">Superclass::TranslationType</a> <a class="code" href="classitk_1_1Vector.html">TranslationType</a>; <a name="l00155"></a>00155 <a name="l00162"></a>00162 <span class="keywordtype">void</span> <a class="code" href="classitk_1_1AffineTransform.html#c2de1aeeaa5bfa49b5e84e6ccadb09be">Translate</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Vector.html">OutputVectorType</a> &offset, <span class="keywordtype">bool</span> pre=0); <a name="l00163"></a>00163 <a name="l00175"></a>00175 <span class="keywordtype">void</span> <a class="code" href="classitk_1_1AffineTransform.html#411e526a8f75ca023a5c95360568b69b">Scale</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Vector.html">OutputVectorType</a> &factor, <span class="keywordtype">bool</span> pre=0); <a name="l00176"></a>00176 <span class="keywordtype">void</span> <a class="code" href="classitk_1_1AffineTransform.html#411e526a8f75ca023a5c95360568b69b">Scale</a>(<span class="keyword">const</span> TScalarType &factor, <span class="keywordtype">bool</span> pre=0); <a name="l00178"></a>00178 <a name="l00194"></a>00194 <span class="keywordtype">void</span> <a class="code" href="classitk_1_1AffineTransform.html#30b24a0ddaa653cbf7c89e4bbe6269b4">Rotate</a>(<span class="keywordtype">int</span> axis1, <span class="keywordtype">int</span> axis2, TScalarType angle, <span class="keywordtype">bool</span> pre=0); <a name="l00196"></a>00196 <a name="l00210"></a>00210 <span class="keywordtype">void</span> <a class="code" href="classitk_1_1AffineTransform.html#8f72aa7f091bb0c66eaa86e194cb0a9e">Rotate2D</a>(TScalarType angle, <span class="keywordtype">bool</span> pre=0); <a name="l00211"></a>00211 <a name="l00225"></a>00225 <span class="keywordtype">void</span> <a class="code" href="classitk_1_1AffineTransform.html#c27f9eeee782358406492ba66bbc3f46">Rotate3D</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Vector.html">OutputVectorType</a> &axis, TScalarType angle, <span class="keywordtype">bool</span> pre=0); <a name="l00226"></a>00226 <a name="l00238"></a>00238 <span class="keywordtype">void</span> <a class="code" href="classitk_1_1AffineTransform.html#5b313b2351cc9a85d78bb831e94d0f25">Shear</a>(<span class="keywordtype">int</span> axis1, <span class="keywordtype">int</span> axis2, TScalarType coef, <span class="keywordtype">bool</span> pre=0); <a name="l00239"></a>00239 <a name="l00248"></a>00248 <span class="keyword">inline</span> <a class="code" href="classitk_1_1Point.html">InputPointType</a> <a class="code" href="classitk_1_1AffineTransform.html#67f40c2940fac7739d2905461b8f8c17">BackTransform</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">OutputPointType</a> &point ) <span class="keyword">const</span>; <a name="l00249"></a>00249 <span class="keyword">inline</span> <a class="code" href="classitk_1_1Vector.html">InputVectorType</a> <a class="code" href="classitk_1_1AffineTransform.html#67f40c2940fac7739d2905461b8f8c17">BackTransform</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Vector.html">OutputVectorType</a> &<a class="code" href="classstd_1_1vector.html">vector</a>) <span class="keyword">const</span>; <a name="l00250"></a>00250 <span class="keyword">inline</span> <a class="code" href="classitk_1_1AffineTransform.html#716c9e03a15d7c913de9035ee4d1528c">InputVnlVectorType</a> <a class="code" href="classitk_1_1AffineTransform.html#67f40c2940fac7739d2905461b8f8c17">BackTransform</a>( <a name="l00251"></a>00251 <span class="keyword">const</span> <a class="code" href="classitk_1_1AffineTransform.html#3a1ce9a7508236a09897736f10e92eb3">OutputVnlVectorType</a> &<a class="code" href="classstd_1_1vector.html">vector</a>) <span class="keyword">const</span>; <a name="l00252"></a>00252 <span class="keyword">inline</span> <a class="code" href="classitk_1_1CovariantVector.html" title="A templated class holding a n-Dimensional covariant vector.">InputCovariantVectorType</a> <a class="code" href="classitk_1_1AffineTransform.html#67f40c2940fac7739d2905461b8f8c17">BackTransform</a>( <a name="l00253"></a>00253 <span class="keyword">const</span> <a class="code" href="classitk_1_1CovariantVector.html" title="A templated class holding a n-Dimensional covariant vector.">OutputCovariantVectorType</a> &<a class="code" href="classstd_1_1vector.html">vector</a>) <span class="keyword">const</span>; <a name="l00255"></a>00255 <a name="l00265"></a>00265 <span class="keyword">inline</span> <a class="code" href="classitk_1_1Point.html">InputPointType</a> <a class="code" href="classitk_1_1AffineTransform.html#c0ac88749969c3b89cf1e84bf52c9061">BackTransformPoint</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">OutputPointType</a> &point) <span class="keyword">const</span>; <a name="l00266"></a>00266 <a name="l00278"></a>00278 <a class="code" href="classitk_1_1AffineTransform.html#5d603a601edad41d062713dbe7d15af0">ScalarType</a> <a class="code" href="classitk_1_1AffineTransform.html#25a90751f01088f283758d35b1e67226">Metric</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1AffineTransform.html">Self</a> * other) <span class="keyword">const</span>; <a name="l00279"></a>00279 <a name="l00283"></a>00283 <a class="code" href="classitk_1_1AffineTransform.html#5d603a601edad41d062713dbe7d15af0">ScalarType</a> <a class="code" href="classitk_1_1AffineTransform.html#25a90751f01088f283758d35b1e67226">Metric</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; <a name="l00284"></a>00284 <a name="l00285"></a>00285 <span class="keyword">protected</span>: <a name="l00293"></a>00293 <a class="code" href="classitk_1_1AffineTransform.html#36ed041b456c5f423866b9b0668185bd">AffineTransform</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Matrix.html">MatrixType</a> &matrix, <a name="l00294"></a>00294 <span class="keyword">const</span> <a class="code" href="classitk_1_1Vector.html">OutputVectorType</a> &offset); <a name="l00295"></a>00295 <a class="code" href="classitk_1_1AffineTransform.html#36ed041b456c5f423866b9b0668185bd">AffineTransform</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> outputDims, <a name="l00296"></a>00296 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> paramDims); <a name="l00297"></a>00297 <a class="code" href="classitk_1_1AffineTransform.html#36ed041b456c5f423866b9b0668185bd">AffineTransform</a>(); <a name="l00299"></a>00299 <a name="l00301"></a>00301 <span class="keyword">virtual</span> <a class="code" href="classitk_1_1AffineTransform.html#8f21a843e6cefc1371f7b2ebb3fb915f">~AffineTransform</a>(); <a name="l00302"></a>00302 <a name="l00304"></a>00304 <span class="keywordtype">void</span> <a class="code" href="classitk_1_1AffineTransform.html#ec02672ebc5ee82ba29a2a3b223fc5fa">PrintSelf</a>(std::ostream &s, <a class="code" href="classitk_1_1Indent.html" title="Control indentation during Print() invocation.">Indent</a> indent) <span class="keyword">const</span>; <a name="l00305"></a>00305 <a name="l00306"></a>00306 <span class="keyword">private</span>: <a name="l00307"></a>00307 <a name="l00308"></a>00308 <a class="code" href="classitk_1_1AffineTransform.html#36ed041b456c5f423866b9b0668185bd">AffineTransform</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1AffineTransform.html">Self</a> & other); <a name="l00309"></a>00309 <span class="keyword">const</span> <a class="code" href="classitk_1_1AffineTransform.html">Self</a> & operator=( <span class="keyword">const</span> <a class="code" href="classitk_1_1AffineTransform.html">Self</a> & ); <a name="l00310"></a>00310 <a name="l00311"></a>00311 }; <span class="comment">//class AffineTransform</span> <a name="l00312"></a>00312 <a name="l00314"></a>00314 <span class="keyword">template</span><<span class="keyword">class</span> TScalarType, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> NDimensions> <a name="l00315"></a>00315 <span class="keyword">inline</span> <a name="l00316"></a>00316 <span class="keyword">typename</span> <a class="code" href="classitk_1_1Vector.html">AffineTransform<TScalarType, NDimensions>::InputVectorType</a> <a name="l00317"></a>00317 <a class="code" href="classitk_1_1AffineTransform.html#67f40c2940fac7739d2905461b8f8c17">AffineTransform<TScalarType, NDimensions>::</a> <a name="l00318"></a><a class="code" href="classitk_1_1AffineTransform.html#16e9d35b24b32f7983f13688b0f5b0a7">00318</a> <a class="code" href="classitk_1_1AffineTransform.html#67f40c2940fac7739d2905461b8f8c17">BackTransform</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Vector.html">OutputVectorType</a> &vect )<span class="keyword"> const </span> <a name="l00319"></a>00319 <span class="keyword"></span>{ <a name="l00320"></a>00320 <a class="code" href="itkMacro_8h.html#0c47033c6ca9aae1319b1793f4419ada">itkWarningMacro</a>(<<<span class="stringliteral">"BackTransform(): This method is slated to be removed\</span> <a name="l00321"></a>00321 <span class="stringliteral"> from ITK. Instead, please use GetInverse() to generate an inverse\</span> <a name="l00322"></a>00322 <span class="stringliteral"> transform and then perform the transform using that inverted transform."</span>); <a name="l00323"></a>00323 <span class="keywordflow">return</span> this-><a class="code" href="classitk_1_1MatrixOffsetTransformBase.html#a27a65671af6ff20929ba5ac5c9773cd">GetInverseMatrix</a>() * vect; <a name="l00324"></a>00324 } <a name="l00326"></a>00326 <a name="l00327"></a>00327 <a name="l00329"></a>00329 <span class="keyword">template</span><<span class="keyword">class</span> TScalarType, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> NDimensions> <a name="l00330"></a>00330 <span class="keyword">inline</span> <a name="l00331"></a>00331 <span class="keyword">typename</span> <a class="code" href="classitk_1_1AffineTransform.html">AffineTransform<TScalarType, NDimensions>::InputVnlVectorType</a> <a name="l00332"></a>00332 <a class="code" href="classitk_1_1AffineTransform.html#67f40c2940fac7739d2905461b8f8c17">AffineTransform<TScalarType, NDimensions>::</a> <a name="l00333"></a><a class="code" href="classitk_1_1AffineTransform.html#7970a9942408c0cc927413bde3b0d913">00333</a> <a class="code" href="classitk_1_1AffineTransform.html#67f40c2940fac7739d2905461b8f8c17">BackTransform</a>(<span class="keyword">const</span> OutputVnlVectorType &vect )<span class="keyword"> const </span> <a name="l00334"></a>00334 <span class="keyword"></span>{ <a name="l00335"></a>00335 <a class="code" href="itkMacro_8h.html#0c47033c6ca9aae1319b1793f4419ada">itkWarningMacro</a>(<<<span class="stringliteral">"BackTransform(): This method is slated to be removed\</span> <a name="l00336"></a>00336 <span class="stringliteral"> from ITK. Instead, please use GetInverse() to generate an inverse\</span> <a name="l00337"></a>00337 <span class="stringliteral"> transform and then perform the transform using that inverted transform."</span>); <a name="l00338"></a>00338 <span class="keywordflow">return</span> this-><a class="code" href="classitk_1_1MatrixOffsetTransformBase.html#a27a65671af6ff20929ba5ac5c9773cd">GetInverseMatrix</a>() * vect; <a name="l00339"></a>00339 } <a name="l00341"></a>00341 <a name="l00342"></a>00342 <a name="l00344"></a>00344 <span class="keyword">template</span><<span class="keyword">class</span> TScalarType, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> NDimensions> <a name="l00345"></a>00345 <span class="keyword">inline</span> <a name="l00346"></a>00346 <span class="keyword">typename</span> <a class="code" href="classitk_1_1CovariantVector.html" title="A templated class holding a n-Dimensional covariant vector.">AffineTransform<TScalarType, NDimensions>::InputCovariantVectorType</a> <a name="l00347"></a>00347 <a class="code" href="classitk_1_1AffineTransform.html#67f40c2940fac7739d2905461b8f8c17">AffineTransform<TScalarType, NDimensions>::</a> <a name="l00348"></a><a class="code" href="classitk_1_1AffineTransform.html#0a3f22ea5ab03d54010d02da9c1cc6b0">00348</a> <a class="code" href="classitk_1_1AffineTransform.html#67f40c2940fac7739d2905461b8f8c17">BackTransform</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1CovariantVector.html" title="A templated class holding a n-Dimensional covariant vector.">OutputCovariantVectorType</a> &vec)<span class="keyword"> const </span> <a name="l00349"></a>00349 <span class="keyword"></span>{ <a name="l00350"></a>00350 <a class="code" href="itkMacro_8h.html#0c47033c6ca9aae1319b1793f4419ada">itkWarningMacro</a>(<<<span class="stringliteral">"BackTransform(): This method is slated to be removed\</span> <a name="l00351"></a>00351 <span class="stringliteral"> from ITK. Instead, please use GetInverse() to generate an inverse\</span> <a name="l00352"></a>00352 <span class="stringliteral"> transform and then perform the transform using that inverted transform."</span>); <a name="l00353"></a>00353 <a name="l00354"></a>00354 <a class="code" href="classitk_1_1CovariantVector.html" title="A templated class holding a n-Dimensional covariant vector.">InputCovariantVectorType</a> result; <span class="comment">// Converted vector</span> <a name="l00355"></a>00355 <a name="l00356"></a>00356 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < NDimensions; i++) <a name="l00357"></a>00357 { <a name="l00358"></a>00358 result[i] = NumericTraits<ScalarType>::Zero; <a name="l00359"></a>00359 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j = 0; j < NDimensions; j++) <a name="l00360"></a>00360 { <a name="l00361"></a>00361 result[i] += this-><a class="code" href="classitk_1_1MatrixOffsetTransformBase.html#078ec7913b57c25da7d9054ae87fd553">GetMatrix</a>()[j][i]*vec[j]; <span class="comment">// Direct matrix transposed</span> <a name="l00362"></a>00362 } <a name="l00363"></a>00363 } <a name="l00364"></a>00364 <span class="keywordflow">return</span> result; <a name="l00365"></a>00365 } <a name="l00366"></a>00366 <a name="l00367"></a>00367 <a name="l00369"></a>00369 <span class="keyword">template</span><<span class="keyword">class</span> TScalarType, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> NDimensions> <a name="l00370"></a>00370 <span class="keyword">inline</span> <a name="l00371"></a>00371 <span class="keyword">typename</span> <a class="code" href="classitk_1_1Point.html">AffineTransform<TScalarType, NDimensions>::InputPointType</a> <a name="l00372"></a>00372 <a class="code" href="classitk_1_1AffineTransform.html#c0ac88749969c3b89cf1e84bf52c9061">AffineTransform<TScalarType, NDimensions>::</a> <a name="l00373"></a><a class="code" href="classitk_1_1AffineTransform.html#c0ac88749969c3b89cf1e84bf52c9061">00373</a> <a class="code" href="classitk_1_1AffineTransform.html#c0ac88749969c3b89cf1e84bf52c9061">BackTransformPoint</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">OutputPointType</a> &point)<span class="keyword"> const</span> <a name="l00374"></a>00374 <span class="keyword"></span>{ <a name="l00375"></a>00375 <span class="keywordflow">return</span> this-><a class="code" href="classitk_1_1AffineTransform.html#67f40c2940fac7739d2905461b8f8c17">BackTransform</a>(point); <a name="l00376"></a>00376 } <a name="l00377"></a>00377 <a name="l00379"></a>00379 <span class="keyword">template</span><<span class="keyword">class</span> TScalarType, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> NDimensions> <a name="l00380"></a>00380 <span class="keyword">inline</span> <a name="l00381"></a>00381 <span class="keyword">typename</span> <a class="code" href="classitk_1_1Point.html">AffineTransform<TScalarType, NDimensions>::InputPointType</a> <a name="l00382"></a>00382 <a class="code" href="classitk_1_1AffineTransform.html#67f40c2940fac7739d2905461b8f8c17">AffineTransform<TScalarType, NDimensions>::</a> <a name="l00383"></a><a class="code" href="classitk_1_1AffineTransform.html#67f40c2940fac7739d2905461b8f8c17">00383</a> <a class="code" href="classitk_1_1AffineTransform.html#67f40c2940fac7739d2905461b8f8c17">BackTransform</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">OutputPointType</a> &point)<span class="keyword"> const </span> <a name="l00384"></a>00384 <span class="keyword"></span>{ <a name="l00385"></a>00385 <a class="code" href="itkMacro_8h.html#0c47033c6ca9aae1319b1793f4419ada">itkWarningMacro</a>(<<<span class="stringliteral">"BackTransform(): This method is slated to be removed\</span> <a name="l00386"></a>00386 <span class="stringliteral"> from ITK. Instead, please use GetInverse() to generate an inverse\</span> <a name="l00387"></a>00387 <span class="stringliteral"> transform and then perform the transform using that inverted transform."</span>); <a name="l00388"></a>00388 <a class="code" href="classitk_1_1Point.html">InputPointType</a> result; <span class="comment">// Converted point</span> <a name="l00389"></a>00389 <a class="code" href="classitk_1_1AffineTransform.html#5d603a601edad41d062713dbe7d15af0">ScalarType</a> temp[NDimensions]; <a name="l00390"></a>00390 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i, j; <a name="l00392"></a>00392 <a name="l00393"></a>00393 <span class="keywordflow">for</span> (j = 0; j < NDimensions; j++) <a name="l00394"></a>00394 { <a name="l00395"></a>00395 temp[j] = point[j] - this-><a class="code" href="classitk_1_1MatrixOffsetTransformBase.html#254e2cbfddb6e349e904720377559d27">GetOffset</a>()[j]; <a name="l00396"></a>00396 } <a name="l00397"></a>00397 <a name="l00398"></a>00398 <span class="keywordflow">for</span> (i = 0; i < NDimensions; i++) <a name="l00399"></a>00399 { <a name="l00400"></a>00400 result[i] = 0.0; <a name="l00401"></a>00401 <span class="keywordflow">for</span> (j = 0; j < NDimensions; j++) <a name="l00402"></a>00402 { <a name="l00403"></a>00403 result[i] += this-><a class="code" href="classitk_1_1MatrixOffsetTransformBase.html#a27a65671af6ff20929ba5ac5c9773cd">GetInverseMatrix</a>()[i][j]*temp[j]; <a name="l00404"></a>00404 } <a name="l00405"></a>00405 } <a name="l00406"></a>00406 <span class="keywordflow">return</span> result; <a name="l00407"></a>00407 } <a name="l00408"></a>00408 <a name="l00409"></a>00409 } <span class="comment">// namespace itk</span> <a name="l00410"></a>00410 <a name="l00411"></a>00411 <span class="comment">// Define instantiation macro for this template.</span> <a name="l00412"></a><a class="code" href="itkAffineTransform_8h.html#612163a1373d68e458b3b306399a3894">00412</a> <span class="preprocessor">#define ITK_TEMPLATE_AffineTransform(_, EXPORT, x, y) namespace itk { \</span> <a name="l00413"></a>00413 <span class="preprocessor"> _(2(class EXPORT AffineTransform< ITK_TEMPLATE_2 x >)) \</span> <a name="l00414"></a>00414 <span class="preprocessor"> namespace Templates { typedef AffineTransform< ITK_TEMPLATE_2 x > \</span> <a name="l00415"></a>00415 <span class="preprocessor"> AffineTransform##y; } \</span> <a name="l00416"></a>00416 <span class="preprocessor"> }</span> <a name="l00417"></a>00417 <span class="preprocessor"></span> <a name="l00418"></a>00418 <span class="preprocessor">#if ITK_TEMPLATE_EXPLICIT</span> <a name="l00419"></a>00419 <span class="preprocessor"></span><span class="preprocessor"># include "Templates/itkAffineTransform+-.h"</span> <a name="l00420"></a>00420 <span class="preprocessor">#endif</span> <a name="l00421"></a>00421 <span class="preprocessor"></span> <a name="l00422"></a>00422 <span class="preprocessor">#if ITK_TEMPLATE_TXX</span> <a name="l00423"></a>00423 <span class="preprocessor"></span><span class="preprocessor"># include "itkAffineTransform.txx"</span> <a name="l00424"></a>00424 <span class="preprocessor">#endif</span> <a name="l00425"></a>00425 <span class="preprocessor"></span> <a name="l00426"></a>00426 <span class="preprocessor">#endif </span><span class="comment">/* __itkAffineTransform_h */</span> <a name="l00427"></a>00427 </pre></div></div> <hr><address><small> Generated at Thu May 7 22:05:00 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>, © 1997-2000</small></address> </body> </html>