<!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: itk::ProgressReporter Class Reference</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="namespaceitk.html">itk</a>::<a class="el" href="classitk_1_1ProgressReporter.html">ProgressReporter</a> </div> <div class="contents"> <h1>itk::ProgressReporter Class Reference</h1><!-- doxytag: class="itk::ProgressReporter" -->Implements progress tracking for a filter. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="itkProgressReporter_8h_source.html">itkProgressReporter.h</a>></code> <p> <div class="dynheader"> Collaboration diagram for itk::ProgressReporter:</div> <div class="dynsection"> <p><center><img src="classitk_1_1ProgressReporter__coll__graph.png" border="0" usemap="#itk_1_1ProgressReporter__coll__map" alt="Collaboration graph"></center> <map name="itk_1_1ProgressReporter__coll__map"> <area shape="rect" id="node2" href="classitk_1_1ProcessObject.html" title="ProcessObject is the base class for all process objects (source, filters, mappers)..." alt="" coords="564,293,711,323"><area shape="rect" id="node4" href="classitk_1_1Object.html" title="Base class for most itk classes." alt="" coords="375,197,471,227"><area shape="rect" id="node6" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes." alt="" coords="73,101,201,131"><area shape="rect" id="node8" href="classitk_1_1SimpleFastMutexLock.html" title="Critical section locking class that can be allocated on the stack." alt="" coords="5,5,200,35"><area shape="rect" id="node10" href="classitk_1_1MetaDataDictionary.html" title="itk::MetaDataDictionary" alt="" coords="293,101,480,131"><area shape="rect" id="node12" href="classitk_1_1MetaDataDictionary_1_1MetaDataDictionaryMapType.html" title="itk::MetaDataDictionary::MetaDataDictionaryMapType" alt="" coords="224,5,619,35"><area shape="rect" id="node14" href="classitk_1_1TimeStamp.html" title="Generate a unique, increasing time value." alt="" coords="551,101,676,131"><area shape="rect" id="node16" href="classitk_1_1SmartPointer.html" title="itk::SmartPointer\< Self \>" alt="" coords="852,197,1044,227"><area shape="rect" id="node18" href="classitk_1_1SmartPointer.html" title="Implements transparent reference counting." alt="" coords="821,101,1075,131"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="classitk_1_1ProgressReporter-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classitk_1_1ProgressReporter.html#0b4c2f9f35301af95e3e03cf552a0427">ProgressReporter</a> (<a class="el" href="classitk_1_1ProcessObject.html">ProcessObject</a> *filter, int threadId, unsigned long numberOfPixels, unsigned long numberOfUpdates=100, float initialProgress=0.0f, float progressWeight=1.0f)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classitk_1_1ProgressReporter.html#656e57289f260a27518c00151f64d9a7">~ProgressReporter</a> ()</td></tr> <tr><td colspan="2"><div class="groupHeader"></div></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitk_1_1ProgressReporter.html#c372ae52541f97c144563c57f092ae01">CompletedPixel</a> ()</td></tr> <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="classitk_1_1ProgressReporter.html#6e1ce0c944f3279765fe320554cad2fa">m_CurrentPixel</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classitk_1_1ProcessObject.html">ProcessObject</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classitk_1_1ProgressReporter.html#21f9ebd8a8c3ad0840fba81e5c32badf">m_Filter</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classitk_1_1ProgressReporter.html#706ab3bb2a75f3d7bf3512cc7dc8e9c8">m_InitialProgress</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classitk_1_1ProgressReporter.html#1938472727456a9bb09ba09e55f66aea">m_InverseNumberOfPixels</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="classitk_1_1ProgressReporter.html#a28f3aca3eae3815d872b7c4b95a8b57">m_PixelsBeforeUpdate</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="classitk_1_1ProgressReporter.html#b08c2073867bc91d7710c6839e5549e6">m_PixelsPerUpdate</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classitk_1_1ProgressReporter.html#e4b025f43fdf6b2a4f68205571e5a175">m_ProgressWeight</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitk_1_1ProgressReporter.html#375a10cb88f878208cc11403baead335">m_ThreadId</a></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Implements progress tracking for a filter. <p> This is a utility class for use by filter implementations in <a class="el" href="namespaceHardConnectedComponentImageFilter.html#f75a5945cdd8315676941024a0b8c1e9">GenerateData()</a> and ThreadedGenerateData().<p> The class constructor sets the progress to 0, and the destructor sets it to 1. In between, there should be one call to <a class="el" href="classitk_1_1ProgressReporter.html#c372ae52541f97c144563c57f092ae01">CompletedPixel()</a> per pixel. The reporter will automatically update the filter's progress at an interval resulting in the specified number of updates. The default number of updates is 100.<p> Example usage:<p> <div class="fragment"><pre class="fragment"> <a class="code" href="classitk_1_1ProgressReporter.html#0b4c2f9f35301af95e3e03cf552a0427">ProgressReporter</a> progress(<span class="keyword">this</span>, threadId, threadRegion.GetNumberOfPixels(), 100); <span class="keywordflow">for</span>( each pixel ) { ... progress.CompletedPixel(); } </pre></div><p> When used in a non-threaded filter, the threadId argument should be 0.<p> <dl class="see" compact><dt><b>See also:</b></dt><dd>This class is a tool for filter implementers to equip a filter to report on its progress. For information on how to acquire this progress information, see:<ul> <li>ProcessObject::ReportProgress()</li><li><a class="el" href="classitk_1_1Object.html#23703e82fa4a979fd512528f471606a0">Object::AddObserver()</a> </li></ul> </dd></dl> <p>Definition at line <a class="el" href="itkProgressReporter_8h_source.html#l00058">58</a> of file <a class="el" href="itkProgressReporter_8h_source.html">itkProgressReporter.h</a>.</p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="0b4c2f9f35301af95e3e03cf552a0427"></a><!-- doxytag: member="itk::ProgressReporter::ProgressReporter" ref="0b4c2f9f35301af95e3e03cf552a0427" args="(ProcessObject *filter, int threadId, unsigned long numberOfPixels, unsigned long numberOfUpdates=100, float initialProgress=0.0f, float progressWeight=1.0f)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">itk::ProgressReporter::ProgressReporter </td> <td>(</td> <td class="paramtype"><a class="el" href="classitk_1_1ProcessObject.html">ProcessObject</a> * </td> <td class="paramname"> <em>filter</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>threadId</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned long </td> <td class="paramname"> <em>numberOfPixels</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned long </td> <td class="paramname"> <em>numberOfUpdates</em> = <code>100</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>initialProgress</em> = <code>0.0f</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>progressWeight</em> = <code>1.0f</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Constructor sets progress to 0 because the filter is starting. </div> </div><p> <a class="anchor" name="656e57289f260a27518c00151f64d9a7"></a><!-- doxytag: member="itk::ProgressReporter::~ProgressReporter" ref="656e57289f260a27518c00151f64d9a7" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">itk::ProgressReporter::~ProgressReporter </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Destructor sets progress to 1 because the filter has finished. </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="c372ae52541f97c144563c57f092ae01"></a><!-- doxytag: member="itk::ProgressReporter::CompletedPixel" ref="c372ae52541f97c144563c57f092ae01" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void itk::ProgressReporter::CompletedPixel </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Called by a filter once per pixel. <p>Definition at line <a class="el" href="itkProgressReporter_8h_source.html#l00072">72</a> of file <a class="el" href="itkProgressReporter_8h_source.html">itkProgressReporter.h</a>.</p> <p>Referenced by <a class="el" href="itkBoxUtilities_8h_source.html#l00086">itk::BoxAccumulateFunction()</a>, <a class="el" href="itkBoxUtilities_8h_source.html#l00189">itk::BoxMeanCalculatorFunction()</a>, <a class="el" href="itkBoxUtilities_8h_source.html#l00370">itk::BoxSigmaCalculatorFunction()</a>, and <a class="el" href="itkBoxUtilities_8h_source.html#l00559">itk::BoxSquareAccumulateFunction()</a>.</p> </div> </div><p> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="6e1ce0c944f3279765fe320554cad2fa"></a><!-- doxytag: member="itk::ProgressReporter::m_CurrentPixel" ref="6e1ce0c944f3279765fe320554cad2fa" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">unsigned long <a class="el" href="classitk_1_1ProgressReporter.html#6e1ce0c944f3279765fe320554cad2fa">itk::ProgressReporter::m_CurrentPixel</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="itkProgressReporter_8h_source.html#l00102">102</a> of file <a class="el" href="itkProgressReporter_8h_source.html">itkProgressReporter.h</a>.</p> </div> </div><p> <a class="anchor" name="21f9ebd8a8c3ad0840fba81e5c32badf"></a><!-- doxytag: member="itk::ProgressReporter::m_Filter" ref="21f9ebd8a8c3ad0840fba81e5c32badf" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classitk_1_1ProcessObject.html">ProcessObject</a>* <a class="el" href="classitk_1_1ProgressReporter.html#21f9ebd8a8c3ad0840fba81e5c32badf">itk::ProgressReporter::m_Filter</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="itkProgressReporter_8h_source.html#l00099">99</a> of file <a class="el" href="itkProgressReporter_8h_source.html">itkProgressReporter.h</a>.</p> </div> </div><p> <a class="anchor" name="706ab3bb2a75f3d7bf3512cc7dc8e9c8"></a><!-- doxytag: member="itk::ProgressReporter::m_InitialProgress" ref="706ab3bb2a75f3d7bf3512cc7dc8e9c8" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float <a class="el" href="classitk_1_1ProgressReporter.html#706ab3bb2a75f3d7bf3512cc7dc8e9c8">itk::ProgressReporter::m_InitialProgress</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="itkProgressReporter_8h_source.html#l00105">105</a> of file <a class="el" href="itkProgressReporter_8h_source.html">itkProgressReporter.h</a>.</p> </div> </div><p> <a class="anchor" name="1938472727456a9bb09ba09e55f66aea"></a><!-- doxytag: member="itk::ProgressReporter::m_InverseNumberOfPixels" ref="1938472727456a9bb09ba09e55f66aea" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float <a class="el" href="classitk_1_1ProgressReporter.html#1938472727456a9bb09ba09e55f66aea">itk::ProgressReporter::m_InverseNumberOfPixels</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="itkProgressReporter_8h_source.html#l00101">101</a> of file <a class="el" href="itkProgressReporter_8h_source.html">itkProgressReporter.h</a>.</p> </div> </div><p> <a class="anchor" name="a28f3aca3eae3815d872b7c4b95a8b57"></a><!-- doxytag: member="itk::ProgressReporter::m_PixelsBeforeUpdate" ref="a28f3aca3eae3815d872b7c4b95a8b57" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">unsigned long <a class="el" href="classitk_1_1ProgressReporter.html#a28f3aca3eae3815d872b7c4b95a8b57">itk::ProgressReporter::m_PixelsBeforeUpdate</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="itkProgressReporter_8h_source.html#l00104">104</a> of file <a class="el" href="itkProgressReporter_8h_source.html">itkProgressReporter.h</a>.</p> </div> </div><p> <a class="anchor" name="b08c2073867bc91d7710c6839e5549e6"></a><!-- doxytag: member="itk::ProgressReporter::m_PixelsPerUpdate" ref="b08c2073867bc91d7710c6839e5549e6" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">unsigned long <a class="el" href="classitk_1_1ProgressReporter.html#b08c2073867bc91d7710c6839e5549e6">itk::ProgressReporter::m_PixelsPerUpdate</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="itkProgressReporter_8h_source.html#l00103">103</a> of file <a class="el" href="itkProgressReporter_8h_source.html">itkProgressReporter.h</a>.</p> </div> </div><p> <a class="anchor" name="e4b025f43fdf6b2a4f68205571e5a175"></a><!-- doxytag: member="itk::ProgressReporter::m_ProgressWeight" ref="e4b025f43fdf6b2a4f68205571e5a175" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float <a class="el" href="classitk_1_1ProgressReporter.html#e4b025f43fdf6b2a4f68205571e5a175">itk::ProgressReporter::m_ProgressWeight</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="itkProgressReporter_8h_source.html#l00106">106</a> of file <a class="el" href="itkProgressReporter_8h_source.html">itkProgressReporter.h</a>.</p> </div> </div><p> <a class="anchor" name="375a10cb88f878208cc11403baead335"></a><!-- doxytag: member="itk::ProgressReporter::m_ThreadId" ref="375a10cb88f878208cc11403baead335" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int <a class="el" href="classitk_1_1ProgressReporter.html#375a10cb88f878208cc11403baead335">itk::ProgressReporter::m_ThreadId</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="itkProgressReporter_8h_source.html#l00100">100</a> of file <a class="el" href="itkProgressReporter_8h_source.html">itkProgressReporter.h</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="itkProgressReporter_8h_source.html">itkProgressReporter.h</a></ul> </div> <hr><address><small> Generated at Fri May 8 06:13:38 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>