<!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/Rendering/vtkScalarsToColorsPainter.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/Rendering/vtkScalarsToColorsPainter.h</h1><a href="a03542.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: vtkScalarsToColorsPainter.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="l00027"></a>00027 <span class="preprocessor">#ifndef __vtkScalarsToColorsPainter_h</span> <a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define __vtkScalarsToColorsPainter_h</span> <a name="l00029"></a>00029 <span class="preprocessor"></span> <a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="a03507.html">vtkPainter.h</a>"</span> <a name="l00031"></a>00031 <span class="preprocessor">#include "<a class="code" href="a02127.html">vtkSmartPointer.h</a>"</span> <span class="comment">// needed for vtkSmartPointer.</span> <a name="l00032"></a>00032 <span class="keyword">class </span><a class="code" href="a00356.html" title="abstract superclass for arrays of numeric data">vtkDataArray</a>; <a name="l00033"></a>00033 <span class="keyword">class </span><a class="code" href="a00751.html" title="topologically and geometrically regular array of data">vtkImageData</a>; <a name="l00034"></a>00034 <span class="keyword">class </span><a class="code" href="a00875.html" title="Key for double vector values.">vtkInformationDoubleVectorKey</a>; <a name="l00035"></a>00035 <span class="keyword">class </span><a class="code" href="a00881.html" title="Key for integer values in vtkInformation.">vtkInformationIntegerKey</a>; <a name="l00036"></a>00036 <span class="keyword">class </span><a class="code" href="a00888.html" title="Key for vtkObjectBase values.">vtkInformationObjectBaseKey</a>; <a name="l00037"></a>00037 <span class="keyword">class </span><a class="code" href="a00892.html" title="Key for string values in vtkInformation.">vtkInformationStringKey</a>; <a name="l00038"></a>00038 <span class="keyword">class </span><a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>; <a name="l00039"></a>00039 <span class="keyword">class </span><a class="code" href="a01513.html" title="map scalar values into colors">vtkScalarsToColors</a>; <a name="l00040"></a>00040 <a name="l00041"></a><a class="code" href="a01514.html">00041</a> <span class="keyword">class </span><a class="code" href="a02170.html#4019f67b2e7d601f2cf984e448308dbb">VTK_RENDERING_EXPORT</a> <a class="code" href="a01514.html" title="painter that converts scalars to colors. It enable/disables coloring state depending...">vtkScalarsToColorsPainter</a> : <span class="keyword">public</span> <a class="code" href="a01149.html" title="Abstract class for drawing poly data.">vtkPainter</a> <a name="l00042"></a>00042 { <a name="l00043"></a>00043 <span class="keyword">public</span>: <a name="l00044"></a>00044 <span class="keyword">static</span> <a class="code" href="a01514.html" title="painter that converts scalars to colors. It enable/disables coloring state depending...">vtkScalarsToColorsPainter</a>* <a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>(); <a name="l00045"></a><a class="code" href="a01514.html#1a250163ad6ea12c11a9c27a13da46dc">00045</a> vtkTypeRevisionMacro(<a class="code" href="a01514.html" title="painter that converts scalars to colors. It enable/disables coloring state depending...">vtkScalarsToColorsPainter</a>, <a class="code" href="a01149.html" title="Abstract class for drawing poly data.">vtkPainter</a>); <a name="l00046"></a>00046 <span class="keywordtype">void</span> <a class="code" href="a01149.html#9f4a247b309e5c2934eb98f3966fbd15">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="l00054"></a>00054 <span class="keyword">static</span> <a class="code" href="a00881.html" title="Key for integer values in vtkInformation.">vtkInformationIntegerKey</a>* USE_LOOKUP_TABLE_SCALAR_RANGE(); <a name="l00055"></a>00055 <a name="l00059"></a>00059 <span class="keyword">static</span> <a class="code" href="a00875.html" title="Key for double vector values.">vtkInformationDoubleVectorKey</a>* SCALAR_RANGE(); <a name="l00060"></a>00060 <a name="l00063"></a>00063 <span class="keyword">static</span> <a class="code" href="a00881.html" title="Key for integer values in vtkInformation.">vtkInformationIntegerKey</a>* SCALAR_MODE(); <a name="l00064"></a>00064 <a name="l00070"></a>00070 <span class="keyword">static</span> <a class="code" href="a00881.html" title="Key for integer values in vtkInformation.">vtkInformationIntegerKey</a>* COLOR_MODE(); <a name="l00071"></a>00071 <a name="l00075"></a>00075 <span class="keyword">static</span> <a class="code" href="a00881.html" title="Key for integer values in vtkInformation.">vtkInformationIntegerKey</a>* INTERPOLATE_SCALARS_BEFORE_MAPPING(); <a name="l00076"></a>00076 <a name="l00078"></a>00078 <a name="l00079"></a>00079 <span class="keyword">static</span> <a class="code" href="a00888.html" title="Key for vtkObjectBase values.">vtkInformationObjectBaseKey</a>* LOOKUP_TABLE(); <a name="l00080"></a>00080 <span class="keywordtype">void</span> SetLookupTable(<a class="code" href="a01513.html" title="map scalar values into colors">vtkScalarsToColors</a> *lut); <a name="l00081"></a>00081 <a class="code" href="a01513.html" title="map scalar values into colors">vtkScalarsToColors</a> *GetLookupTable(); <a name="l00083"></a>00083 <a name="l00086"></a>00086 <span class="keyword">virtual</span> <span class="keywordtype">void</span> CreateDefaultLookupTable(); <a name="l00087"></a>00087 <a name="l00090"></a>00090 <span class="keyword">static</span> <a class="code" href="a00881.html" title="Key for integer values in vtkInformation.">vtkInformationIntegerKey</a>* SCALAR_VISIBILITY(); <a name="l00091"></a>00091 <a name="l00093"></a>00093 <a name="l00094"></a>00094 <span class="keyword">static</span> <a class="code" href="a00881.html" title="Key for integer values in vtkInformation.">vtkInformationIntegerKey</a>* ARRAY_ACCESS_MODE(); <a name="l00095"></a>00095 <span class="keyword">static</span> <a class="code" href="a00881.html" title="Key for integer values in vtkInformation.">vtkInformationIntegerKey</a>* ARRAY_ID(); <a name="l00096"></a>00096 <span class="keyword">static</span> <a class="code" href="a00892.html" title="Key for string values in vtkInformation.">vtkInformationStringKey</a>* ARRAY_NAME(); <a name="l00097"></a>00097 <span class="keyword">static</span> <a class="code" href="a00881.html" title="Key for integer values in vtkInformation.">vtkInformationIntegerKey</a>* ARRAY_COMPONENT(); <a name="l00099"></a>00099 <a name="l00101"></a>00101 <span class="keyword">static</span> <a class="code" href="a00881.html" title="Key for integer values in vtkInformation.">vtkInformationIntegerKey</a>* SCALAR_MATERIAL_MODE(); <a name="l00102"></a>00102 <a name="l00110"></a>00110 <span class="keyword">virtual</span> <span class="keywordtype">int</span> GetPremultiplyColorsWithAlpha(<a class="code" href="a00092.html" title="represents an object (geometry &amp; properties) in a rendered scene">vtkActor</a>* actor); <a name="l00111"></a>00111 <a name="l00114"></a>00114 <span class="keyword">virtual</span> <a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a> *<a class="code" href="a01149.html#60a56a0704a73e2d98ba82cf3828e7c7">GetOutput</a>(); <a name="l00115"></a>00115 <a name="l00116"></a>00116 <span class="comment">//BTX</span> <a name="l00117"></a>00117 <span class="keyword">protected</span>: <a name="l00118"></a>00118 <a class="code" href="a01514.html" title="painter that converts scalars to colors. It enable/disables coloring state depending...">vtkScalarsToColorsPainter</a>(); <a name="l00119"></a>00119 <span class="keyword">virtual</span> ~<a class="code" href="a01514.html" title="painter that converts scalars to colors. It enable/disables coloring state depending...">vtkScalarsToColorsPainter</a>(); <a name="l00120"></a>00120 <a name="l00122"></a>00122 <a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a>* NewClone(<a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210eb708a412c0730a6b5f3215b36474a1e">data</a>); <a name="l00123"></a>00123 <a name="l00125"></a>00125 <a name="l00128"></a>00128 <span class="keywordtype">void</span> MapScalarsToTexture(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>* output, <a name="l00129"></a>00129 <a class="code" href="a00356.html" title="abstract superclass for arrays of numeric data">vtkDataArray</a>* scalars, <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>* input); <a name="l00131"></a>00131 <a name="l00133"></a>00133 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01149.html#e3b984be5fedeecd2504e9532e8a8fa8">PrepareForRendering</a>(<a class="code" href="a01480.html" title="abstract specification for renderers">vtkRenderer</a>* renderer, <a class="code" href="a00092.html" title="represents an object (geometry &amp; properties) in a rendered scene">vtkActor</a>* actor); <a name="l00134"></a>00134 <a name="l00136"></a>00136 <a name="l00138"></a>00138 <span class="keyword">virtual</span> <span class="keywordtype">void</span> MapScalars(<a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>* output, <a name="l00139"></a>00139 <span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210a6028180e112c2c1c3556a8253cdbff5">alpha</a>, <span class="keywordtype">int</span> multiply_with_alpha, <a name="l00140"></a>00140 <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>* input); <a name="l00142"></a>00142 <a name="l00145"></a>00145 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01149.html#9ec3772c41fd56a04475ed56aa39ba2a">ProcessInformation</a>(<a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a>*); <a name="l00146"></a>00146 <a name="l00148"></a>00148 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01149.html#db2b2caee87b47d1d66f7918d9dcc8fd">ReportReferences</a>(<a class="code" href="a00572.html" title="Detect and break reference loops.">vtkGarbageCollector</a> *collector); <a name="l00149"></a>00149 <a name="l00156"></a>00156 <span class="keywordtype">int</span> CanUseTextureMapForColoring(<a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a>* input); <a name="l00157"></a>00157 <a name="l00158"></a>00158 <a name="l00160"></a>00160 <span class="keywordtype">void</span> UpdateColorTextureMap(<span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210a6028180e112c2c1c3556a8253cdbff5">alpha</a>, <span class="keywordtype">int</span> multiply_with_alpha); <a name="l00161"></a>00161 <a name="l00162"></a>00162 <span class="comment">// Methods to set the ivars. These are purposefully protected.</span> <a name="l00163"></a>00163 <span class="comment">// The only means of affecting these should be using teh vtkInformation </span> <a name="l00164"></a>00164 <span class="comment">// object.</span> <a name="l00165"></a>00165 vtkSetMacro(UseLookupTableScalarRange,<span class="keywordtype">int</span>); <a name="l00166"></a>00166 vtkSetVector2Macro(ScalarRange,<span class="keywordtype">double</span>); <a name="l00167"></a>00167 vtkSetMacro(ScalarMode, <span class="keywordtype">int</span>); <a name="l00168"></a>00168 vtkSetMacro(ColorMode, <span class="keywordtype">int</span>); <a name="l00169"></a>00169 vtkSetMacro(InterpolateScalarsBeforeMapping,<span class="keywordtype">int</span>); <a name="l00170"></a>00170 vtkSetMacro(ScalarVisibility,<span class="keywordtype">int</span>); <a name="l00171"></a>00171 vtkSetMacro(ScalarMaterialMode,<span class="keywordtype">int</span>); <a name="l00172"></a>00172 vtkSetMacro(ArrayAccessMode, <span class="keywordtype">int</span>); <a name="l00173"></a>00173 vtkSetMacro(ArrayId, <span class="keywordtype">int</span>); <a name="l00174"></a>00174 vtkSetStringMacro(ArrayName); <a name="l00175"></a><a class="code" href="a01514.html#f28c5b9ad53a46a14bc407fcb7d53d2e">00175</a> vtkSetMacro(ArrayComponent, <span class="keywordtype">int</span>); <a name="l00176"></a>00176 <a name="l00177"></a>00177 <a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a>* OutputData; <a name="l00178"></a>00178 <a name="l00179"></a><a class="code" href="a01514.html#7d6c871cf7837005de1eb2375ccadff4">00179</a> <span class="keywordtype">int</span> ArrayAccessMode; <a name="l00180"></a><a class="code" href="a01514.html#12622c0343dcd44748b22bdbf242cdba">00180</a> <span class="keywordtype">int</span> ArrayComponent; <a name="l00181"></a><a class="code" href="a01514.html#07b9f20dc354f0988c3430c43624c88c">00181</a> <span class="keywordtype">int</span> ArrayId; <a name="l00182"></a><a class="code" href="a01514.html#11759da5173d6354e16ddf09689be20e">00182</a> <span class="keywordtype">char</span>* ArrayName; <a name="l00183"></a>00183 <a name="l00184"></a><a class="code" href="a01514.html#81a2ad9b4fbe6efb776d6def293672a1">00184</a> <a class="code" href="a01513.html" title="map scalar values into colors">vtkScalarsToColors</a> *LookupTable; <a name="l00185"></a>00185 <span class="comment">// Lookup table provided via the scalars. This gets preference over the one</span> <a name="l00186"></a>00186 <span class="comment">// set on the mapper by the user.</span> <a name="l00187"></a><a class="code" href="a01514.html#d3d53b271816bade7ea7bfee010f55ff">00187</a> <a class="code" href="a01562.html" title="Hold a reference to a vtkObjectBase instance.">vtkSmartPointer<vtkScalarsToColors></a> ScalarsLookupTable; <a name="l00188"></a><a class="code" href="a01514.html#f0603afe9b1800e4e10db2a706be0317">00188</a> <a class="code" href="a01562.html" title="Hold a reference to a vtkObjectBase instance.">vtkSmartPointer<vtkImageData></a> ColorTextureMap; <a name="l00189"></a><a class="code" href="a01514.html#86f2c4e29aefd1e5e9118bd9bdc59de7">00189</a> <span class="keywordtype">int</span> ColorMode; <a name="l00190"></a><a class="code" href="a01514.html#d196d5c850a563a28b0ce36de453661c">00190</a> <span class="keywordtype">int</span> InterpolateScalarsBeforeMapping; <a name="l00191"></a><a class="code" href="a01514.html#3ec3781b98bf14811b3ca5a592e77692">00191</a> <span class="keywordtype">int</span> ScalarMode; <a name="l00192"></a><a class="code" href="a01514.html#c0f13fa8b8b5ae6b948b241522c491d7">00192</a> <span class="keywordtype">int</span> ScalarMaterialMode; <a name="l00193"></a><a class="code" href="a01514.html#0e129aea221c687465684d6654b93955">00193</a> <span class="keywordtype">double</span> LastUsedAlpha; <span class="comment">// Essential to ensure alpha changes work correctly </span> <a name="l00194"></a>00194 <span class="comment">// for composite datasets.</span> <a name="l00195"></a><a class="code" href="a01514.html#d5c79292565207ad1397f77ca2ba290a">00195</a> <span class="keywordtype">double</span> ScalarRange[2]; <a name="l00196"></a><a class="code" href="a01514.html#6b6e85a41bdca7b23c388f85652a444f">00196</a> <span class="keywordtype">int</span> ScalarVisibility; <a name="l00197"></a><a class="code" href="a01514.html#fad119cd47128df263aec7c0ece6a80d">00197</a> <span class="keywordtype">int</span> UseLookupTableScalarRange; <a name="l00198"></a>00198 <a name="l00199"></a><a class="code" href="a01514.html#151c7953d36303d3ef7170ac97f6733c">00199</a> <a class="code" href="a01719.html" title="record modification and/or execution time">vtkTimeStamp</a> OutputUpdateTime; <a name="l00200"></a>00200 <a name="l00201"></a>00201 <span class="comment">// This is set when MapScalars decides to use vertex colors for atleast on</span> <a name="l00202"></a>00202 <span class="comment">// dataset in the current pass.</span> <a name="l00203"></a><a class="code" href="a01514.html#fcd8ededf6d7d2e0a8107c7ed4dd6150">00203</a> <span class="keywordtype">int</span> UsingScalarColoring; <a name="l00204"></a>00204 <a name="l00205"></a>00205 <span class="keyword">private</span>: <a name="l00206"></a>00206 <a class="code" href="a01514.html" title="painter that converts scalars to colors. It enable/disables coloring state depending...">vtkScalarsToColorsPainter</a>(<span class="keyword">const</span> <a class="code" href="a01514.html" title="painter that converts scalars to colors. It enable/disables coloring state depending...">vtkScalarsToColorsPainter</a>&); <span class="comment">// Not implemented.</span> <a name="l00207"></a>00207 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01514.html" title="painter that converts scalars to colors. It enable/disables coloring state depending...">vtkScalarsToColorsPainter</a>&); <span class="comment">// Not implemented.</span> <a name="l00208"></a>00208 <span class="comment">//ETX</span> <a name="l00209"></a>00209 }; <a name="l00210"></a>00210 <a name="l00211"></a>00211 <span class="preprocessor">#endif</span> <a name="l00212"></a>00212 <span class="preprocessor"></span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:49 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>