<!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: itkHistogramToImageFilter.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_2c33022d19e8077162952ea9ed57656d.html">Numerics</a> » <a class="el" href="dir_e82fe55e9fab4124d6625d716e091a5f.html">Statistics</a> </div> <div class="contents"> <h1>itkHistogramToImageFilter.h</h1><a href="itkHistogramToImageFilter_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: itkHistogramToImageFilter.h,v $</span> <a name="l00005"></a>00005 <span class="comment"> Language: C++</span> <a name="l00006"></a>00006 <span class="comment"> Date: $Date: 2007-01-25 09:18:58 $</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"> 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 __itkHistogramToImageFilter_h</span> <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define __itkHistogramToImageFilter_h</span> <a name="l00019"></a>00019 <span class="preprocessor"></span> <a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="itkImageSource_8h.html">itkImageSource.h</a>"</span> <a name="l00021"></a>00021 <span class="preprocessor">#include "<a class="code" href="itkConceptChecking_8h.html">itkConceptChecking.h</a>"</span> <a name="l00022"></a>00022 <span class="preprocessor">#include "<a class="code" href="itkHistogram_8h.html">itkHistogram.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="itkImageRegionIteratorWithIndex_8h.html">itkImageRegionIteratorWithIndex.h</a>"</span> <a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="itkSimpleDataObjectDecorator_8h.html">itkSimpleDataObjectDecorator.h</a>"</span> <a name="l00026"></a>00026 <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="l00050"></a>00050 <span class="keyword">template</span> <<span class="keyword">class</span> THistogram, <span class="keyword">class</span> TFunction> <a name="l00051"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html">00051</a> <span class="keyword">class </span><a class="code" href="itkWin32Header_8h.html#7d4384322557205d75f0719c012dded6">ITK_EXPORT</a> <a class="code" href="classitk_1_1HistogramToImageFilter.html" title="This class takes a histogram as an input and returns an image of type specified by...">HistogramToImageFilter</a> : <a name="l00052"></a>00052 <span class="keyword">public</span> <a class="code" href="classitk_1_1ImageSource.html" title="Base class for all process objects that output image data.">ImageSource</a><Image< typename TFunction::OutputPixelType , <a name="l00053"></a>00053 ::itk::Statistics::GetHistogramDimension<THistogram>::HistogramDimension> > <a name="l00054"></a>00054 { <a name="l00055"></a>00055 <span class="keyword">public</span>: <a name="l00056"></a>00056 <a name="l00058"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#80aece10b1d8d9856924dceffaafbb61">00058</a> <span class="keyword">typedef</span> TFunction <a class="code" href="classitk_1_1Function_1_1HistogramLogProbabilityFunction.html">FunctorType</a>; <a name="l00059"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#eb230c87654b5ededa2807d85f570b4c">00059</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#73549c9066bb62470db248f27cde10d2">FunctorType::OutputPixelType</a> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#73549c9066bb62470db248f27cde10d2">OutputPixelType</a>; <a name="l00060"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#9fef1e105b97c87b0815216ce1aee57c">00060</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1HistogramToImageFilter.html" title="This class takes a histogram as an input and returns an image of type specified by...">HistogramToImageFilter</a> <a class="code" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes.">Self</a>; <a name="l00061"></a>00061 <span class="keyword">typedef</span> <a class="code" href="classitk_1_1ImageSource.html" title="Base class for all process objects that output image data.">ImageSource</a>< <a class="code" href="classitk_1_1Image.html" title="Templated n-dimensional image class.">Image</a><<a class="code" href="namespaceHardConnectedComponentImageFilter.html#73549c9066bb62470db248f27cde10d2">OutputPixelType</a>,<a class="code" href="structitk_1_1Statistics_1_1GetHistogramDimension.html"> </a> <a name="l00062"></a>00062 <a class="code" href="structitk_1_1Statistics_1_1GetHistogramDimension.html"> ::itk::Statistics::GetHistogramDimension<THistogram>::HistogramDimension</a>> > <a name="l00063"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#ade6c50cb3ea25ee7c50686ef98629e8">00063</a> <a class="code" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes.">Superclass</a>; <a name="l00064"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#d460fe99972b042b84608bc6d6eb0c17">00064</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="l00065"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#850b6a1d9dfce94087938b929f1c89d3">00065</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="l00066"></a>00066 <a name="l00067"></a>00067 <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Image.html" title="Templated n-dimensional image class.">Image</a><<a class="code" href="namespaceHardConnectedComponentImageFilter.html#73549c9066bb62470db248f27cde10d2">OutputPixelType</a>,<a class="code" href="structitk_1_1Statistics_1_1GetHistogramDimension.html"> </a> <a name="l00068"></a>00068 <a class="code" href="structitk_1_1Statistics_1_1GetHistogramDimension.html"> ::itk::Statistics::GetHistogramDimension<THistogram>::HistogramDimension</a> > <a name="l00069"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#47540b9e950c702d87027c486735cf48">00069</a> <a class="code" href="classitk_1_1Image.html" title="Templated n-dimensional image class.">OutputImageType</a>; <a name="l00070"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#3629dc59d1fce89c65355a248fa35583">00070</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1SmartPointer.html">Superclass::Pointer</a> <a class="code" href="classitk_1_1SmartPointer.html">OutputImagePointer</a>; <a name="l00071"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#8f52770792d4ea89b2c3ff2afad8ccec">00071</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> OutputImageType::SpacingType SpacingType; <a name="l00072"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#0ecc603f3e6a154192b8d8740b47a6cb">00072</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> OutputImageType::PointType PointType; <a name="l00073"></a>00073 <a name="l00074"></a>00074 <a name="l00075"></a>00075 <span class="comment">// Define an iterator to iterate through the image</span> <a name="l00076"></a>00076 <span class="keyword">typedef</span> <a class="code" href="classitk_1_1ImageRegionIteratorWithIndex.html" title="A multi-dimensional iterator templated over image type that walks pixels within a...">itk::ImageRegionIteratorWithIndex</a>< <a class="code" href="classitk_1_1Image.html" title="Templated n-dimensional image class.">Image</a><<a class="code" href="namespaceHardConnectedComponentImageFilter.html#73549c9066bb62470db248f27cde10d2">OutputPixelType</a>,<a class="code" href="structitk_1_1Statistics_1_1GetHistogramDimension.html"> </a> <a name="l00077"></a>00077 <a class="code" href="structitk_1_1Statistics_1_1GetHistogramDimension.html"> ::itk::Statistics::GetHistogramDimension<THistogram>::HistogramDimension</a>> > <a name="l00078"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#d4fc39992ce40ffd3cea7e18e7e7c90c">00078</a> <a class="code" href="classitk_1_1ImageRegionIteratorWithIndex.html" title="A multi-dimensional iterator templated over image type that walks pixels within a...">ImageIteratorType</a>; <a name="l00079"></a>00079 <a name="l00081"></a>00081 <a class="code" href="itkMacro_8h.html#0fdc15685afa271857c57e7cd482f30c">itkNewMacro</a>(<a class="code" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes.">Self</a>); <a name="l00082"></a>00082 <a name="l00084"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#589ffa88c032703cadf61a0d22e0bf2d">00084</a> <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>(<a class="code" href="classitk_1_1HistogramToImageFilter.html" title="This class takes a histogram as an input and returns an image of type specified by...">HistogramToImageFilter</a>,<a class="code" href="classitk_1_1ImageSource.html" title="Base class for all process objects that output image data.">ImageSource</a>); <a name="l00085"></a>00085 <a name="l00087"></a>00087 <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::OutputImageRegionType OutputImageRegionType; <a name="l00088"></a>00088 <a name="l00090"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#9e1f10bde9a5f5be551f753c4f0158e2">00090</a> <span class="keyword">typedef</span> THistogram HistogramType; <a name="l00091"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#ba0bbdc31f66c7a8be1d60121a71ad2f">00091</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> HistogramType::MeasurementVectorType MeasurementVectorType; <a name="l00092"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#8284c61532bf15621160bde50360f7cf">00092</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#5bf82236e1e50e653de84c8ead448599">HistogramType::SizeType</a> HistogramSizeType; <a name="l00093"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#a01b24dd1309dfd23d267dcda7684c4f">00093</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#5bf82236e1e50e653de84c8ead448599">HistogramType::SizeType</a> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#5bf82236e1e50e653de84c8ead448599">SizeType</a>; <a name="l00094"></a>00094 <a name="l00097"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#91bd6c3c872d19788ec60ba454a32a69">00097</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SimpleDataObjectDecorator.html" title="Decorates any &quot;simple&quot; data type (data types without smart pointers) with...">SimpleDataObjectDecorator< HistogramType* ></a> <a class="code" href="classitk_1_1SimpleDataObjectDecorator.html" title="Decorates any &quot;simple&quot; data type (data types without smart pointers) with...">InputHistogramObjectType</a>; <a name="l00098"></a>00098 <a name="l00100"></a>00100 <a class="code" href="itkMacro_8h.html#1905cf6b2e88235996fa7ff73b2fb0eb">itkStaticConstMacro</a>(ImageDimension, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <a name="l00101"></a>00101 ::<a class="code" href="structitk_1_1Statistics_1_1GetHistogramDimension.html">itk::Statistics::GetHistogramDimension<THistogram>::HistogramDimension</a> ); <a name="l00102"></a>00102 <a name="l00104"></a>00104 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetInput( <span class="keyword">const</span> HistogramType *histogram); <a name="l00105"></a>00105 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetInput( <span class="keyword">const</span> <a class="code" href="classitk_1_1SimpleDataObjectDecorator.html" title="Decorates any &quot;simple&quot; data type (data types without smart pointers) with...">InputHistogramObjectType</a> *inputObject); <a name="l00106"></a>00106 <span class="keyword">const</span> <a class="code" href="classitk_1_1SimpleDataObjectDecorator.html" title="Decorates any &quot;simple&quot; data type (data types without smart pointers) with...">InputHistogramObjectType</a>* GetInput(<span class="keywordtype">void</span>); <a name="l00108"></a>00108 <a name="l00109"></a>00109 <a name="l00112"></a>00112 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>(Spacing,SpacingType); <a name="l00113"></a>00113 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetSpacing(<span class="keyword">const</span> <span class="keywordtype">double</span>* values); <a name="l00115"></a>00115 <a name="l00116"></a>00116 <a name="l00119"></a>00119 <a class="code" href="itkMacro_8h.html#7d989c13a1a213168db99ae0f84185d4">itkGetConstReferenceMacro</a>(Spacing,SpacingType); <a name="l00120"></a>00120 <a name="l00123"></a>00123 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>(Origin,PointType); <a name="l00124"></a>00124 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetOrigin(<span class="keyword">const</span> <span class="keywordtype">double</span>* values); <a name="l00126"></a>00126 <a name="l00128"></a>00128 <a class="code" href="itkMacro_8h.html#7d989c13a1a213168db99ae0f84185d4">itkGetConstReferenceMacro</a>(Origin,PointType); <a name="l00129"></a>00129 <a name="l00131"></a>00131 <a class="code" href="itkMacro_8h.html#1600305bb01e39e87c472d8bf29bd1cf">itkGetMacro</a>(<a class="code" href="classitk_1_1Size.html" title="Represent the size (bounds) of a n-dimensional image.">Size</a>,HistogramSizeType); <a name="l00132"></a>00132 <a name="l00133"></a>00133 <a name="l00140"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#585ceea5515c3186157e566a5e64032b">00140</a> <span class="keywordtype">void</span> SetFunctor(<span class="keyword">const</span> <a class="code" href="classitk_1_1Function_1_1HistogramLogProbabilityFunction.html">FunctorType</a>& functor) <a name="l00141"></a>00141 { <a name="l00142"></a>00142 m_Functor = functor; <a name="l00143"></a>00143 this->Modified(); <a name="l00144"></a>00144 } <a name="l00145"></a>00145 <a name="l00150"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#a606502fc5fd2c30f55bb333c5391071">00150</a> <a class="code" href="classitk_1_1Function_1_1HistogramLogProbabilityFunction.html">FunctorType</a>& <a class="code" href="classitk_1_1HistogramToImageFilter.html#a606502fc5fd2c30f55bb333c5391071">GetFunctor</a>() { <span class="keywordflow">return</span> m_Functor; } <a name="l00151"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#3703c30d86ea667c3c1a4f656729b482">00151</a> <span class="keyword">const</span> <a class="code" href="classitk_1_1Function_1_1HistogramLogProbabilityFunction.html">FunctorType</a>& <a class="code" href="classitk_1_1HistogramToImageFilter.html#3703c30d86ea667c3c1a4f656729b482">GetFunctor</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_Functor; } <a name="l00153"></a>00153 <a name="l00154"></a>00154 <span class="keywordtype">void</span> SetTotalFrequency( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> n ); <a name="l00155"></a>00155 <a name="l00156"></a>00156 <a name="l00157"></a>00157 <a name="l00158"></a>00158 <span class="keyword">protected</span>: <a name="l00159"></a>00159 <a class="code" href="classitk_1_1HistogramToImageFilter.html" title="This class takes a histogram as an input and returns an image of type specified by...">HistogramToImageFilter</a>(); <a name="l00160"></a>00160 ~<a class="code" href="classitk_1_1HistogramToImageFilter.html" title="This class takes a histogram as an input and returns an image of type specified by...">HistogramToImageFilter</a>(); <a name="l00161"></a>00161 <a name="l00162"></a>00162 <span class="keyword">virtual</span> <span class="keywordtype">void</span> GenerateOutputInformation(); <a name="l00163"></a>00163 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#f75a5945cdd8315676941024a0b8c1e9">GenerateData</a>(); <a name="l00164"></a>00164 <a name="l00165"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#95e43139bd94a26a4318458619d1a5b2">00165</a> <a class="code" href="classitk_1_1Function_1_1HistogramLogProbabilityFunction.html">FunctorType</a> m_Functor; <a name="l00166"></a>00166 <a name="l00167"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#00389ae32ceaab49472301129115a315">00167</a> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#5bf82236e1e50e653de84c8ead448599">SizeType</a> m_Size; <a name="l00168"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#4d6cb08accc72d6d816b98d7bc7fbe29">00168</a> SpacingType m_Spacing; <a name="l00169"></a><a class="code" href="classitk_1_1HistogramToImageFilter.html#0183546c677328602f42d5c82905d795">00169</a> PointType m_Origin; <a name="l00170"></a>00170 <a name="l00171"></a>00171 <a name="l00172"></a>00172 <span class="keyword">virtual</span> <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) <span class="keyword">const</span>; <a name="l00173"></a>00173 <a name="l00174"></a>00174 <span class="keyword">private</span>: <a name="l00175"></a>00175 <a class="code" href="classitk_1_1HistogramToImageFilter.html" title="This class takes a histogram as an input and returns an image of type specified by...">HistogramToImageFilter</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes.">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00176"></a>00176 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes.">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00177"></a>00177 <a name="l00178"></a>00178 <a name="l00179"></a>00179 }; <a name="l00180"></a>00180 <a name="l00181"></a>00181 } <span class="comment">// end namespace itk</span> <a name="l00182"></a>00182 <a name="l00183"></a>00183 <span class="preprocessor">#ifndef ITK_MANUAL_INSTANTIATION</span> <a name="l00184"></a>00184 <span class="preprocessor"></span><span class="preprocessor">#include "itkHistogramToImageFilter.txx"</span> <a name="l00185"></a>00185 <span class="preprocessor">#endif</span> <a name="l00186"></a>00186 <span class="preprocessor"></span> <a name="l00187"></a>00187 <span class="preprocessor">#endif</span> <a name="l00188"></a>00188 <span class="preprocessor"></span> </pre></div></div> <hr><address><small> Generated at Thu May 7 22:58:19 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>