<!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: itkMRIBiasFieldCorrectionFilter.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_16b0d2d22c345042f35cebae66b36010.html">Algorithms</a> </div> <div class="contents"> <h1>itkMRIBiasFieldCorrectionFilter.h</h1><a href="itkMRIBiasFieldCorrectionFilter_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: itkMRIBiasFieldCorrectionFilter.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-01-26 21:45:51 $</span> <a name="l00007"></a>00007 <span class="comment"> Version: $Revision: 1.38 $</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 __itkMRIBiasFieldCorrectionFilter_h</span> <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define __itkMRIBiasFieldCorrectionFilter_h</span> <a name="l00019"></a>00019 <span class="preprocessor"></span> <a name="l00020"></a>00020 <span class="preprocessor">#include <time.h></span> <a name="l00021"></a>00021 <a name="l00022"></a>00022 <span class="preprocessor">#include "<a class="code" href="itkImageToImageFilter_8h.html">itkImageToImageFilter.h</a>"</span> <a name="l00023"></a>00023 <span class="preprocessor">#include "<a class="code" href="itkImage_8h.html">itkImage.h</a>"</span> <a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="itkArray2D_8h.html">itkArray2D.h</a>"</span> <a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="itkMRASlabIdentifier_8h.html">itkMRASlabIdentifier.h</a>"</span> <a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="itkCompositeValleyFunction_8h.html">itkCompositeValleyFunction.h</a>"</span> <a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="itkMultivariateLegendrePolynomial_8h.html">itkMultivariateLegendrePolynomial.h</a>"</span> <a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="itkNormalVariateGenerator_8h.html">Statistics/itkNormalVariateGenerator.h</a>"</span> <a name="l00029"></a>00029 <span class="preprocessor">#include "<a class="code" href="itkOnePlusOneEvolutionaryOptimizer_8h.html">itkOnePlusOneEvolutionaryOptimizer.h</a>"</span> <a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="itkArray_8h.html">itkArray.h</a>"</span> <a name="l00031"></a>00031 <span class="preprocessor">#include "<a class="code" href="itkImageRegionConstIterator_8h.html">itkImageRegionConstIterator.h</a>"</span> <a name="l00032"></a>00032 <span class="preprocessor">#include "<a class="code" href="itkImageRegionIterator_8h.html">itkImageRegionIterator.h</a>"</span> <a name="l00033"></a>00033 <a name="l00034"></a>00034 <span class="keyword">namespace </span>itk <a name="l00035"></a>00035 { <a name="l00047"></a>00047 <span class="keyword">template</span><<span class="keyword">class</span> TImage, <span class="keyword">class</span> TImageMask, <span class="keyword">class</span> TBiasField> <a name="l00048"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html">00048</a> <span class="keyword">class </span><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html" title="a cost function for optimization">MRIBiasEnergyFunction</a> : <span class="keyword">public</span> <a class="code" href="classitk_1_1SingleValuedCostFunction.html" title="This class is a base for the CostFunctions returning a single value.">SingleValuedCostFunction</a> <a name="l00049"></a>00049 { <a name="l00050"></a>00050 <span class="keyword">public</span>: <a name="l00052"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#4119fd837b5444c45521cdb2e1f956fb">00052</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html" title="a cost function for optimization">MRIBiasEnergyFunction</a> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html" title="a cost function for optimization">Self</a>; <a name="l00053"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#376648c897e097bf8425b1e1e6cdc8d6">00053</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SingleValuedCostFunction.html" title="This class is a base for the CostFunctions returning a single value.">SingleValuedCostFunction</a> <a class="code" href="classitk_1_1SingleValuedCostFunction.html" title="This class is a base for the CostFunctions returning a single value.">Superclass</a>; <a name="l00054"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#4b1d00ea9b7915fb2a913fe0c4649fca">00054</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="l00055"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#7212f25311ec1c0f27658d294488b860">00055</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="l00056"></a>00056 <a name="l00058"></a>00058 <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>( <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html" title="a cost function for optimization">MRIBiasEnergyFunction</a>, <a class="code" href="classitk_1_1SingleValuedCostFunction.html" title="This class is a base for the CostFunctions returning a single value.">SingleValuedCostFunction</a> ); <a name="l00059"></a>00059 <a name="l00061"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#e4fb60e098b47160739bd15ca8bf3ba6">00061</a> <a class="code" href="itkMacro_8h.html#0fdc15685afa271857c57e7cd482f30c">itkNewMacro</a>(<a class="code" href="classitk_1_1MRIBiasEnergyFunction.html" title="a cost function for optimization">Self</a>); <a name="l00062"></a>00062 <a name="l00064"></a>00064 <span class="keyword">typedef</span> TImage <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#e4fb60e098b47160739bd15ca8bf3ba6">ImageType</a>; <a name="l00065"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#85616c34b8ac2152c297f0391ee3a059">00065</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="itkFEMMacro_8h.html#539cce1a3282ba59952dedcbf9cdb23f">ImageType::Pointer</a> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#85616c34b8ac2152c297f0391ee3a059">ImagePointer</a>; <a name="l00066"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#c924bff93299afaed301cee890d35199">00066</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> ImageType::PixelType <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#c924bff93299afaed301cee890d35199">ImageElementType</a>; <a name="l00067"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#bc55a36f4a9b28ad37011898cc909184">00067</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#be32dc19e71d40322ad9828b9ab40853">ImageType::IndexType</a> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#bc55a36f4a9b28ad37011898cc909184">ImageIndexType</a>; <a name="l00068"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#0d0a800a52d48d70b3af236d1de2d6e5">00068</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ed8c4a40607d317c666eb96ea265e126">ImageType::RegionType</a> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#0d0a800a52d48d70b3af236d1de2d6e5">ImageRegionType</a>; <a name="l00069"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#f21f1c290bc0a7c68111e1cf6bc3baf5">00069</a> <span class="keyword">typedef</span> TImageMask <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#f21f1c290bc0a7c68111e1cf6bc3baf5">MaskType</a>; <a name="l00070"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#1f35db00a30bd60f774a787a38cc1259">00070</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="itkFEMMacro_8h.html#539cce1a3282ba59952dedcbf9cdb23f">MaskType::Pointer</a> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#1f35db00a30bd60f774a787a38cc1259">MaskPointer</a>; <a name="l00071"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#85d465492f218a996fdfb93f48a93381">00071</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> MaskType::PixelType <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#85d465492f218a996fdfb93f48a93381">MaskElementType</a>; <a name="l00072"></a>00072 <a name="l00074"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#cbfa12b23e7a44bef3911c6ca59e08b0">00074</a> <span class="keyword">typedef</span> TBiasField <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#cbfa12b23e7a44bef3911c6ca59e08b0">BiasFieldType</a>; <a name="l00075"></a>00075 <a name="l00078"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#c11c366bbe6c2521af8c3f5d375878ec">00078</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1Array.html" title="Array class with size defined at construction time.">Superclass::ParametersType</a> <a class="code" href="classitk_1_1Array.html" title="Array class with size defined at construction time.">ParametersType</a>; <a name="l00079"></a>00079 <a name="l00081"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#145d90d137a7377a0dac53b61b952cdb">00081</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Array.html">Superclass::DerivativeType</a> <a class="code" href="classitk_1_1Array.html">DerivativeType</a>; <a name="l00082"></a>00082 <a name="l00084"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#c0c9ae6540d2dd782c5c924b55820241">00084</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SingleValuedCostFunction.html#545d325e204a9aedea7640c87d6ca983">Superclass::MeasureType</a> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#c0c9ae6540d2dd782c5c924b55820241">MeasureType</a>; <a name="l00085"></a>00085 <a name="l00086"></a>00086 <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#c01ce77375fd6525c46ecd1cb5416ffd">itkStaticConstMacro</a>(SpaceDimension, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, 3); <a name="l00087"></a>00087 <a name="l00089"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#44139cadf5bb64d7714c2cf0ae8d55dc">00089</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1CompositeValleyFunction.html" title="Multiple valley shaped curve function.">CompositeValleyFunction</a> <a class="code" href="classitk_1_1CompositeValleyFunction.html" title="Multiple valley shaped curve function.">InternalEnergyFunction</a>; <a name="l00090"></a>00090 <a name="l00092"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#d0a614e8716909ab14b568e32be9bb69">00092</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#d0a614e8716909ab14b568e32be9bb69">SamplingFactorType</a>[SpaceDimension]; <a name="l00093"></a>00093 <a name="l00095"></a>00095 <a class="code" href="itkMacro_8h.html#b950b763422e5059348e6178e2a5f425">itkSetObjectMacro</a>( <a class="code" href="classitk_1_1Image.html" title="Templated n-dimensional image class.">Image</a>, <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#e4fb60e098b47160739bd15ca8bf3ba6">ImageType</a> ); <a name="l00096"></a>00096 <a name="l00098"></a>00098 <a class="code" href="itkMacro_8h.html#b950b763422e5059348e6178e2a5f425">itkSetObjectMacro</a>( Mask, <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#f21f1c290bc0a7c68111e1cf6bc3baf5">MaskType</a> ); <a name="l00099"></a>00099 <a name="l00101"></a>00101 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>( <a class="code" href="classitk_1_1Region.html" title="A region represents some portion or piece of data.">Region</a>, <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#0d0a800a52d48d70b3af236d1de2d6e5">ImageRegionType</a> ); <a name="l00102"></a>00102 <a name="l00104"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#e0c2068122c12d9d24c9683c18368307">00104</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#e0c2068122c12d9d24c9683c18368307">SetBiasField</a>(<a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#cbfa12b23e7a44bef3911c6ca59e08b0">BiasFieldType</a>* bias) <a name="l00105"></a>00105 { m_BiasField = bias; } <a name="l00106"></a>00106 <a name="l00109"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#9a74bd7b63d04de7a04023d389e93da1">00109</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#9a74bd7b63d04de7a04023d389e93da1">SetSamplingFactors</a>(<a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#d0a614e8716909ab14b568e32be9bb69">SamplingFactorType</a> factor) <a name="l00110"></a>00110 { <a name="l00111"></a>00111 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < SpaceDimension; i++) <a name="l00112"></a>00112 { <a name="l00113"></a>00113 m_SamplingFactor[i] = factor[i]; <a name="l00114"></a>00114 } <a name="l00115"></a>00115 } <a name="l00117"></a>00117 <a name="l00120"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#d849498dae22db3e5dbc04a60c6248f6">00120</a> <span class="keywordtype">double</span> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#d849498dae22db3e5dbc04a60c6248f6">GetEnergy0</a>(<span class="keywordtype">double</span> diff) <a name="l00121"></a>00121 { <a name="l00122"></a>00122 <span class="keywordflow">return</span> (*m_InternalEnergyFunction)(diff); <a name="l00123"></a>00123 } <a name="l00124"></a>00124 <a name="l00127"></a>00127 <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#c0c9ae6540d2dd782c5c924b55820241">MeasureType</a> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#fa712a162be34fee2fc20688a12d499b">GetValue</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#c11c366bbe6c2521af8c3f5d375878ec">ParametersType</a> & parameters ) <span class="keyword">const</span>; <a name="l00128"></a>00128 <a name="l00131"></a><a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#6125ad0c50cec055447fbe1aa28409dc">00131</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#6125ad0c50cec055447fbe1aa28409dc">GetDerivative</a>( <span class="keyword">const</span> <a class="code" href="classitk_1_1Array.html" title="Array class with size defined at construction time.">ParametersType</a> & <a class="code" href="itkMacro_8h.html#6be3b439282da7a34278c0594589b972">itkNotUsed</a>(parameters), <a name="l00132"></a>00132 <a class="code" href="classitk_1_1Array.html">DerivativeType</a> & <a class="code" href="itkMacro_8h.html#6be3b439282da7a34278c0594589b972">itkNotUsed</a>(derivative) )<span class="keyword"> const </span> <a name="l00133"></a>00133 <span class="keyword"> </span>{ } <a name="l00134"></a>00134 <a name="l00139"></a>00139 <span class="keywordtype">void</span> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#7577d3976837d41e1b4d4423db264fd8">InitializeDistributions</a>( <a class="code" href="classitk_1_1Array.html">Array<double></a> classMeans, <a name="l00140"></a>00140 <a class="code" href="classitk_1_1Array.html">Array<double></a> classSigmas ); <a name="l00141"></a>00141 <a name="l00142"></a>00142 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#ccb29f2fb76036d02c2ea7e7bb9340d6">GetNumberOfParameters</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; <a name="l00143"></a>00143 <a name="l00144"></a>00144 <span class="keyword">protected</span>: <a name="l00146"></a>00146 <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#abddcfe062cf6372e0a3471bcba4ef37">MRIBiasEnergyFunction</a>(); <a name="l00147"></a>00147 <a name="l00149"></a>00149 <span class="keyword">virtual</span> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#82b6358fac763591488938ab271ff035">~MRIBiasEnergyFunction</a>(); <a name="l00150"></a>00150 <a name="l00151"></a>00151 <a name="l00152"></a>00152 <span class="keyword">private</span>: <a name="l00153"></a>00153 <a name="l00155"></a>00155 <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#cbfa12b23e7a44bef3911c6ca59e08b0">BiasFieldType</a> * m_BiasField; <a name="l00156"></a>00156 <a name="l00158"></a>00158 <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#85616c34b8ac2152c297f0391ee3a059">ImagePointer</a> m_Image; <a name="l00159"></a>00159 <a name="l00161"></a>00161 <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#1f35db00a30bd60f774a787a38cc1259">MaskPointer</a> m_Mask; <a name="l00162"></a>00162 <a name="l00164"></a>00164 <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#0d0a800a52d48d70b3af236d1de2d6e5">ImageRegionType</a> m_Region; <a name="l00165"></a>00165 <a name="l00167"></a>00167 <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#44139cadf5bb64d7714c2cf0ae8d55dc">InternalEnergyFunction</a>* m_InternalEnergyFunction; <a name="l00168"></a>00168 <a name="l00170"></a>00170 <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#d0a614e8716909ab14b568e32be9bb69">SamplingFactorType</a> m_SamplingFactor; <a name="l00171"></a>00171 <a name="l00172"></a>00172 <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#abddcfe062cf6372e0a3471bcba4ef37">MRIBiasEnergyFunction</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#4119fd837b5444c45521cdb2e1f956fb">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00173"></a>00173 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html#4119fd837b5444c45521cdb2e1f956fb">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00174"></a>00174 <a name="l00175"></a>00175 }; <span class="comment">// end of class</span> <a name="l00176"></a>00176 <a name="l00226"></a>00226 <span class="keyword">template</span> <<span class="keyword">class</span> TInputImage, <span class="keyword">class</span> TOutputImage, <span class="keyword">class</span> TMaskImage> <a name="l00227"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html">00227</a> <span class="keyword">class </span><a class="code" href="itkWin32Header_8h.html#7d4384322557205d75f0719c012dded6">ITK_EXPORT</a> <a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html" title="corrects 3D MRI bias field">MRIBiasFieldCorrectionFilter</a> : <a name="l00228"></a>00228 <span class="keyword">public</span> <a class="code" href="classitk_1_1ImageToImageFilter.html" title="Base class for filters that take an image as input and produce an image as output...">ImageToImageFilter</a>< TInputImage, TOutputImage > <a name="l00229"></a>00229 { <a name="l00230"></a>00230 <span class="keyword">public</span>: <a name="l00232"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#e4776648278936e5fdb8188e632447de">00232</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html" title="corrects 3D MRI bias field">MRIBiasFieldCorrectionFilter</a> <a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html" title="corrects 3D MRI bias field">Self</a>; <a name="l00233"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#c593ce9edea92d584198eb2868b95f3d">00233</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1ImageToImageFilter.html">ImageToImageFilter< TInputImage, TOutputImage ></a> <a class="code" href="classitk_1_1ImageToImageFilter.html">Superclass</a>; <a name="l00234"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#988965bf78514eddb2d027cbfb94b578">00234</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="l00235"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#defb2728118b5411862ac1008aa2b792">00235</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="l00236"></a>00236 <a name="l00238"></a>00238 <a class="code" href="itkMacro_8h.html#0fdc15685afa271857c57e7cd482f30c">itkNewMacro</a>(<a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html" title="corrects 3D MRI bias field">Self</a>); <a name="l00239"></a>00239 <a name="l00241"></a>00241 <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>(<a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html" title="corrects 3D MRI bias field">MRIBiasFieldCorrectionFilter</a>, <a class="code" href="classitk_1_1ImageToImageFilter.html" title="Base class for filters that take an image as input and produce an image as output...">ImageToImageFilter</a>); <a name="l00242"></a>00242 <a name="l00244"></a>00244 <a class="code" href="itkMacro_8h.html#1905cf6b2e88235996fa7ff73b2fb0eb">itkStaticConstMacro</a>(ImageDimension, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <a name="l00245"></a>00245 TOutputImage::ImageDimension); <a name="l00246"></a>00246 <a name="l00248"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#4e10a8a7713a783914774681f3447cd4">00248</a> <span class="keyword">typedef</span> TOutputImage <a class="code" href="namespaceHardConnectedComponentImageFilter.html#386ea018cab3835dcdff2603f4d2280e">OutputImageType</a>; <a name="l00249"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#9c52a911f2402841985fddf0c4914aef">00249</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="itkFEMMacro_8h.html#539cce1a3282ba59952dedcbf9cdb23f">TOutputImage::Pointer</a> OutputImagePointer; <a name="l00250"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#3cbe4ebe39da7584c410be479081b195">00250</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#be32dc19e71d40322ad9828b9ab40853">TOutputImage::IndexType</a> OutputImageIndexType; <a name="l00251"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#c25d9f82e5e07eca083212eb7ef1d892">00251</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> TOutputImage::PixelType OutputImagePixelType; <a name="l00252"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#0045b206ff2e25702246013859fb83f5">00252</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#5bf82236e1e50e653de84c8ead448599">TOutputImage::SizeType</a> OutputImageSizeType; <a name="l00253"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#13a6ca6cb4f34728a7b5d3d51550fe38">00253</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ed8c4a40607d317c666eb96ea265e126">TOutputImage::RegionType</a> OutputImageRegionType; <a name="l00254"></a>00254 <a name="l00255"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#90bc83dd11073d5568aeda6aa5dfaad5">00255</a> <span class="keyword">typedef</span> TInputImage <a class="code" href="namespaceHardConnectedComponentImageFilter.html#3742cbac150bee74daa9aab85ed80623">InputImageType</a>; <a name="l00256"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#f61f6dd9167759014aa202d440c13c02">00256</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="itkFEMMacro_8h.html#539cce1a3282ba59952dedcbf9cdb23f">TInputImage::Pointer</a> InputImagePointer; <a name="l00257"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#33e1d8595339fe7d65ad528d9562fa39">00257</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#be32dc19e71d40322ad9828b9ab40853">TInputImage::IndexType</a> InputImageIndexType; <a name="l00258"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#1618026068244ee8975d5e460950a719">00258</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> TInputImage::PixelType InputImagePixelType; <a name="l00259"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#141c1fc6ce0c986d082f2e0df583c737">00259</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#5bf82236e1e50e653de84c8ead448599">TInputImage::SizeType</a> InputImageSizeType; <a name="l00260"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#03bccdfc516ec8741be3a788e58083b2">00260</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ed8c4a40607d317c666eb96ea265e126">TInputImage::RegionType</a> InputImageRegionType; <a name="l00261"></a>00261 <a name="l00263"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#3a8f91695d1a5b8164463f527a91521a">00263</a> <span class="keyword">typedef</span> TMaskImage ImageMaskType; <a name="l00264"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#92c2adb304845e3f71af64690181a549">00264</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="itkFEMMacro_8h.html#539cce1a3282ba59952dedcbf9cdb23f">ImageMaskType::Pointer</a> ImageMaskPointer; <a name="l00265"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#5845b94f969f0813aaec97e370725cf7">00265</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ed8c4a40607d317c666eb96ea265e126">ImageMaskType::RegionType</a> ImageMaskRegionType; <a name="l00266"></a>00266 <a name="l00268"></a>00268 <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Image.html" title="Templated n-dimensional image class.">Image< float, itkGetStaticConstMacro(ImageDimension) ></a> <a name="l00269"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#77071634b2862c70b395a63fd7962e73">00269</a> <a class="code" href="classitk_1_1Image.html" title="Templated n-dimensional image class.">InternalImageType</a>; <a name="l00270"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#a80393bd0ead1f84172d890fd0d75276">00270</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> InternalImageType::PixelType InternalImagePixelType; <a name="l00271"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#70ccde491275059c12c2e2b7fd7b53fd">00271</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1SmartPointer.html">InternalImageType::Pointer</a> <a class="code" href="classitk_1_1SmartPointer.html">InternalImagePointer</a>; <a name="l00272"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#433f89f3a1e78c27744c326569843177">00272</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ed8c4a40607d317c666eb96ea265e126">InternalImageType::RegionType</a> InternalImageRegionType; <a name="l00274"></a>00274 <a name="l00276"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#fc62660159d4e39a3c69ecc35b1d5851">00276</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1MRASlabIdentifier.html" title="identifies slab in MR images comparing minimum intensity averages">MRASlabIdentifier<InputImageType></a> <a class="code" href="classitk_1_1MRASlabIdentifier.html" title="identifies slab in MR images comparing minimum intensity averages">MRASlabIdentifierType</a>; <a name="l00277"></a>00277 <span class="keyword">typedef</span> <span class="keyword">typename</span> MRASlabIdentifierType::SlabRegionVectorType <a name="l00278"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#72d3cf15517aea20e122273386c8115a">00278</a> SlabRegionVectorType; <a name="l00279"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#52dbc9e154e0cf927042fef7016d0c5f">00279</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> SlabRegionVectorType::iterator SlabRegionVectorIteratorType; <a name="l00280"></a>00280 <a name="l00282"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#aae9c794b35298d8f34d3127acd21e80">00282</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1MultivariateLegendrePolynomial.html" title="2D and 3D multivariate Legendre Polynomial">MultivariateLegendrePolynomial</a> <a class="code" href="classitk_1_1MultivariateLegendrePolynomial.html" title="2D and 3D multivariate Legendre Polynomial">BiasFieldType</a>; <a name="l00283"></a>00283 <a name="l00285"></a>00285 <span class="keyword">typedef</span> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html" title="a cost function for optimization">MRIBiasEnergyFunction</a><<a class="code" href="classitk_1_1Image.html" title="Templated n-dimensional image class.">InternalImageType</a>, <a name="l00286"></a>00286 ImageMaskType, <a name="l00287"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#6aef5ab7de5e001a0861081b88512274">00287</a> <a class="code" href="classitk_1_1MultivariateLegendrePolynomial.html" title="2D and 3D multivariate Legendre Polynomial">BiasFieldType</a>> <a class="code" href="classitk_1_1MRIBiasEnergyFunction.html" title="a cost function for optimization">EnergyFunctionType</a>; <a name="l00288"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#b9174ff839feb1f61d1c17d4334b662f">00288</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1SmartPointer.html">EnergyFunctionType::Pointer</a> <a class="code" href="classitk_1_1SmartPointer.html">EnergyFunctionPointer</a>; <a name="l00289"></a>00289 <a name="l00291"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#d007021ff7abdb041df958968eeddbd1">00291</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Statistics_1_1NormalVariateGenerator.html" title="Normal random variate generator.">Statistics::NormalVariateGenerator</a> <a class="code" href="classitk_1_1Statistics_1_1NormalVariateGenerator.html" title="Normal random variate generator.">NormalVariateGeneratorType</a>; <a name="l00292"></a>00292 <a name="l00294"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#1b4d8a04c8791c038e772d1ce34c4cd5">00294</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1OnePlusOneEvolutionaryOptimizer.html" title="1+1 evolutionary strategy optimizer">OnePlusOneEvolutionaryOptimizer</a> <a class="code" href="classitk_1_1OnePlusOneEvolutionaryOptimizer.html" title="1+1 evolutionary strategy optimizer">OptimizerType</a>; <a name="l00295"></a>00295 <a name="l00297"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#bebcd7a90eadf59ffb560294a70b4d97">00297</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Array2D.html">Array2D<unsigned int></a> <a class="code" href="classitk_1_1Array2D.html">ScheduleType</a>; <a name="l00298"></a>00298 <a name="l00302"></a>00302 <span class="keywordtype">void</span> SetInputMask(ImageMaskType* inputMask); <a name="l00303"></a>00303 <a class="code" href="itkMacro_8h.html#f6bef9ee7e4c077b96a08848ed4e7660">itkGetObjectMacro</a>( InputMask, ImageMaskType ); <a name="l00305"></a>00305 <a name="l00308"></a>00308 <span class="keywordtype">void</span> SetOutputMask(ImageMaskType* outputMask); <a name="l00309"></a>00309 <a name="l00311"></a>00311 <a class="code" href="itkMacro_8h.html#f6bef9ee7e4c077b96a08848ed4e7660">itkGetObjectMacro</a>( OutputMask, ImageMaskType ); <a name="l00312"></a>00312 <a name="l00316"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#ce3c2d0cc87878647f213a9b8e1011d2">00316</a> <span class="keywordtype">void</span> IsBiasFieldMultiplicative(<span class="keywordtype">bool</span> flag) <a name="l00317"></a>00317 { m_BiasMultiplicative = flag; } <a name="l00318"></a>00318 <a name="l00320"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#b839b727934dba8702427343fae20330">00320</a> <span class="keywordtype">bool</span> IsBiasFieldMultiplicative() <a name="l00321"></a>00321 { <span class="keywordflow">return</span> m_BiasMultiplicative; } <a name="l00322"></a>00322 <a name="l00326"></a>00326 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>( UsingInterSliceIntensityCorrection, <span class="keywordtype">bool</span> ); <a name="l00327"></a>00327 <a class="code" href="itkMacro_8h.html#7d989c13a1a213168db99ae0f84185d4">itkGetConstReferenceMacro</a>( UsingInterSliceIntensityCorrection, <span class="keywordtype">bool</span> ); <a name="l00329"></a>00329 <a name="l00335"></a>00335 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>( UsingSlabIdentification, <span class="keywordtype">bool</span> ); <a name="l00336"></a>00336 <a class="code" href="itkMacro_8h.html#7d989c13a1a213168db99ae0f84185d4">itkGetConstReferenceMacro</a>( UsingSlabIdentification, <span class="keywordtype">bool</span> ); <a name="l00338"></a>00338 <a name="l00339"></a>00339 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>( SlabBackgroundMinimumThreshold, InputImagePixelType ); <a name="l00340"></a>00340 <a class="code" href="itkMacro_8h.html#7d989c13a1a213168db99ae0f84185d4">itkGetConstReferenceMacro</a>( SlabBackgroundMinimumThreshold, <a name="l00341"></a>00341 InputImagePixelType ); <a name="l00342"></a>00342 <a name="l00343"></a>00343 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>( SlabNumberOfSamples, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> ); <a name="l00344"></a>00344 <a class="code" href="itkMacro_8h.html#7d989c13a1a213168db99ae0f84185d4">itkGetConstReferenceMacro</a>( SlabNumberOfSamples, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> ); <a name="l00345"></a>00345 <a name="l00346"></a>00346 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>( SlabTolerance, <span class="keywordtype">double</span> ); <a name="l00347"></a>00347 <a class="code" href="itkMacro_8h.html#7d989c13a1a213168db99ae0f84185d4">itkGetConstReferenceMacro</a>( SlabTolerance, <span class="keywordtype">double</span> ); <a name="l00348"></a>00348 <a name="l00354"></a>00354 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>( UsingBiasFieldCorrection, <span class="keywordtype">bool</span> ); <a name="l00355"></a>00355 <a class="code" href="itkMacro_8h.html#7d989c13a1a213168db99ae0f84185d4">itkGetConstReferenceMacro</a>( UsingBiasFieldCorrection, <span class="keywordtype">bool</span> ); <a name="l00357"></a>00357 <a name="l00360"></a>00360 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>( GeneratingOutput, <span class="keywordtype">bool</span> ); <a name="l00361"></a>00361 <a class="code" href="itkMacro_8h.html#7d989c13a1a213168db99ae0f84185d4">itkGetConstReferenceMacro</a>( GeneratingOutput, <span class="keywordtype">bool</span> ); <a name="l00363"></a>00363 <a name="l00366"></a>00366 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>( SlicingDirection , <span class="keywordtype">int</span> ); <a name="l00367"></a>00367 <a name="l00369"></a>00369 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>( BiasFieldDegree, <span class="keywordtype">int</span> ); <a name="l00370"></a>00370 <a class="code" href="itkMacro_8h.html#1600305bb01e39e87c472d8bf29bd1cf">itkGetMacro</a>( BiasFieldDegree, <span class="keywordtype">int</span> ); <a name="l00372"></a>00372 <a name="l00375"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#301f3a7cc9fee78aec7d2f6a7ea83f1e">00375</a> <span class="keywordtype">void</span> SetInitialBiasFieldCoefficients(<span class="keyword">const</span> <a name="l00376"></a>00376 BiasFieldType::CoefficientArrayType <a name="l00377"></a>00377 &coefficients) <a name="l00378"></a>00378 { this->Modified(); m_BiasFieldCoefficients = coefficients; } <a name="l00379"></a>00379 <a name="l00383"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#612a2b334fc6c964d36e122d67ebe536">00383</a> BiasFieldType::CoefficientArrayType GetEstimatedBiasFieldCoefficients() <a name="l00384"></a>00384 { <span class="keywordflow">return</span> m_EstimatedBiasFieldCoefficients; } <a name="l00385"></a>00385 <a name="l00389"></a>00389 <span class="keywordtype">void</span> SetTissueClassStatistics(<span class="keyword">const</span> <a class="code" href="classitk_1_1Array.html">Array<double></a> & means, <a name="l00390"></a>00390 <span class="keyword">const</span> <a class="code" href="classitk_1_1Array.html">Array<double></a> & sigmas) <a name="l00391"></a>00391 <span class="keywordflow">throw</span> (ExceptionObject); <a name="l00392"></a>00392 <a name="l00394"></a>00394 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>( VolumeCorrectionMaximumIteration, <span class="keywordtype">int</span> ); <a name="l00395"></a>00395 <a class="code" href="itkMacro_8h.html#1600305bb01e39e87c472d8bf29bd1cf">itkGetMacro</a>( VolumeCorrectionMaximumIteration, <span class="keywordtype">int</span> ); <a name="l00396"></a>00396 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>( InterSliceCorrectionMaximumIteration, <span class="keywordtype">int</span> ); <a name="l00397"></a>00397 <a class="code" href="itkMacro_8h.html#1600305bb01e39e87c472d8bf29bd1cf">itkGetMacro</a>( InterSliceCorrectionMaximumIteration, <span class="keywordtype">int</span> ); <a name="l00399"></a>00399 <a name="l00401"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#224f18953ecac44acb792ac9f4748c7b">00401</a> <span class="keywordtype">void</span> SetOptimizerInitialRadius(<span class="keywordtype">double</span> initRadius) <a name="l00402"></a>00402 { m_OptimizerInitialRadius = initRadius; } <a name="l00403"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#232fa0e4ba7d14e7d9417f0e4e25c340">00403</a> <span class="keywordtype">double</span> GetOptimizerInitialRadius() <a name="l00404"></a>00404 { <span class="keywordflow">return</span> m_OptimizerInitialRadius; } <a name="l00406"></a>00406 <a name="l00408"></a>00408 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>( OptimizerGrowthFactor, <span class="keywordtype">double</span> ); <a name="l00409"></a>00409 <a class="code" href="itkMacro_8h.html#1600305bb01e39e87c472d8bf29bd1cf">itkGetMacro</a>( OptimizerGrowthFactor, <span class="keywordtype">double</span> ); <a name="l00411"></a>00411 <a name="l00414"></a>00414 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>( OptimizerShrinkFactor, <span class="keywordtype">double</span> ); <a name="l00415"></a>00415 <a class="code" href="itkMacro_8h.html#1600305bb01e39e87c472d8bf29bd1cf">itkGetMacro</a>( OptimizerShrinkFactor, <span class="keywordtype">double</span> ); <a name="l00416"></a>00416 <a name="l00417"></a>00417 <a name="l00424"></a>00424 <span class="keywordtype">void</span> SetNumberOfLevels(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num); <a name="l00425"></a>00425 <a name="l00427"></a>00427 <a class="code" href="itkMacro_8h.html#1600305bb01e39e87c472d8bf29bd1cf">itkGetMacro</a>(NumberOfLevels, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>); <a name="l00428"></a>00428 <a name="l00435"></a>00435 <span class="keywordtype">void</span> SetSchedule( <span class="keyword">const</span> ScheduleType& schedule ); <a name="l00436"></a>00436 <a name="l00438"></a>00438 <a class="code" href="itkMacro_8h.html#7d989c13a1a213168db99ae0f84185d4">itkGetConstReferenceMacro</a>(Schedule, ScheduleType); <a name="l00439"></a>00439 <a name="l00444"></a>00444 <span class="keywordtype">void</span> SetStartingShrinkFactors( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> factor ); <a name="l00445"></a>00445 <span class="keywordtype">void</span> SetStartingShrinkFactors( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>* factors ); <a name="l00447"></a>00447 <a name="l00449"></a>00449 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> * GetStartingShrinkFactors() <span class="keyword">const</span>; <a name="l00450"></a>00450 <a name="l00454"></a>00454 <span class="keyword">static</span> <span class="keywordtype">bool</span> IsScheduleDownwardDivisible( <span class="keyword">const</span> ScheduleType& schedule ); <a name="l00455"></a>00455 <a name="l00456"></a>00456 <a name="l00463"></a>00463 <span class="keywordtype">void</span> Initialize() throw (ExceptionObject); <a name="l00464"></a>00464 <a name="l00467"></a>00467 BiasFieldType EstimateBiasField(InputImageRegionType region, <a name="l00468"></a>00468 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> degree, <a name="l00469"></a>00469 <span class="keywordtype">int</span> maximumIteration); <a name="l00470"></a>00470 <a name="l00474"></a>00474 <span class="keywordtype">void</span> CorrectImage(BiasFieldType& bias, <a name="l00475"></a>00475 InputImageRegionType region); <a name="l00476"></a>00476 <a name="l00479"></a>00479 <span class="keywordtype">void</span> CorrectInterSliceIntensityInhomogeneity(InputImageRegionType region); <a name="l00480"></a>00480 <a name="l00481"></a>00481 protected: <a name="l00482"></a>00482 <a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html" title="corrects 3D MRI bias field">MRIBiasFieldCorrectionFilter</a>(); <a name="l00483"></a>00483 virtual ~MRIBiasFieldCorrectionFilter(); <a name="l00484"></a>00484 <span class="keywordtype">void</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#920ae03048a5ad715d803ca2e92b52de">PrintSelf</a>(std::ostream& os, <a class="code" href="classitk_1_1Indent.html" title="Control indentation during Print() invocation.">Indent</a> indent) const; <a name="l00485"></a>00485 <a name="l00488"></a>00488 <span class="keywordtype">bool</span> CheckMaskImage(ImageMaskType* mask); <a name="l00489"></a>00489 <a name="l00490"></a>00490 protected: <a name="l00494"></a>00494 <span class="keywordtype">void</span> Log1PImage(InternalImageType* source, <a name="l00495"></a>00495 InternalImageType* target); <a name="l00496"></a>00496 <a name="l00499"></a>00499 <span class="keywordtype">void</span> ExpImage(InternalImageType* source, <a name="l00500"></a>00500 InternalImageType* target); <a name="l00501"></a>00501 <a name="l00504"></a>00504 template<class TSource, class TTarget> <a name="l00505"></a><a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html#dd7c9de29b894ccb28df0fa6058a76ad">00505</a> <span class="keywordtype">void</span> CopyAndConvertImage(const TSource * source, <a name="l00506"></a>00506 TTarget * target, <a name="l00507"></a>00507 typename TTarget::<a class="code" href="namespaceHardConnectedComponentImageFilter.html#ed8c4a40607d317c666eb96ea265e126">RegionType</a> requestedRegion) <a name="l00508"></a>00508 { <a name="l00509"></a>00509 <span class="keyword">typedef</span> <a class="code" href="classitk_1_1ImageRegionConstIterator.html" title="A multi-dimensional iterator templated over image type that walks a region of pixels...">ImageRegionConstIterator<TSource></a> SourceIterator; <a name="l00510"></a>00510 <span class="keyword">typedef</span> <a class="code" href="classitk_1_1ImageRegionIterator.html" title="A multi-dimensional iterator templated over image type that walks a region of pixels...">ImageRegionIterator<TTarget></a> TargetIterator; <a name="l00511"></a>00511 <span class="keyword">typedef</span> <span class="keyword">typename</span> TTarget::PixelType TargetPixelType; <a name="l00512"></a>00512 <a name="l00513"></a>00513 SourceIterator s_iter(source, requestedRegion); <a name="l00514"></a>00514 TargetIterator t_iter(target, requestedRegion); <a name="l00515"></a>00515 <a name="l00516"></a>00516 s_iter.GoToBegin(); <a name="l00517"></a>00517 t_iter.GoToBegin(); <a name="l00518"></a>00518 <span class="keywordflow">while</span> (!s_iter.IsAtEnd()) <a name="l00519"></a>00519 { <a name="l00520"></a>00520 t_iter.Set(static_cast<TargetPixelType>( s_iter.Get() ) ); <a name="l00521"></a>00521 ++s_iter; <a name="l00522"></a>00522 ++t_iter; <a name="l00523"></a>00523 } <a name="l00524"></a>00524 } <a name="l00525"></a>00525 <a name="l00530"></a>00530 <span class="keywordtype">void</span> GetBiasFieldSize(InputImageRegionType region, <a name="l00531"></a>00531 BiasFieldType::DomainSizeType& domainSize); <a name="l00532"></a>00532 <a name="l00536"></a>00536 <span class="keywordtype">void</span> AdjustSlabRegions(SlabRegionVectorType& slabs, <a name="l00537"></a>00537 OutputImageRegionType requestedRegion); <a name="l00538"></a>00538 <a name="l00539"></a>00539 <span class="keywordtype">void</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#f75a5945cdd8315676941024a0b8c1e9">GenerateData</a>(); <a name="l00540"></a>00540 <a name="l00541"></a>00541 <span class="keyword">private</span>: <a name="l00542"></a>00542 <a class="code" href="classitk_1_1MRIBiasFieldCorrectionFilter.html" title="corrects 3D MRI bias field">MRIBiasFieldCorrectionFilter</a>(<span class="keyword">const</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ac7d0120fe5292cdcdddb6163b8cb150">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00543"></a>00543 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ac7d0120fe5292cdcdddb6163b8cb150">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00544"></a>00544 <a name="l00546"></a>00546 EnergyFunctionPointer m_EnergyFunction; <a name="l00547"></a>00547 <a name="l00549"></a>00549 <a class="code" href="itkFEMMacro_8h.html#539cce1a3282ba59952dedcbf9cdb23f">NormalVariateGeneratorType::Pointer</a> m_NormalVariateGenerator; <a name="l00550"></a>00550 <a name="l00552"></a>00552 ImageMaskPointer m_InputMask; <a name="l00553"></a>00553 <a name="l00555"></a>00555 ImageMaskPointer m_OutputMask; <a name="l00556"></a>00556 <a name="l00558"></a>00558 InternalImagePointer m_InternalInput; <a name="l00559"></a>00559 <a name="l00561"></a>00561 SlabRegionVectorType m_Slabs; <a name="l00562"></a>00562 <a name="l00564"></a>00564 <span class="keywordtype">int</span> m_SlicingDirection; <a name="l00565"></a>00565 <a name="l00567"></a>00567 <span class="keywordtype">bool</span> m_BiasMultiplicative; <a name="l00568"></a>00568 <a name="l00570"></a>00570 <span class="keywordtype">bool</span> m_UsingInterSliceIntensityCorrection; <a name="l00571"></a>00571 <span class="keywordtype">bool</span> m_UsingSlabIdentification; <a name="l00572"></a>00572 <span class="keywordtype">bool</span> m_UsingBiasFieldCorrection; <a name="l00573"></a>00573 <span class="keywordtype">bool</span> m_GeneratingOutput; <a name="l00574"></a>00574 <a name="l00575"></a>00575 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_SlabNumberOfSamples; <a name="l00576"></a>00576 InputImagePixelType m_SlabBackgroundMinimumThreshold; <a name="l00577"></a>00577 <span class="keywordtype">double</span> m_SlabTolerance; <a name="l00579"></a>00579 <span class="keywordtype">int</span> m_BiasFieldDegree; <a name="l00580"></a>00580 <a name="l00582"></a>00582 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_NumberOfLevels; <a name="l00583"></a>00583 <a name="l00585"></a>00585 ScheduleType m_Schedule; <a name="l00586"></a>00586 <a name="l00589"></a>00589 BiasFieldType::CoefficientArrayType m_BiasFieldCoefficients; <a name="l00590"></a>00590 <a name="l00593"></a>00593 BiasFieldType::CoefficientArrayType m_EstimatedBiasFieldCoefficients; <a name="l00594"></a>00594 <a name="l00596"></a>00596 <span class="keywordtype">int</span> m_VolumeCorrectionMaximumIteration; <a name="l00597"></a>00597 <a name="l00599"></a>00599 <span class="keywordtype">int</span> m_InterSliceCorrectionMaximumIteration; <a name="l00600"></a>00600 <a name="l00602"></a>00602 <span class="keywordtype">double</span> m_OptimizerInitialRadius; <a name="l00603"></a>00603 <a name="l00605"></a>00605 <span class="keywordtype">double</span> m_OptimizerGrowthFactor; <a name="l00606"></a>00606 <a name="l00608"></a>00608 <span class="keywordtype">double</span> m_OptimizerShrinkFactor; <a name="l00609"></a>00609 <a name="l00611"></a>00611 <a class="code" href="classitk_1_1Array.html">Array<double></a> m_TissueClassMeans; <a name="l00612"></a>00612 <a name="l00614"></a>00614 <a class="code" href="classitk_1_1Array.html">Array<double></a> m_TissueClassSigmas; <a name="l00615"></a>00615 }; <a name="l00616"></a>00616 <a name="l00617"></a>00617 <a name="l00618"></a>00618 <span class="comment">// ==================================</span> <a name="l00619"></a>00619 <a name="l00620"></a>00620 <a name="l00621"></a>00621 } <span class="comment">// end namespace itk</span> <a name="l00622"></a>00622 <a name="l00623"></a>00623 <span class="preprocessor">#ifndef ITK_MANUAL_INSTANTIATION</span> <a name="l00624"></a>00624 <span class="preprocessor"></span><span class="preprocessor">#include "itkMRIBiasFieldCorrectionFilter.txx"</span> <a name="l00625"></a>00625 <span class="preprocessor">#endif</span> <a name="l00626"></a>00626 <span class="preprocessor"></span> <a name="l00627"></a>00627 <span class="preprocessor">#endif</span> <a name="l00628"></a>00628 <span class="preprocessor"></span> </pre></div></div> <hr><address><small> Generated at Thu May 7 23:35:01 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>