<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>VTK: dox/VolumeRendering/vtkEncodedGradientEstimator.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <h1>dox/VolumeRendering/vtkEncodedGradientEstimator.h</h1><a href="a03601.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: Visualization Toolkit</span> <a name="l00004"></a>00004 <span class="comment"> Module: $RCSfile: vtkEncodedGradientEstimator.h,v $</span> <a name="l00005"></a>00005 <span class="comment"></span> <a name="l00006"></a>00006 <span class="comment"> Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen</span> <a name="l00007"></a>00007 <span class="comment"> All rights reserved.</span> <a name="l00008"></a>00008 <span class="comment"> See Copyright.txt or http://www.kitware.com/Copyright.htm for details.</span> <a name="l00009"></a>00009 <span class="comment"></span> <a name="l00010"></a>00010 <span class="comment"> This software is distributed WITHOUT ANY WARRANTY; without even</span> <a name="l00011"></a>00011 <span class="comment"> the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR</span> <a name="l00012"></a>00012 <span class="comment"> PURPOSE. See the above copyright notice for more information.</span> <a name="l00013"></a>00013 <span class="comment"></span> <a name="l00014"></a>00014 <span class="comment">=========================================================================*/</span> <a name="l00015"></a>00015 <a name="l00033"></a>00033 <span class="preprocessor">#ifndef __vtkEncodedGradientEstimator_h</span> <a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define __vtkEncodedGradientEstimator_h</span> <a name="l00035"></a>00035 <span class="preprocessor"></span> <a name="l00036"></a>00036 <span class="preprocessor">#include "<a class="code" href="a02079.html">vtkObject.h</a>"</span> <a name="l00037"></a>00037 <a name="l00038"></a>00038 <span class="keyword">class </span><a class="code" href="a00751.html" title="topologically and geometrically regular array of data">vtkImageData</a>; <a name="l00039"></a>00039 <span class="keyword">class </span><a class="code" href="a00423.html" title="encode a direction into a one or two byte value">vtkDirectionEncoder</a>; <a name="l00040"></a>00040 <span class="keyword">class </span><a class="code" href="a01064.html" title="A class for performing multithreaded execution.">vtkMultiThreader</a>; <a name="l00041"></a>00041 <a name="l00042"></a><a class="code" href="a00459.html">00042</a> <span class="keyword">class </span><a class="code" href="a02170.html#4c512a1c00e5052ca1bbef09929dba95">VTK_VOLUMERENDERING_EXPORT</a> <a class="code" href="a00459.html" title="Superclass for gradient estimation.">vtkEncodedGradientEstimator</a> : <span class="keyword">public</span> <a class="code" href="a01084.html" title="abstract base class for most VTK objects">vtkObject</a> <a name="l00043"></a>00043 { <a name="l00044"></a>00044 <span class="keyword">public</span>: <a name="l00045"></a><a class="code" href="a00459.html#9ebe4dc2c7fa32be5ab89317648d370e">00045</a> vtkTypeRevisionMacro(<a class="code" href="a00459.html" title="Superclass for gradient estimation.">vtkEncodedGradientEstimator</a>,<a class="code" href="a01084.html" title="abstract base class for most VTK objects">vtkObject</a>); <a name="l00046"></a>00046 <span class="keywordtype">void</span> <a class="code" href="a01084.html#bf3dbb4154289b56a12483eee3866263">PrintSelf</a>( ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent ); <a name="l00047"></a>00047 <a name="l00049"></a>00049 <a name="l00050"></a>00050 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetInput(<a class="code" href="a00751.html" title="topologically and geometrically regular array of data">vtkImageData</a>*); <a name="l00051"></a>00051 vtkGetObjectMacro( Input, <a class="code" href="a00751.html" title="topologically and geometrically regular array of data">vtkImageData</a> ); <a name="l00053"></a>00053 <a name="l00055"></a>00055 <a name="l00056"></a>00056 vtkSetMacro( GradientMagnitudeScale, <span class="keywordtype">float</span> ); <a name="l00057"></a>00057 vtkGetMacro( GradientMagnitudeScale, <span class="keywordtype">float</span> ); <a name="l00058"></a>00058 vtkSetMacro( GradientMagnitudeBias, <span class="keywordtype">float</span> ); <a name="l00059"></a>00059 vtkGetMacro( GradientMagnitudeBias, <span class="keywordtype">float</span> ); <a name="l00061"></a>00061 <a name="l00063"></a>00063 <a name="l00065"></a>00065 vtkSetClampMacro( BoundsClip, <span class="keywordtype">int</span>, 0, 1 ); <a name="l00066"></a>00066 vtkGetMacro( BoundsClip, <span class="keywordtype">int</span> ); <a name="l00067"></a>00067 vtkBooleanMacro( BoundsClip, <span class="keywordtype">int</span> ); <a name="l00069"></a>00069 <a name="l00071"></a>00071 <a name="l00074"></a>00074 vtkSetVector6Macro( Bounds, <span class="keywordtype">int</span> ); <a name="l00075"></a>00075 vtkGetVectorMacro( Bounds, <span class="keywordtype">int</span>, 6 ); <a name="l00077"></a>00077 <a name="l00079"></a>00079 <span class="keywordtype">void</span> Update( <span class="keywordtype">void</span> ); <a name="l00080"></a>00080 <a name="l00082"></a>00082 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> *GetEncodedNormals( <span class="keywordtype">void</span> ); <a name="l00083"></a>00083 <a name="l00085"></a>00085 <a name="l00086"></a>00086 <span class="keywordtype">int</span> GetEncodedNormalIndex( <span class="keywordtype">int</span> xyz_index ); <a name="l00087"></a>00087 <span class="keywordtype">int</span> GetEncodedNormalIndex( <span class="keywordtype">int</span> x_index, <span class="keywordtype">int</span> y_index, <span class="keywordtype">int</span> z_index ); <a name="l00089"></a>00089 <a name="l00091"></a>00091 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *GetGradientMagnitudes(<span class="keywordtype">void</span>); <a name="l00092"></a>00092 <a name="l00094"></a>00094 <a name="l00096"></a>00096 vtkSetClampMacro( NumberOfThreads, <span class="keywordtype">int</span>, 1, <a class="code" href="a02139.html#804fbb60e0f29e0e0a3d5706c85ef921">VTK_MAX_THREADS</a> ); <a name="l00097"></a>00097 vtkGetMacro( NumberOfThreads, <span class="keywordtype">int</span> ); <a name="l00099"></a>00099 <a name="l00101"></a>00101 <a name="l00103"></a>00103 <span class="keywordtype">void</span> SetDirectionEncoder( <a class="code" href="a00423.html" title="encode a direction into a one or two byte value">vtkDirectionEncoder</a> *direnc ); <a name="l00104"></a>00104 vtkGetObjectMacro( DirectionEncoder, <a class="code" href="a00423.html" title="encode a direction into a one or two byte value">vtkDirectionEncoder</a> ); <a name="l00106"></a>00106 <a name="l00108"></a>00108 <a name="l00112"></a>00112 vtkSetMacro( ComputeGradientMagnitudes, <span class="keywordtype">int</span> ); <a name="l00113"></a>00113 vtkGetMacro( ComputeGradientMagnitudes, <span class="keywordtype">int</span> ); <a name="l00114"></a>00114 vtkBooleanMacro( ComputeGradientMagnitudes, <span class="keywordtype">int</span> ); <a name="l00116"></a>00116 <a name="l00118"></a>00118 <a name="l00122"></a>00122 vtkSetMacro( CylinderClip, <span class="keywordtype">int</span> ); <a name="l00123"></a>00123 vtkGetMacro( CylinderClip, <span class="keywordtype">int</span> ); <a name="l00124"></a>00124 vtkBooleanMacro( CylinderClip, <span class="keywordtype">int</span> ); <a name="l00126"></a>00126 <a name="l00128"></a>00128 <a name="l00129"></a>00129 vtkGetMacro( LastUpdateTimeInSeconds, <span class="keywordtype">float</span> ); <a name="l00130"></a>00130 vtkGetMacro( LastUpdateTimeInCPUSeconds, <span class="keywordtype">float</span> ); <a name="l00132"></a>00132 <a name="l00133"></a>00133 vtkGetMacro( UseCylinderClip, <span class="keywordtype">int</span> ); <a name="l00134"></a><a class="code" href="a00459.html#98d76d44a233be5cdacae62b93d491ec">00134</a> <span class="keywordtype">int</span> *GetCircleLimits() { <span class="keywordflow">return</span> this->CircleLimits; }; <a name="l00135"></a>00135 <a name="l00137"></a>00137 <a name="l00143"></a>00143 <span class="keywordtype">void</span> SetZeroNormalThreshold( <span class="keywordtype">float</span> v ); <a name="l00144"></a>00144 vtkGetMacro( ZeroNormalThreshold, <span class="keywordtype">float</span> ); <a name="l00146"></a>00146 <a name="l00148"></a>00148 <a name="l00150"></a>00150 vtkSetClampMacro( ZeroPad, <span class="keywordtype">int</span>, 0, 1 ); <a name="l00151"></a>00151 vtkGetMacro( ZeroPad, <span class="keywordtype">int</span> ); <a name="l00152"></a><a class="code" href="a00459.html#fa3748d862e8aed393d4a0595a01c0c7">00152</a> vtkBooleanMacro( ZeroPad, <span class="keywordtype">int</span> ); <a name="l00154"></a>00154 <a name="l00155"></a>00155 <a name="l00156"></a>00156 <span class="comment">// These variables should be protected but are being</span> <a name="l00157"></a>00157 <span class="comment">// made public to be accessible to the templated function.</span> <a name="l00158"></a>00158 <span class="comment">// We used to have the templated function as a friend, but</span> <a name="l00159"></a>00159 <span class="comment">// this does not work with all compilers</span> <a name="l00160"></a>00160 <a name="l00161"></a>00161 <span class="comment">// The input scalar data on which the normals are computed</span> <a name="l00162"></a>00162 <a class="code" href="a00751.html" title="topologically and geometrically regular array of data">vtkImageData</a> *Input; <a name="l00163"></a>00163 <a name="l00164"></a>00164 <span class="comment">// The encoded normals (2 bytes) and the size of the encoded normals</span> <a name="l00165"></a><a class="code" href="a00459.html#ec2eb812c6725bc8630e9f976df276d3">00165</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> *EncodedNormals; <a name="l00166"></a><a class="code" href="a00459.html#b6d61bf1792fd938f7680589d7e45ea9">00166</a> <span class="keywordtype">int</span> EncodedNormalsSize[3]; <a name="l00167"></a>00167 <a name="l00168"></a>00168 <span class="comment">// The magnitude of the gradient array and the size of this array</span> <a name="l00169"></a><a class="code" href="a00459.html#b4bc416869f53f6dceed5b9526ca3472">00169</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *GradientMagnitudes; <a name="l00170"></a>00170 <a name="l00171"></a>00171 <span class="comment">// The time at which the normals were last built</span> <a name="l00172"></a><a class="code" href="a00459.html#9e4f1da4c774e8c79ca0b0ff48c21cdd">00172</a> <a class="code" href="a01719.html" title="record modification and/or execution time">vtkTimeStamp</a> BuildTime; <a name="l00173"></a>00173 <a name="l00174"></a>00174 <span class="comment">//BTX</span> <a name="l00175"></a>00175 vtkGetVectorMacro( InputSize, <span class="keywordtype">int</span>, 3 ); <a name="l00176"></a>00176 vtkGetVectorMacro( InputAspect, <span class="keywordtype">float</span>, 3 ); <a name="l00177"></a>00177 <span class="comment">//ETX</span> <a name="l00178"></a>00178 <a name="l00179"></a>00179 <span class="keyword">protected</span>: <a name="l00180"></a>00180 <a class="code" href="a00459.html" title="Superclass for gradient estimation.">vtkEncodedGradientEstimator</a>(); <a name="l00181"></a>00181 ~<a class="code" href="a00459.html" title="Superclass for gradient estimation.">vtkEncodedGradientEstimator</a>(); <a name="l00182"></a>00182 <a name="l00183"></a>00183 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01085.html#c6aa962bedb220056f91add33044f24e">ReportReferences</a>(<a class="code" href="a00572.html" title="Detect and break reference loops.">vtkGarbageCollector</a>*); <a name="l00184"></a>00184 <a name="l00185"></a>00185 <span class="comment">// The number of threads to use when encoding normals</span> <a name="l00186"></a><a class="code" href="a00459.html#8c8338a5be88658d53c6c9c2a8040ff6">00186</a> <span class="keywordtype">int</span> NumberOfThreads; <a name="l00187"></a>00187 <a name="l00188"></a><a class="code" href="a00459.html#c576fa2e76d1cde46fce707802d2c593">00188</a> <a class="code" href="a01064.html" title="A class for performing multithreaded execution.">vtkMultiThreader</a> *Threader; <a name="l00189"></a>00189 <a name="l00190"></a><a class="code" href="a00459.html#6c5fe09a3bd1fe83d5b32137d3905836">00190</a> <a class="code" href="a00423.html" title="encode a direction into a one or two byte value">vtkDirectionEncoder</a> *DirectionEncoder; <a name="l00191"></a>00191 <a name="l00192"></a>00192 <span class="keyword">virtual</span> <span class="keywordtype">void</span> UpdateNormals( <span class="keywordtype">void</span> ) = 0; <a name="l00193"></a>00193 <a name="l00194"></a><a class="code" href="a00459.html#d515ca461e481550653fc40280e36e4e">00194</a> <span class="keywordtype">float</span> GradientMagnitudeScale; <a name="l00195"></a><a class="code" href="a00459.html#808d6e8d769fa348e377ece3cdd11428">00195</a> <span class="keywordtype">float</span> GradientMagnitudeBias; <a name="l00196"></a>00196 <a name="l00197"></a><a class="code" href="a00459.html#c85136dd35ba02aca110443de47233f2">00197</a> <span class="keywordtype">float</span> LastUpdateTimeInSeconds; <a name="l00198"></a><a class="code" href="a00459.html#54788e809d8f6fb1c3e67ffd2bc8d368">00198</a> <span class="keywordtype">float</span> LastUpdateTimeInCPUSeconds; <a name="l00199"></a>00199 <a name="l00200"></a><a class="code" href="a00459.html#0710fb610dcbe717183d120851e28bc2">00200</a> <span class="keywordtype">float</span> ZeroNormalThreshold; <a name="l00201"></a>00201 <a name="l00202"></a><a class="code" href="a00459.html#e913685860303c4991fac6e9a4d2d45b">00202</a> <span class="keywordtype">int</span> CylinderClip; <a name="l00203"></a><a class="code" href="a00459.html#d2b1d5f7db717d72df098c8ce06a0ead">00203</a> <span class="keywordtype">int</span> *CircleLimits; <a name="l00204"></a><a class="code" href="a00459.html#3ad67708dd9001a3e9cb27e30ef36a89">00204</a> <span class="keywordtype">int</span> CircleLimitsSize; <a name="l00205"></a><a class="code" href="a00459.html#90fa0182e20ecf58fe622ab50dfcfa98">00205</a> <span class="keywordtype">int</span> UseCylinderClip; <a name="l00206"></a>00206 <span class="keywordtype">void</span> ComputeCircleLimits( <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210e3d5e7c015dff08d8daf72a0102e1444">size</a> ); <a name="l00207"></a>00207 <a name="l00208"></a><a class="code" href="a00459.html#423a94c3df3a42d5a6f55530ed114f10">00208</a> <span class="keywordtype">int</span> BoundsClip; <a name="l00209"></a><a class="code" href="a00459.html#b0037f47ddd1961900d5c8d88c42f25c">00209</a> <span class="keywordtype">int</span> Bounds[6]; <a name="l00210"></a>00210 <a name="l00211"></a><a class="code" href="a00459.html#6a5371f6673b900e5a80581e53d19682">00211</a> <span class="keywordtype">int</span> InputSize[3]; <a name="l00212"></a><a class="code" href="a00459.html#790918edf25a5e8f5b6c4185582ab8e8">00212</a> <span class="keywordtype">float</span> InputAspect[3]; <a name="l00213"></a>00213 <a name="l00214"></a><a class="code" href="a00459.html#44d15a7dc1d1fb39b1efa768097fcfde">00214</a> <span class="keywordtype">int</span> ComputeGradientMagnitudes; <a name="l00215"></a>00215 <a name="l00216"></a><a class="code" href="a00459.html#df69405e73a23e06c77004b37457ff48">00216</a> <span class="keywordtype">int</span> ZeroPad; <a name="l00217"></a>00217 <a name="l00218"></a>00218 <span class="keyword">private</span>: <a name="l00219"></a>00219 <a class="code" href="a00459.html" title="Superclass for gradient estimation.">vtkEncodedGradientEstimator</a>(<span class="keyword">const</span> <a class="code" href="a00459.html" title="Superclass for gradient estimation.">vtkEncodedGradientEstimator</a>&); <span class="comment">// Not implemented.</span> <a name="l00220"></a>00220 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00459.html" title="Superclass for gradient estimation.">vtkEncodedGradientEstimator</a>&); <span class="comment">// Not implemented.</span> <a name="l00221"></a>00221 }; <a name="l00222"></a>00222 <a name="l00223"></a>00223 <a name="l00224"></a>00224 <span class="preprocessor">#endif</span> <a name="l00225"></a>00225 <span class="preprocessor"></span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:50 2009 for VTK by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>