<!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/Hybrid/vtkBarChartActor.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/Hybrid/vtkBarChartActor.h</h1><a href="a02812.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: vtkBarChartActor.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="l00036"></a>00036 <span class="preprocessor">#ifndef __vtkBarChartActor_h</span> <a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define __vtkBarChartActor_h</span> <a name="l00038"></a>00038 <span class="preprocessor"></span> <a name="l00039"></a>00039 <span class="preprocessor">#include "<a class="code" href="a02186.html">vtkActor2D.h</a>"</span> <a name="l00040"></a>00040 <a name="l00041"></a>00041 <span class="keyword">class </span><a class="code" href="a00155.html" title="Create an axis with tick marks and labels.">vtkAxisActor2D</a>; <a name="l00042"></a>00042 <span class="keyword">class </span><a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a>; <a name="l00043"></a>00043 <span class="keyword">class </span><a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a>; <a name="l00044"></a>00044 <span class="keyword">class </span><a class="code" href="a01266.html" title="draw vtkPolyData onto the image plane">vtkPolyDataMapper2D</a>; <a name="l00045"></a>00045 <span class="keyword">class </span><a class="code" href="a01691.html" title="2D text annotation">vtkTextMapper</a>; <a name="l00046"></a>00046 <span class="keyword">class </span><a class="code" href="a01692.html" title="represent text properties.">vtkTextProperty</a>; <a name="l00047"></a>00047 <span class="keyword">class </span><a class="code" href="a00951.html" title="draw symbols with text">vtkLegendBoxActor</a>; <a name="l00048"></a>00048 <span class="keyword">class </span><a class="code" href="a00652.html" title="create 2D glyphs represented by vtkPolyData">vtkGlyphSource2D</a>; <a name="l00049"></a>00049 <span class="keyword">class </span>vtkBarLabelArray; <a name="l00050"></a>00050 <a name="l00051"></a><a class="code" href="a00159.html">00051</a> <span class="keyword">class </span><a class="code" href="a02170.html#9e9a05a8377523b4f8d707441f65786d">VTK_HYBRID_EXPORT</a> <a class="code" href="a00159.html" title="create a bar chart from an array">vtkBarChartActor</a> : <span class="keyword">public</span> <a class="code" href="a00093.html" title="a actor that draws 2D data">vtkActor2D</a> <a name="l00052"></a>00052 { <a name="l00053"></a>00053 <span class="keyword">public</span>: <a name="l00055"></a>00055 <a name="l00056"></a><a class="code" href="a00159.html#d29ee0f30d36f45efcaae368580d3337">00056</a> vtkTypeRevisionMacro(<a class="code" href="a00159.html" title="create a bar chart from an array">vtkBarChartActor</a>,<a class="code" href="a00093.html" title="a actor that draws 2D data">vtkActor2D</a>); <a name="l00057"></a>00057 <span class="keywordtype">void</span> <a class="code" href="a00093.html#f0bb6b3aeeaa23e0f408990a40a1607a">PrintSelf</a>(ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00059"></a>00059 <a name="l00061"></a>00061 <span class="keyword">static</span> <a class="code" href="a00159.html" title="create a bar chart from an array">vtkBarChartActor</a> *<a class="code" href="a00093.html#470c524c4d719ddf82b0a32bc55beb6e">New</a>(); <a name="l00062"></a>00062 <a name="l00064"></a>00064 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetInput(<a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a>*); <a name="l00065"></a>00065 <a name="l00067"></a>00067 <a name="l00068"></a>00068 vtkGetObjectMacro(Input,<a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a>); <a name="l00070"></a>00070 <a name="l00072"></a>00072 <a name="l00073"></a>00073 vtkSetMacro(TitleVisibility, <span class="keywordtype">int</span>); <a name="l00074"></a>00074 vtkGetMacro(TitleVisibility, <span class="keywordtype">int</span>); <a name="l00075"></a>00075 vtkBooleanMacro(TitleVisibility, <span class="keywordtype">int</span>); <a name="l00077"></a>00077 <a name="l00079"></a>00079 <a name="l00080"></a>00080 vtkSetStringMacro(Title); <a name="l00081"></a>00081 vtkGetStringMacro(Title); <a name="l00083"></a>00083 <a name="l00085"></a>00085 <a name="l00087"></a>00087 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetTitleTextProperty(<a class="code" href="a01692.html" title="represent text properties.">vtkTextProperty</a> *p); <a name="l00088"></a>00088 vtkGetObjectMacro(TitleTextProperty,<a class="code" href="a01692.html" title="represent text properties.">vtkTextProperty</a>); <a name="l00090"></a>00090 <a name="l00092"></a>00092 <a name="l00093"></a>00093 vtkSetMacro(LabelVisibility, <span class="keywordtype">int</span>); <a name="l00094"></a>00094 vtkGetMacro(LabelVisibility, <span class="keywordtype">int</span>); <a name="l00095"></a>00095 vtkBooleanMacro(LabelVisibility, <span class="keywordtype">int</span>); <a name="l00097"></a>00097 <a name="l00099"></a>00099 <a name="l00101"></a>00101 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetLabelTextProperty(<a class="code" href="a01692.html" title="represent text properties.">vtkTextProperty</a> *p); <a name="l00102"></a>00102 vtkGetObjectMacro(LabelTextProperty,<a class="code" href="a01692.html" title="represent text properties.">vtkTextProperty</a>); <a name="l00104"></a>00104 <a name="l00106"></a>00106 <a name="l00108"></a>00108 <span class="keywordtype">void</span> SetBarColor(<span class="keywordtype">int</span> i, <span class="keywordtype">double</span> r, <span class="keywordtype">double</span> g, <span class="keywordtype">double</span> b); <a name="l00109"></a><a class="code" href="a00159.html#a610f22d11a135917fa4b955afafabcd">00109</a> <span class="keywordtype">void</span> SetBarColor(<span class="keywordtype">int</span> i, <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210ab06a058f9ffb559855ff8495aa7e53e">color</a>[3]) <a name="l00110"></a>00110 { this->SetBarColor(i, color[0], color[1], color[2]); } <a name="l00111"></a>00111 <span class="keywordtype">double</span> *GetBarColor(<span class="keywordtype">int</span> i); <a name="l00113"></a>00113 <a name="l00115"></a>00115 <a name="l00117"></a>00117 <span class="keywordtype">void</span> SetBarLabel(<span class="keyword">const</span> <span class="keywordtype">int</span> i, <span class="keyword">const</span> <span class="keywordtype">char</span> *); <a name="l00118"></a>00118 <span class="keyword">const</span> <span class="keywordtype">char</span>* GetBarLabel(<span class="keywordtype">int</span> i); <a name="l00120"></a>00120 <a name="l00122"></a>00122 <a name="l00123"></a>00123 vtkSetStringMacro(YTitle); <a name="l00124"></a>00124 vtkGetStringMacro(YTitle); <a name="l00126"></a>00126 <a name="l00128"></a>00128 <a name="l00131"></a>00131 vtkSetMacro(LegendVisibility, <span class="keywordtype">int</span>); <a name="l00132"></a>00132 vtkGetMacro(LegendVisibility, <span class="keywordtype">int</span>); <a name="l00133"></a>00133 vtkBooleanMacro(LegendVisibility, <span class="keywordtype">int</span>); <a name="l00135"></a>00135 <a name="l00137"></a>00137 <a name="l00139"></a>00139 vtkGetObjectMacro(LegendActor,<a class="code" href="a00951.html" title="draw symbols with text">vtkLegendBoxActor</a>); <a name="l00141"></a>00141 <a name="l00143"></a>00143 <a name="l00144"></a>00144 <span class="keywordtype">int</span> <a class="code" href="a00093.html#95232573f645b775c88dd81a6067addc">RenderOverlay</a>(<a class="code" href="a01833.html" title="abstract specification for Viewports">vtkViewport</a>*); <a name="l00145"></a>00145 <span class="keywordtype">int</span> <a class="code" href="a00093.html#e26bc15689de9781fdf6ecc6ab80c2fe">RenderOpaqueGeometry</a>(<a class="code" href="a01833.html" title="abstract specification for Viewports">vtkViewport</a>*); <a name="l00146"></a><a class="code" href="a00159.html#54494ac41ab1401de4a71b5676ae89be">00146</a> <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00093.html#f7a2adb46eba24bb78c825750d46a482">RenderTranslucentPolygonalGeometry</a>(<a class="code" href="a01833.html" title="abstract specification for Viewports">vtkViewport</a>* ) {<span class="keywordflow">return</span> 0;} <a name="l00148"></a>00148 <a name="l00150"></a>00150 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00093.html#a8f4fb9da8d8a683cf1c4f8541a21ff1">HasTranslucentPolygonalGeometry</a>(); <a name="l00151"></a>00151 <a name="l00155"></a>00155 <span class="keywordtype">void</span> <a class="code" href="a00093.html#dd99f157501a85867005664f4d74008d">ReleaseGraphicsResources</a>(<a class="code" href="a01886.html" title="window superclass for vtkRenderWindow">vtkWindow</a> *); <a name="l00156"></a>00156 <a name="l00157"></a>00157 <span class="keyword">protected</span>: <a name="l00158"></a>00158 <a class="code" href="a00159.html" title="create a bar chart from an array">vtkBarChartActor</a>(); <a name="l00159"></a>00159 ~<a class="code" href="a00159.html" title="create a bar chart from an array">vtkBarChartActor</a>(); <a name="l00160"></a>00160 <a name="l00161"></a>00161 <span class="keyword">private</span>: <a name="l00162"></a>00162 <a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a> *Input; <span class="comment">// List of data sets to plot</span> <a name="l00163"></a>00163 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> ArrayNumber; <a name="l00164"></a>00164 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> ComponentNumber; <a name="l00165"></a>00165 <span class="keywordtype">int</span> TitleVisibility; <span class="comment">// Should I see the title?</span> <a name="l00166"></a>00166 <span class="keywordtype">char</span> *Title; <span class="comment">// The title string</span> <a name="l00167"></a>00167 <a class="code" href="a01692.html" title="represent text properties.">vtkTextProperty</a> *TitleTextProperty; <a name="l00168"></a>00168 <span class="keywordtype">int</span> LabelVisibility; <a name="l00169"></a>00169 <a class="code" href="a01692.html" title="represent text properties.">vtkTextProperty</a> *LabelTextProperty; <a name="l00170"></a>00170 vtkBarLabelArray *Labels; <a name="l00171"></a>00171 <span class="keywordtype">int</span> LegendVisibility; <a name="l00172"></a>00172 <a class="code" href="a00951.html" title="draw symbols with text">vtkLegendBoxActor</a> *LegendActor; <a name="l00173"></a>00173 <a class="code" href="a00652.html" title="create 2D glyphs represented by vtkPolyData">vtkGlyphSource2D</a> *GlyphSource; <a name="l00174"></a>00174 <a name="l00175"></a>00175 <span class="comment">// Local variables needed to plot</span> <a name="l00176"></a>00176 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> N; <span class="comment">// The number of values</span> <a name="l00177"></a>00177 <span class="keywordtype">double</span> *Heights; <span class="comment">// The heights of each bar</span> <a name="l00178"></a>00178 <span class="keywordtype">double</span> MinHeight; <span class="comment">//The maximum and minimum height</span> <a name="l00179"></a>00179 <span class="keywordtype">double</span> MaxHeight; <a name="l00180"></a>00180 <span class="keywordtype">double</span> LowerLeft[2]; <a name="l00181"></a>00181 <span class="keywordtype">double</span> UpperRight[2]; <a name="l00182"></a>00182 <a name="l00183"></a>00183 <a class="code" href="a01691.html" title="2D text annotation">vtkTextMapper</a> **BarMappers; <span class="comment">//a label for each bar</span> <a name="l00184"></a>00184 <a class="code" href="a00093.html" title="a actor that draws 2D data">vtkActor2D</a> **BarActors; <a name="l00185"></a>00185 <a name="l00186"></a>00186 <a class="code" href="a01691.html" title="2D text annotation">vtkTextMapper</a> *TitleMapper; <a name="l00187"></a>00187 <a class="code" href="a00093.html" title="a actor that draws 2D data">vtkActor2D</a> *TitleActor; <a name="l00188"></a>00188 <a name="l00189"></a>00189 <a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a> *PlotData; <span class="comment">// The actual bars plus the x-axis</span> <a name="l00190"></a>00190 <a class="code" href="a01266.html" title="draw vtkPolyData onto the image plane">vtkPolyDataMapper2D</a> *PlotMapper; <a name="l00191"></a>00191 <a class="code" href="a00093.html" title="a actor that draws 2D data">vtkActor2D</a> *PlotActor; <a name="l00192"></a>00192 <a name="l00193"></a>00193 <a class="code" href="a00155.html" title="Create an axis with tick marks and labels.">vtkAxisActor2D</a> *YAxis; <span class="comment">//The y-axis </span> <a name="l00194"></a>00194 <span class="keywordtype">char</span> *YTitle; <a name="l00195"></a>00195 <a name="l00196"></a>00196 <a class="code" href="a01719.html" title="record modification and/or execution time">vtkTimeStamp</a> BuildTime; <a name="l00197"></a>00197 <a name="l00198"></a>00198 <span class="keywordtype">int</span> LastPosition[2]; <a name="l00199"></a>00199 <span class="keywordtype">int</span> LastPosition2[2]; <a name="l00200"></a>00200 <span class="keywordtype">double</span> P1[3]; <a name="l00201"></a>00201 <span class="keywordtype">double</span> P2[3]; <a name="l00202"></a>00202 <a name="l00203"></a>00203 <span class="keywordtype">void</span> Initialize(); <a name="l00204"></a>00204 <span class="keywordtype">int</span> PlaceAxes(<a class="code" href="a01833.html" title="abstract specification for Viewports">vtkViewport</a> *viewport, <span class="keywordtype">int</span> *<a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210e3d5e7c015dff08d8daf72a0102e1444">size</a>); <a name="l00205"></a>00205 <span class="keywordtype">int</span> BuildPlot(<a class="code" href="a01833.html" title="abstract specification for Viewports">vtkViewport</a>*); <a name="l00206"></a>00206 <a name="l00207"></a>00207 <span class="keyword">private</span>: <a name="l00208"></a>00208 <a class="code" href="a00159.html" title="create a bar chart from an array">vtkBarChartActor</a>(<span class="keyword">const</span> <a class="code" href="a00159.html" title="create a bar chart from an array">vtkBarChartActor</a>&); <span class="comment">// Not implemented.</span> <a name="l00209"></a>00209 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00159.html" title="create a bar chart from an array">vtkBarChartActor</a>&); <span class="comment">// Not implemented.</span> <a name="l00210"></a>00210 }; <a name="l00211"></a>00211 <a name="l00212"></a>00212 <a name="l00213"></a>00213 <span class="preprocessor">#endif</span> <a name="l00214"></a>00214 <span class="preprocessor"></span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:32 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>