<!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/vtkVolumeTextureMapper3D.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/vtkVolumeTextureMapper3D.h</h1><a href="a03648.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: vtkVolumeTextureMapper3D.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="l00072"></a>00072 <span class="preprocessor">#ifndef __vtkVolumeTextureMapper3D_h</span> <a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#define __vtkVolumeTextureMapper3D_h</span> <a name="l00074"></a>00074 <span class="preprocessor"></span> <a name="l00075"></a>00075 <span class="preprocessor">#include "<a class="code" href="a03637.html">vtkVolumeMapper.h</a>"</span> <a name="l00076"></a>00076 <a name="l00077"></a>00077 <span class="keyword">class </span><a class="code" href="a00751.html" title="topologically and geometrically regular array of data">vtkImageData</a>; <a name="l00078"></a>00078 <span class="keyword">class </span><a class="code" href="a00290.html" title="Defines a transfer function for mapping a property to an RGB color value.">vtkColorTransferFunction</a>; <a name="l00079"></a>00079 <span class="keyword">class </span><a class="code" href="a01215.html" title="Defines a 1D piecewise function.">vtkPiecewiseFunction</a>; <a name="l00080"></a>00080 <span class="keyword">class </span><a class="code" href="a01844.html" title="represents the common properties for rendering a volume.">vtkVolumeProperty</a>; <a name="l00081"></a>00081 <a name="l00082"></a><a class="code" href="a01857.html">00082</a> <span class="keyword">class </span><a class="code" href="a02170.html#4c512a1c00e5052ca1bbef09929dba95">VTK_VOLUMERENDERING_EXPORT</a> <a class="code" href="a01857.html" title="volume render with 3D texture mapping">vtkVolumeTextureMapper3D</a> : <span class="keyword">public</span> <a class="code" href="a01842.html" title="Abstract class for a volume mapper.">vtkVolumeMapper</a> <a name="l00083"></a>00083 { <a name="l00084"></a>00084 <span class="keyword">public</span>: <a name="l00085"></a><a class="code" href="a01857.html#247d7c4738b2db89ad5324c2025a7070">00085</a> vtkTypeRevisionMacro(<a class="code" href="a01857.html" title="volume render with 3D texture mapping">vtkVolumeTextureMapper3D</a>,<a class="code" href="a01842.html" title="Abstract class for a volume mapper.">vtkVolumeMapper</a>); <a name="l00086"></a>00086 <span class="keywordtype">void</span> <a class="code" href="a01842.html#c10b8ff05d59e192b9c4152cf80b2089">PrintSelf</a>(ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00087"></a>00087 <a name="l00088"></a>00088 <span class="keyword">static</span> <a class="code" href="a01857.html" title="volume render with 3D texture mapping">vtkVolumeTextureMapper3D</a> *<a class="code" href="a00101.html#06d80d8d4aa1a4856135fa003845be82">New</a>(); <a name="l00089"></a>00089 <a name="l00091"></a>00091 <a name="l00094"></a>00094 vtkSetMacro( SampleDistance, <span class="keywordtype">float</span> ); <a name="l00095"></a>00095 vtkGetMacro( SampleDistance, <span class="keywordtype">float</span> ); <a name="l00097"></a>00097 <a name="l00099"></a>00099 <a name="l00100"></a>00100 vtkGetVectorMacro( VolumeDimensions, <span class="keywordtype">int</span>, 3 ); <a name="l00102"></a>00102 <a name="l00104"></a>00104 <a name="l00105"></a>00105 vtkGetVectorMacro( VolumeSpacing, <span class="keywordtype">float</span>, 3 ); <a name="l00107"></a>00107 <a name="l00112"></a><a class="code" href="a01857.html#8a598b9beb85a31df496719fd3bd729c">00112</a> <span class="keyword">virtual</span> <span class="keywordtype">int</span> IsRenderSupported( <a class="code" href="a01844.html" title="represents the common properties for rendering a volume.">vtkVolumeProperty</a> * ) {<span class="keywordflow">return</span> 0;}; <a name="l00113"></a>00113 <a name="l00115"></a>00115 <a name="l00116"></a>00116 vtkGetMacro( NumberOfPolygons, <span class="keywordtype">int</span> ); <a name="l00118"></a>00118 <a name="l00120"></a>00120 <a name="l00121"></a>00121 vtkGetMacro( ActualSampleDistance, <span class="keywordtype">float</span> ); <a name="l00123"></a>00123 <a name="l00124"></a>00124 <span class="comment">//BTX</span> <a name="l00125"></a>00125 <a name="l00128"></a><a class="code" href="a01857.html#315c771d8390bc0e198d8318f2a67f51">00128</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01842.html#a99c9410f41a2e78d89ad503d9b955eb">Render</a>(<a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a> *, <a class="code" href="a01839.html" title="represents a volume (data &amp; properties) in a rendered scene">vtkVolume</a> *) {}; <a name="l00129"></a>00129 <a name="l00131"></a>00131 <a name="l00132"></a>00132 <span class="keyword">enum</span> <a name="l00133"></a>00133 { <a name="l00134"></a><a class="code" href="a01857.html#96e491dcedf44c6aaeb68fe6d3ab575e9ee130d0cee8010ce5d68854e27edd06">00134</a> FRAGMENT_PROGRAM_METHOD=0, <a name="l00135"></a><a class="code" href="a01857.html#96e491dcedf44c6aaeb68fe6d3ab575e8b4102863b9a2dd4b4391cb772be432f">00135</a> NVIDIA_METHOD=1, <a name="l00136"></a><a class="code" href="a01857.html#96e491dcedf44c6aaeb68fe6d3ab575ef88e02b491e385e972c3c2557581a3d4">00136</a> ATI_METHOD=2, <a name="l00137"></a><a class="code" href="a01857.html#96e491dcedf44c6aaeb68fe6d3ab575e4132dd83988340a081c07bb97f8f18fd">00137</a> NO_METHOD=3 <a name="l00138"></a>00138 }; <a name="l00140"></a>00140 <span class="comment">//ETX</span> <a name="l00141"></a>00141 <a name="l00143"></a>00143 <a name="l00145"></a>00145 vtkSetClampMacro( PreferredRenderMethod, <span class="keywordtype">int</span>, <a name="l00146"></a>00146 <a class="code" href="a01857.html#96e491dcedf44c6aaeb68fe6d3ab575e9ee130d0cee8010ce5d68854e27edd06">vtkVolumeTextureMapper3D::FRAGMENT_PROGRAM_METHOD</a>, <a name="l00147"></a>00147 <a class="code" href="a01857.html#96e491dcedf44c6aaeb68fe6d3ab575e8b4102863b9a2dd4b4391cb772be432f">vtkVolumeTextureMapper3D::NVIDIA_METHOD</a> ); <a name="l00148"></a><a class="code" href="a01857.html#a74c1691fd2bfbe44a5b67c69e7ecfd5">00148</a> <span class="keywordtype">void</span> SetPreferredMethodToFragmentProgram() <a name="l00149"></a>00149 { this->SetPreferredRenderMethod( <a class="code" href="a01857.html#96e491dcedf44c6aaeb68fe6d3ab575e9ee130d0cee8010ce5d68854e27edd06">vtkVolumeTextureMapper3D::FRAGMENT_PROGRAM_METHOD</a> ); } <a name="l00150"></a><a class="code" href="a01857.html#92e88b1130df51508d856bda70f3797d">00150</a> <span class="keywordtype">void</span> SetPreferredMethodToNVidia() <a name="l00151"></a>00151 { this->SetPreferredRenderMethod( <a class="code" href="a01857.html#96e491dcedf44c6aaeb68fe6d3ab575e8b4102863b9a2dd4b4391cb772be432f">vtkVolumeTextureMapper3D::NVIDIA_METHOD</a> ); } <a name="l00152"></a>00152 vtkGetMacro(PreferredRenderMethod, <span class="keywordtype">int</span>); <a name="l00154"></a>00154 <a name="l00155"></a>00155 <a name="l00156"></a>00156 <span class="keyword">protected</span>: <a name="l00157"></a>00157 <a class="code" href="a01857.html" title="volume render with 3D texture mapping">vtkVolumeTextureMapper3D</a>(); <a name="l00158"></a>00158 ~<a class="code" href="a01857.html" title="volume render with 3D texture mapping">vtkVolumeTextureMapper3D</a>(); <a name="l00159"></a>00159 <a name="l00160"></a><a class="code" href="a01857.html#f675e69a56934a8e8dca2868e2edbd1f">00160</a> <span class="keywordtype">float</span> *PolygonBuffer; <a name="l00161"></a><a class="code" href="a01857.html#cf90ebe03f7fc479e407b4ade4a4f0b6">00161</a> <span class="keywordtype">float</span> *IntersectionBuffer; <a name="l00162"></a><a class="code" href="a01857.html#bc7449a0e769f5c6bc005c075e6d8795">00162</a> <span class="keywordtype">int</span> NumberOfPolygons; <a name="l00163"></a><a class="code" href="a01857.html#a33e0831f46db4a24291cffed928d7b7">00163</a> <span class="keywordtype">int</span> BufferSize; <a name="l00164"></a>00164 <a name="l00165"></a><a class="code" href="a01857.html#a57e5ccf7e44c74de5e2a67782283762">00165</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *Volume1; <a name="l00166"></a><a class="code" href="a01857.html#919019d03fb149b7764cc72b5f5dfcf1">00166</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *Volume2; <a name="l00167"></a><a class="code" href="a01857.html#39432f470c7637aa4b073acb401a873e">00167</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *Volume3; <a name="l00168"></a><a class="code" href="a01857.html#1eec6c4fe8bb021f2a672f69b3b349c5">00168</a> <span class="keywordtype">int</span> VolumeSize; <a name="l00169"></a><a class="code" href="a01857.html#664af9a06f097b3e5aeadf74d5d866a6">00169</a> <span class="keywordtype">int</span> VolumeComponents; <a name="l00170"></a><a class="code" href="a01857.html#be2e61171eb735ea53cc397528b07789">00170</a> <span class="keywordtype">int</span> VolumeDimensions[3]; <a name="l00171"></a><a class="code" href="a01857.html#dd70aa6fd263b7bdbb21aa7e552e8328">00171</a> <span class="keywordtype">float</span> VolumeSpacing[3]; <a name="l00172"></a>00172 <a name="l00173"></a><a class="code" href="a01857.html#c4e89dd7566fb711030b1a3e1aaf8b7d">00173</a> <span class="keywordtype">float</span> SampleDistance; <a name="l00174"></a><a class="code" href="a01857.html#b108a3c7b762ce766649d55877178e42">00174</a> <span class="keywordtype">float</span> ActualSampleDistance; <a name="l00175"></a>00175 <a name="l00176"></a><a class="code" href="a01857.html#2e5bcff9099b2a6f575ca96741307884">00176</a> <a class="code" href="a00751.html" title="topologically and geometrically regular array of data">vtkImageData</a> *SavedTextureInput; <a name="l00177"></a><a class="code" href="a01857.html#326c36920973a6ce23c633a4d8ffb135">00177</a> <a class="code" href="a00751.html" title="topologically and geometrically regular array of data">vtkImageData</a> *SavedParametersInput; <a name="l00178"></a>00178 <a name="l00179"></a><a class="code" href="a01857.html#87bad2010cd8ed0ef32551151ea59f49">00179</a> <a class="code" href="a00290.html" title="Defines a transfer function for mapping a property to an RGB color value.">vtkColorTransferFunction</a> *SavedRGBFunction; <a name="l00180"></a><a class="code" href="a01857.html#b6fa3922730975ff1dd941a13bb4a916">00180</a> <a class="code" href="a01215.html" title="Defines a 1D piecewise function.">vtkPiecewiseFunction</a> *SavedGrayFunction; <a name="l00181"></a><a class="code" href="a01857.html#bc6fc54f7f7c6c71e31957e57361f7e9">00181</a> <a class="code" href="a01215.html" title="Defines a 1D piecewise function.">vtkPiecewiseFunction</a> *SavedScalarOpacityFunction; <a name="l00182"></a><a class="code" href="a01857.html#b217def181d24b68886744960ab57560">00182</a> <a class="code" href="a01215.html" title="Defines a 1D piecewise function.">vtkPiecewiseFunction</a> *SavedGradientOpacityFunction; <a name="l00183"></a><a class="code" href="a01857.html#2e3c8e38425d99c406cc4b3da65af0ec">00183</a> <span class="keywordtype">int</span> SavedColorChannels; <a name="l00184"></a><a class="code" href="a01857.html#c5afc58526d0038701626f4562aa038d">00184</a> <span class="keywordtype">float</span> SavedSampleDistance; <a name="l00185"></a><a class="code" href="a01857.html#a4ab529127601c9dd95355ea849bf9de">00185</a> <span class="keywordtype">float</span> SavedScalarOpacityDistance; <a name="l00186"></a>00186 <a name="l00187"></a><a class="code" href="a01857.html#720f90abcdd857dca670ae28a22dbb69">00187</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> ColorLookup[65536*4]; <a name="l00188"></a><a class="code" href="a01857.html#6530a04ccddccbb47d0fa1a99daf2516">00188</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> AlphaLookup[65536]; <a name="l00189"></a><a class="code" href="a01857.html#5f27f02563cfd2ae99b674bc4372054b">00189</a> <span class="keywordtype">float</span> TempArray1[3*4096]; <a name="l00190"></a><a class="code" href="a01857.html#9dc4db99ab61cc3fdb71a2837fce0bce">00190</a> <span class="keywordtype">float</span> TempArray2[4096]; <a name="l00191"></a><a class="code" href="a01857.html#5eb80c681f4f52421004035940550b17">00191</a> <span class="keywordtype">int</span> ColorTableSize; <a name="l00192"></a><a class="code" href="a01857.html#e0ef2095f99ec97202fddd13a5b85f90">00192</a> <span class="keywordtype">float</span> ColorTableScale; <a name="l00193"></a><a class="code" href="a01857.html#fc4c003de0dde6b8912e97ec22b5e18d">00193</a> <span class="keywordtype">float</span> ColorTableOffset; <a name="l00194"></a>00194 <a name="l00195"></a><a class="code" href="a01857.html#a862aa566887e031fa23beedb6d15349">00195</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> DiffuseLookup[65536*4]; <a name="l00196"></a><a class="code" href="a01857.html#29fc6bea0ced4393bfed68fa52eab7d2">00196</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> SpecularLookup[65536*4]; <a name="l00197"></a>00197 <a name="l00198"></a><a class="code" href="a01857.html#4eea7bb9f567413647dffe401a0a8707">00198</a> <a class="code" href="a01719.html" title="record modification and/or execution time">vtkTimeStamp</a> SavedTextureMTime; <a name="l00199"></a><a class="code" href="a01857.html#e820af97542af97d5163db43a48c1232">00199</a> <a class="code" href="a01719.html" title="record modification and/or execution time">vtkTimeStamp</a> SavedParametersMTime; <a name="l00200"></a>00200 <a name="l00201"></a><a class="code" href="a01857.html#b04433fdd55d33dddac8e1efd7ba64b8">00201</a> <span class="keywordtype">int</span> RenderMethod; <a name="l00202"></a><a class="code" href="a01857.html#7ae7a37b1f49cdbb917ad0a6e950ce8f">00202</a> <span class="keywordtype">int</span> PreferredRenderMethod; <a name="l00203"></a>00203 <a name="l00205"></a>00205 <span class="keywordtype">void</span> ComputePolygons( <a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a> *ren, <a class="code" href="a01839.html" title="represents a volume (data &amp; properties) in a rendered scene">vtkVolume</a> *vol, <span class="keywordtype">double</span> bounds[6] ); <a name="l00206"></a>00206 <a name="l00208"></a>00208 <a name="l00210"></a>00210 <span class="keywordtype">int</span> UpdateVolumes( <a class="code" href="a01839.html" title="represents a volume (data &amp; properties) in a rendered scene">vtkVolume</a> * ); <a name="l00211"></a>00211 <span class="keywordtype">int</span> UpdateColorLookup( <a class="code" href="a01839.html" title="represents a volume (data &amp; properties) in a rendered scene">vtkVolume</a> * ); <a name="l00213"></a>00213 <a name="l00215"></a>00215 <a name="l00216"></a><a class="code" href="a01857.html#986192e7b0c1f77be442b9634225ef5a">00216</a> <span class="keyword">virtual</span> <span class="keywordtype">int</span> IsTextureSizeSupported( <span class="keywordtype">int</span> [3] ) {<span class="keywordflow">return</span> 0;}; <a name="l00217"></a>00217 <span class="comment">//ETX</span> <a name="l00219"></a>00219 <span class="comment"></span> <a name="l00220"></a>00220 <span class="keyword">private</span>: <a name="l00221"></a>00221 <a class="code" href="a01857.html" title="volume render with 3D texture mapping">vtkVolumeTextureMapper3D</a>(<span class="keyword">const</span> <a class="code" href="a01857.html" title="volume render with 3D texture mapping">vtkVolumeTextureMapper3D</a>&); <span class="comment">// Not implemented.</span> <a name="l00222"></a>00222 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01857.html" title="volume render with 3D texture mapping">vtkVolumeTextureMapper3D</a>&); <span class="comment">// Not implemented.</span> <a name="l00223"></a>00223 }; <a name="l00224"></a>00224 <a name="l00225"></a>00225 <a name="l00226"></a>00226 <span class="preprocessor">#endif</span> <a name="l00227"></a>00227 <span class="preprocessor"></span> <a name="l00228"></a>00228 <a name="l00229"></a>00229 <a name="l00230"></a>00230 <a name="l00231"></a>00231 <a name="l00232"></a>00232 </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:51 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>