Sophie

Sophie

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

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: itkImageToImageFilterDetail.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>itkImageToImageFilterDetail.h</h1><a href="itkImageToImageFilterDetail_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: itkImageToImageFilterDetail.h,v $</span>
<a name="l00005"></a>00005 <span class="comment">  Language:  C++</span>
<a name="l00006"></a>00006 <span class="comment">  Date:      $Date: 2009-02-05 19:04:57 $</span>
<a name="l00007"></a>00007 <span class="comment">  Version:   $Revision: 1.9 $</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">  Portions of this code are covered under the VTK copyright.</span>
<a name="l00013"></a>00013 <span class="comment">  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.</span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">     This software is distributed WITHOUT ANY WARRANTY; without even </span>
<a name="l00016"></a>00016 <span class="comment">     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR </span>
<a name="l00017"></a>00017 <span class="comment">     PURPOSE.  See the above copyright notices for more information.</span>
<a name="l00018"></a>00018 <span class="comment"></span>
<a name="l00019"></a>00019 <span class="comment">=========================================================================*/</span>
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef __itkImageToImageFilterDetail_h</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define __itkImageToImageFilterDetail_h</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00023"></a>00023 <span class="preprocessor">#include "<a class="code" href="itkImageRegion_8h.html">itkImageRegion.h</a>"</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="itkSmartPointer_8h.html">itkSmartPointer.h</a>"</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="keyword">namespace </span>itk
<a name="l00027"></a>00027 {
<a name="l00028"></a>00028 
<a name="l00037"></a>00037 <span class="keyword">namespace </span>ImageToImageFilterDetail
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039 
<a name="l00048"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1DispatchBase.html">00048</a> <span class="keyword">struct </span><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1DispatchBase.html" title="Base class for a class used to dispatch to dimension specific implementations.">DispatchBase</a> {};
<a name="l00049"></a>00049 
<a name="l00057"></a>00057 <span class="keyword">template</span> &lt;<span class="keywordtype">bool</span>&gt;
<a name="l00058"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BooleanDispatch.html">00058</a> <span class="keyword">struct </span><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BooleanDispatch.html" title="Templated class to produce a unique type &amp;quot;true&amp;quot; and &amp;quot;false&amp;quot;.">BooleanDispatch</a> {};
<a name="l00059"></a>00059 
<a name="l00068"></a>00068 <span class="keyword">template</span> &lt;<span class="keywordtype">int</span>&gt;
<a name="l00069"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html">00069</a> <span class="keyword">struct </span><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html" title="Templated class to produce a unique type for each integer.">IntDispatch</a> : <span class="keyword">public</span> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1DispatchBase.html" title="Base class for a class used to dispatch to dimension specific implementations.">DispatchBase</a> {};
<a name="l00070"></a>00070 
<a name="l00085"></a>00085 <span class="keyword">template</span> &lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>&gt;
<a name="l00086"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1UnsignedIntDispatch.html">00086</a> <span class="keyword">struct </span><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1UnsignedIntDispatch.html" title="Templated class to produce a unique type for each unsigned integer (usually a dimension)...">UnsignedIntDispatch</a> : <span class="keyword">public</span> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1DispatchBase.html" title="Base class for a class used to dispatch to dimension specific implementations.">DispatchBase</a> {};
<a name="l00088"></a>00088 
<a name="l00096"></a>00096 <span class="keyword">template</span> &lt;<span class="keywordtype">bool</span> B1, <span class="keywordtype">bool</span> B2&gt;
<a name="l00097"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryBooleanDispatch.html">00097</a> <span class="keyword">struct </span><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryBooleanDispatch.html" title="Templated class to produce a unique type for a pairing of booleans.">BinaryBooleanDispatch</a>
<a name="l00098"></a>00098 {
<a name="l00099"></a>00099 
<a name="l00102"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryBooleanDispatch.html#e673b19f4077780dba3c44599d34867c">00102</a>   <span class="keyword">typedef</span> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BooleanDispatch.html" title="Templated class to produce a unique type &amp;quot;true&amp;quot; and &amp;quot;false&amp;quot;.">BooleanDispatch&lt;B1&gt;</a> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BooleanDispatch.html" title="Templated class to produce a unique type &amp;quot;true&amp;quot; and &amp;quot;false&amp;quot;.">FirstType</a>;
<a name="l00103"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryBooleanDispatch.html#fee442dfebe979efea4f543c08c022c3">00103</a>   <span class="keyword">typedef</span> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BooleanDispatch.html" title="Templated class to produce a unique type &amp;quot;true&amp;quot; and &amp;quot;false&amp;quot;.">BooleanDispatch&lt;B2&gt;</a> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BooleanDispatch.html" title="Templated class to produce a unique type &amp;quot;true&amp;quot; and &amp;quot;false&amp;quot;.">SecondType</a>;
<a name="l00104"></a>00104 };
<a name="l00105"></a>00105 
<a name="l00112"></a>00112 <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> D1, <span class="keywordtype">int</span> D2&gt;
<a name="l00113"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryIntDispatch.html">00113</a> <span class="keyword">struct </span><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryIntDispatch.html" title="Templated class to produce a unique type for a pairing of integers.">BinaryIntDispatch</a>
<a name="l00114"></a>00114 {
<a name="l00115"></a>00115 
<a name="l00118"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryIntDispatch.html#ff1ad268ac4a3d8d241bcf4e618b9ecd">00118</a>   <span class="keyword">typedef</span> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html" title="Templated class to produce a unique type for each integer.">IntDispatch&lt;D1&gt;</a> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html" title="Templated class to produce a unique type for each integer.">FirstType</a>;
<a name="l00119"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryIntDispatch.html#073bfb6d47391393e6b15869d564ffdb">00119</a>   <span class="keyword">typedef</span> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html" title="Templated class to produce a unique type for each integer.">IntDispatch&lt;D2&gt;</a> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html" title="Templated class to produce a unique type for each integer.">SecondType</a>;
<a name="l00120"></a>00120 };
<a name="l00121"></a>00121 
<a name="l00133"></a>00133 <span class="keyword">template</span> &lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> D1, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> D2&gt;
<a name="l00134"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryUnsignedIntDispatch.html">00134</a> <span class="keyword">struct </span><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryUnsignedIntDispatch.html" title="Templated class to produce a unique type for a pairing of unsigned integers (usually...">BinaryUnsignedIntDispatch</a> : <span class="keyword">public</span> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1DispatchBase.html" title="Base class for a class used to dispatch to dimension specific implementations.">DispatchBase</a>
<a name="l00135"></a>00135 {
<a name="l00136"></a>00136 
<a name="l00139"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryUnsignedIntDispatch.html#0752bc328297feaeae84a6ad41e6a3bf">00139</a>   <span class="keyword">typedef</span> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1UnsignedIntDispatch.html" title="Templated class to produce a unique type for each unsigned integer (usually a dimension)...">UnsignedIntDispatch&lt;D1&gt;</a> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1UnsignedIntDispatch.html" title="Templated class to produce a unique type for each unsigned integer (usually a dimension)...">FirstType</a>;
<a name="l00140"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryUnsignedIntDispatch.html#192ffbe29fd8a0b263ef9d79794fe13a">00140</a>   <span class="keyword">typedef</span> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1UnsignedIntDispatch.html" title="Templated class to produce a unique type for each unsigned integer (usually a dimension)...">UnsignedIntDispatch&lt;D2&gt;</a> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1UnsignedIntDispatch.html" title="Templated class to produce a unique type for each unsigned integer (usually a dimension)...">SecondType</a>;
<a name="l00141"></a>00141 
<a name="l00157"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryUnsignedIntDispatch.html#0989daba122d755205ae11a68f5b9a55">00157</a>   <span class="keyword">typedef</span> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html" title="Templated class to produce a unique type for each integer.">IntDispatch&lt;(D1 &gt;</a> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryUnsignedIntDispatch.html#0989daba122d755205ae11a68f5b9a55">D2</a>) - (D1 &lt; <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryUnsignedIntDispatch.html#0989daba122d755205ae11a68f5b9a55">D2</a>)&gt; ComparisonType;
<a name="l00158"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryUnsignedIntDispatch.html#97c9a01089d23dd0ab84170dd844436e">00158</a>   <span class="keyword">typedef</span> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html" title="Templated class to produce a unique type for each integer.">IntDispatch&lt;0&gt;</a>                     <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html" title="Templated class to produce a unique type for each integer.">FirstEqualsSecondType</a>;  
<a name="l00159"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryUnsignedIntDispatch.html#7a7232860ce9b8e88de8e053e22e1dcc">00159</a>   <span class="keyword">typedef</span> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html" title="Templated class to produce a unique type for each integer.">IntDispatch&lt;1&gt;</a>                     <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html" title="Templated class to produce a unique type for each integer.">FirstGreaterThanSecondType</a>;  
<a name="l00160"></a><a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryUnsignedIntDispatch.html#72e7e479160f9526fd340cf8a2c62ca9">00160</a>   <span class="keyword">typedef</span> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html" title="Templated class to produce a unique type for each integer.">IntDispatch</a>&lt;-1&gt;                    <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html" title="Templated class to produce a unique type for each integer.">FirstLessThanSecondType</a>;  
<a name="l00161"></a>00161 };
<a name="l00162"></a>00162 
<a name="l00179"></a>00179 <span class="keyword">template</span> &lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> D1, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> D2&gt;
<a name="l00180"></a><a class="code" href="namespaceitk_1_1ImageToImageFilterDetail.html#60d6229466d6a6d1d75c5dbb33bd3a3f">00180</a> <span class="keywordtype">void</span> <a class="code" href="namespaceitk_1_1ImageToImageFilterDetail.html#60d6229466d6a6d1d75c5dbb33bd3a3f">ImageToImageFilterDefaultCopyRegion</a>(<span class="keyword">const</span> <span class="keyword">typename</span>
<a name="l00181"></a>00181                                          <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html" title="Templated class to produce a unique type for each integer.">BinaryUnsignedIntDispatch&lt;D1, D2&gt;::FirstEqualsSecondType</a> &amp;,
<a name="l00182"></a>00182                                          <a class="code" href="classitk_1_1ImageRegion.html" title="An image region represents a structured region of data.">ImageRegion&lt;D1&gt;</a> &amp;destRegion,
<a name="l00183"></a>00183                                          <span class="keyword">const</span> <a class="code" href="classitk_1_1ImageRegion.html" title="An image region represents a structured region of data.">ImageRegion&lt;D2&gt;</a> &amp;srcRegion)
<a name="l00184"></a>00184 {
<a name="l00185"></a>00185   destRegion = srcRegion;
<a name="l00186"></a>00186 }
<a name="l00187"></a>00187 
<a name="l00204"></a>00204 <span class="keyword">template</span> &lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> D1, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> D2&gt;
<a name="l00205"></a><a class="code" href="namespaceitk_1_1ImageToImageFilterDetail.html#c03f5a7ad082ad0ecdf351825811b8fc">00205</a> <span class="keywordtype">void</span> <a class="code" href="namespaceitk_1_1ImageToImageFilterDetail.html#60d6229466d6a6d1d75c5dbb33bd3a3f">ImageToImageFilterDefaultCopyRegion</a>(<span class="keyword">const</span> <span class="keyword">typename</span>
<a name="l00206"></a>00206                                          <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html" title="Templated class to produce a unique type for each integer.">BinaryUnsignedIntDispatch&lt;D1, D2&gt;::FirstLessThanSecondType</a> &amp;,
<a name="l00207"></a>00207                                          <a class="code" href="classitk_1_1ImageRegion.html" title="An image region represents a structured region of data.">ImageRegion&lt;D1&gt;</a> &amp;destRegion,
<a name="l00208"></a>00208                                          <span class="keyword">const</span> <a class="code" href="classitk_1_1ImageRegion.html" title="An image region represents a structured region of data.">ImageRegion&lt;D2&gt;</a> &amp;srcRegion)
<a name="l00209"></a>00209 {
<a name="l00210"></a>00210   <span class="comment">// Source dimension is greater than the destination dimension, copy the</span>
<a name="l00211"></a>00211   <span class="comment">// first part of the source into the destination</span>
<a name="l00212"></a>00212   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> dim;
<a name="l00213"></a>00213   <a class="code" href="classitk_1_1Index.html" title="Represent a n-dimensional index in a n-dimensional image.">Index&lt;D1&gt;</a> destIndex;
<a name="l00214"></a>00214   <a class="code" href="classitk_1_1Size.html" title="Represent the size (bounds) of a n-dimensional image.">Size&lt;D1&gt;</a>  destSize;
<a name="l00215"></a>00215   <span class="keyword">const</span> <a class="code" href="classitk_1_1Index.html" title="Represent a n-dimensional index in a n-dimensional image.">Index&lt;D2&gt;</a> &amp;srcIndex = srcRegion.<a class="code" href="classitk_1_1ImageRegion.html#47e246964e5d88a51d956099c8fe1dc0">GetIndex</a>();
<a name="l00216"></a>00216   <span class="keyword">const</span> <a class="code" href="classitk_1_1Size.html" title="Represent the size (bounds) of a n-dimensional image.">Size&lt;D2&gt;</a> &amp;srcSize = srcRegion.<a class="code" href="classitk_1_1ImageRegion.html#13a537aaa496a4994491d91312b29079">GetSize</a>();
<a name="l00218"></a>00218 
<a name="l00219"></a>00219   <span class="comment">// copy what we can</span>
<a name="l00220"></a>00220   <span class="keywordflow">for</span> (dim=0; dim &lt; D1; ++dim)
<a name="l00221"></a>00221     {
<a name="l00222"></a>00222     destIndex[dim] = srcIndex[dim];
<a name="l00223"></a>00223     destSize[dim] = srcSize[dim];
<a name="l00224"></a>00224     }
<a name="l00225"></a>00225     
<a name="l00226"></a>00226   destRegion.<a class="code" href="classitk_1_1ImageRegion.html#784c2bdce5a9a5a4299f051b75a28996">SetIndex</a>(destIndex);
<a name="l00227"></a>00227   destRegion.<a class="code" href="classitk_1_1ImageRegion.html#5c86511415de7c7d1cd9cdce03ea0ead">SetSize</a>(destSize);
<a name="l00228"></a>00228 }
<a name="l00229"></a>00229   
<a name="l00246"></a>00246 <span class="keyword">template</span> &lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> D1, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> D2&gt;
<a name="l00247"></a><a class="code" href="namespaceitk_1_1ImageToImageFilterDetail.html#1250366dcfef0ba7f1e1f8aea592d1df">00247</a> <span class="keywordtype">void</span> <a class="code" href="namespaceitk_1_1ImageToImageFilterDetail.html#60d6229466d6a6d1d75c5dbb33bd3a3f">ImageToImageFilterDefaultCopyRegion</a>(<span class="keyword">const</span> <span class="keyword">typename</span>
<a name="l00248"></a>00248                                          <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1IntDispatch.html" title="Templated class to produce a unique type for each integer.">BinaryUnsignedIntDispatch&lt;D1, D2&gt;::FirstGreaterThanSecondType</a> &amp;,
<a name="l00249"></a>00249                                          <a class="code" href="classitk_1_1ImageRegion.html" title="An image region represents a structured region of data.">ImageRegion&lt;D1&gt;</a> &amp;destRegion,
<a name="l00250"></a>00250                                          <span class="keyword">const</span> <a class="code" href="classitk_1_1ImageRegion.html" title="An image region represents a structured region of data.">ImageRegion&lt;D2&gt;</a> &amp;srcRegion)
<a name="l00251"></a>00251 {
<a name="l00252"></a>00252   <span class="comment">// Source dimension is less than the destination dimension, copy source</span>
<a name="l00253"></a>00253   <span class="comment">// into the first part of the destination and set zeros elsewhere.</span>
<a name="l00254"></a>00254   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> dim;
<a name="l00255"></a>00255   <a class="code" href="classitk_1_1Index.html" title="Represent a n-dimensional index in a n-dimensional image.">Index&lt;D1&gt;</a> destIndex;
<a name="l00256"></a>00256   <a class="code" href="classitk_1_1Size.html" title="Represent the size (bounds) of a n-dimensional image.">Size&lt;D1&gt;</a>  destSize;
<a name="l00257"></a>00257   <span class="keyword">const</span> <a class="code" href="classitk_1_1Index.html" title="Represent a n-dimensional index in a n-dimensional image.">Index&lt;D2&gt;</a> &amp;srcIndex = srcRegion.<a class="code" href="classitk_1_1ImageRegion.html#47e246964e5d88a51d956099c8fe1dc0">GetIndex</a>();
<a name="l00258"></a>00258   <span class="keyword">const</span> <a class="code" href="classitk_1_1Size.html" title="Represent the size (bounds) of a n-dimensional image.">Size&lt;D2&gt;</a> &amp;srcSize = srcRegion.<a class="code" href="classitk_1_1ImageRegion.html#13a537aaa496a4994491d91312b29079">GetSize</a>();
<a name="l00260"></a>00260 
<a name="l00261"></a>00261   <span class="comment">// copy what we can</span>
<a name="l00262"></a>00262   <span class="keywordflow">for</span> (dim=0; dim &lt; D2; ++dim)
<a name="l00263"></a>00263     {
<a name="l00264"></a>00264     destIndex[dim] = srcIndex[dim];
<a name="l00265"></a>00265     destSize[dim] = srcSize[dim];
<a name="l00266"></a>00266     }
<a name="l00267"></a>00267   <span class="comment">// fill in the rest of the dimensions with zero/one</span>
<a name="l00268"></a>00268   <span class="keywordflow">for</span> (; dim &lt; D1; ++dim)
<a name="l00269"></a>00269     {
<a name="l00270"></a>00270     destIndex[dim] = 0;
<a name="l00271"></a>00271     destSize[dim] = 1;
<a name="l00272"></a>00272     }
<a name="l00273"></a>00273   
<a name="l00274"></a>00274   destRegion.<a class="code" href="classitk_1_1ImageRegion.html#784c2bdce5a9a5a4299f051b75a28996">SetIndex</a>(destIndex);
<a name="l00275"></a>00275   destRegion.<a class="code" href="classitk_1_1ImageRegion.html#5c86511415de7c7d1cd9cdce03ea0ead">SetSize</a>(destSize);
<a name="l00276"></a>00276 }
<a name="l00277"></a>00277 
<a name="l00278"></a>00278 
<a name="l00315"></a>00315 <span class="keyword">template</span> &lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> D1, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> D2&gt;
<a name="l00316"></a><a class="code" href="classitk_1_1ImageToImageFilterDetail_1_1ImageRegionCopier.html">00316</a> <span class="keyword">class </span><a class="code" href="itkWin32Header_8h.html#7d4384322557205d75f0719c012dded6">ITK_EXPORT</a> <a class="code" href="classitk_1_1ImageToImageFilterDetail_1_1ImageRegionCopier.html" title="Function object used to dispatching to a routine to copy a region (start index and...">ImageRegionCopier</a> 
<a name="l00317"></a>00317 {
<a name="l00318"></a>00318 <span class="keyword">public</span>:
<a name="l00319"></a><a class="code" href="classitk_1_1ImageToImageFilterDetail_1_1ImageRegionCopier.html#3f9cb920019baa97aa1b6ab3727afe38">00319</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> operator() (<a class="code" href="classitk_1_1ImageRegion.html" title="An image region represents a structured region of data.">ImageRegion&lt;D1&gt;</a> &amp;destRegion,
<a name="l00320"></a>00320                            <span class="keyword">const</span> <a class="code" href="classitk_1_1ImageRegion.html" title="An image region represents a structured region of data.">ImageRegion&lt;D2&gt;</a> &amp;srcRegion)<span class="keyword"> const</span>
<a name="l00321"></a>00321 <span class="keyword">    </span>{
<a name="l00322"></a>00322     <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structitk_1_1ImageToImageFilterDetail_1_1BinaryUnsignedIntDispatch.html" title="Templated class to produce a unique type for a pairing of unsigned integers (usually...">BinaryUnsignedIntDispatch&lt;D1, D2&gt;::ComparisonType</a> ComparisonType;
<a name="l00323"></a>00323     ImageToImageFilterDefaultCopyRegion&lt;D1, D2&gt;(
<a name="l00324"></a>00324       ComparisonType(),
<a name="l00325"></a>00325       destRegion, srcRegion);
<a name="l00326"></a>00326     }
<a name="l00327"></a><a class="code" href="classitk_1_1ImageToImageFilterDetail_1_1ImageRegionCopier.html#9fcdf2e2885426a45aa922a0656d7c2d">00327</a>     <span class="keyword">virtual</span> <a class="code" href="classitk_1_1ImageToImageFilterDetail_1_1ImageRegionCopier.html#9fcdf2e2885426a45aa922a0656d7c2d">~ImageRegionCopier</a>() {}
<a name="l00328"></a>00328 };
<a name="l00329"></a>00329 
<a name="l00330"></a>00330 
<a name="l00333"></a>00333 <span class="keyword">template</span>&lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> D1, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> D2&gt;
<a name="l00334"></a><a class="code" href="namespaceitk_1_1ImageToImageFilterDetail.html#5273516d1bfedb061d950a68cc2223de">00334</a> std::ostream &amp; operator&lt;&lt;(std::ostream &amp;os, const ImageRegionCopier&lt;D1, D2&gt; &amp;
<a name="l00335"></a>00335                           copier)
<a name="l00336"></a>00336 {
<a name="l00337"></a>00337   os &lt;&lt; <span class="stringliteral">"ImageRegionCopier: "</span>
<a name="l00338"></a>00338      &lt;&lt; <span class="keyword">typeid</span>(<a class="code" href="classitk_1_1ImageToImageFilterDetail_1_1ImageRegionCopier.html" title="Function object used to dispatching to a routine to copy a region (start index and...">ImageRegionCopier&lt;D1, D2&gt;</a>).name() &lt;&lt; std::endl;
<a name="l00339"></a>00339   <span class="keywordflow">return</span> os;
<a name="l00340"></a>00340 }
<a name="l00342"></a>00342 
<a name="l00344"></a>00344 <span class="keyword">template</span>&lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> D1, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> D2&gt;
<a name="l00345"></a><a class="code" href="namespaceitk_1_1ImageToImageFilterDetail.html#7bf30438b5d3bdc0eddbecd9b17baa3b">00345</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceitk_1_1ImageToImageFilterDetail.html#7bf30438b5d3bdc0eddbecd9b17baa3b">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1ImageToImageFilterDetail_1_1ImageRegionCopier.html" title="Function object used to dispatching to a routine to copy a region (start index and...">ImageRegionCopier&lt;D1, D2&gt;</a> &amp;c1,
<a name="l00346"></a>00346                 <span class="keyword">const</span> <a class="code" href="classitk_1_1ImageToImageFilterDetail_1_1ImageRegionCopier.html" title="Function object used to dispatching to a routine to copy a region (start index and...">ImageRegionCopier&lt;D1, D2&gt;</a> &amp;c2)
<a name="l00347"></a>00347 {
<a name="l00348"></a>00348   <span class="keywordflow">return</span> &amp;c1 != &amp;c2;
<a name="l00349"></a>00349 }
<a name="l00350"></a>00350 
<a name="l00351"></a>00351 } <span class="comment">// end of namespace ImageToImageFilterDetail</span>
<a name="l00352"></a>00352     
<a name="l00353"></a>00353 } <span class="comment">// end namespace itk</span>
<a name="l00354"></a>00354 
<a name="l00355"></a>00355 <span class="comment">//#ifndef ITK_MANUAL_INSTANTIATION</span>
<a name="l00356"></a>00356 <span class="comment">//#include "itkImageToImageFilterDetail.txx"</span>
<a name="l00357"></a>00357 <span class="comment">//#endif</span>
<a name="l00358"></a>00358 
<a name="l00359"></a>00359 <span class="preprocessor">#endif</span>
<a name="l00360"></a>00360 <span class="preprocessor"></span>
</pre></div></div>
<hr><address><small>
Generated at Thu May 7 23:14:27 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>