<!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/Graphics/vtkSplineFilter.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/Graphics/vtkSplineFilter.h</h1><a href="a02664.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: vtkSplineFilter.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="l00039"></a>00039 <span class="preprocessor">#ifndef __vtkSplineFilter_h</span> <a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define __vtkSplineFilter_h</span> <a name="l00041"></a>00041 <span class="preprocessor"></span> <a name="l00042"></a>00042 <span class="preprocessor">#include "<a class="code" href="a02331.html">vtkPolyDataAlgorithm.h</a>"</span> <a name="l00043"></a>00043 <a name="l00044"></a><a class="code" href="a02664.html#ca02175780ffc51cd1b9a5c0d38f5f19">00044</a> <span class="preprocessor">#define VTK_SUBDIVIDE_SPECIFIED 0</span> <a name="l00045"></a><a class="code" href="a02664.html#640881202c2080f43cbda61fe67f5991">00045</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_SUBDIVIDE_LENGTH 1</span> <a name="l00046"></a>00046 <span class="preprocessor"></span> <a name="l00047"></a><a class="code" href="a02664.html#a2d403bb4b69f86c108350e33abb596f">00047</a> <span class="preprocessor">#define VTK_TCOORDS_OFF 0</span> <a name="l00048"></a><a class="code" href="a02664.html#67bc8158ca083ac1ce6d15dadf91e1ea">00048</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_TCOORDS_FROM_NORMALIZED_LENGTH 1</span> <a name="l00049"></a><a class="code" href="a02664.html#44781be6cf1eff87adf4871b37e4006a">00049</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_TCOORDS_FROM_LENGTH 2</span> <a name="l00050"></a><a class="code" href="a02664.html#16e19b4e04e9c3d44151779cbe931279">00050</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_TCOORDS_FROM_SCALARS 3</span> <a name="l00051"></a>00051 <span class="preprocessor"></span> <a name="l00052"></a>00052 <span class="keyword">class </span><a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a>; <a name="l00053"></a>00053 <span class="keyword">class </span><a class="code" href="a00245.html" title="represent and manipulate cell attribute data">vtkCellData</a>; <a name="l00054"></a>00054 <span class="keyword">class </span><a class="code" href="a00556.html" title="dynamic, self-adjusting array of float">vtkFloatArray</a>; <a name="l00055"></a>00055 <span class="keyword">class </span><a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a>; <a name="l00056"></a>00056 <span class="keyword">class </span><a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a>; <a name="l00057"></a>00057 <span class="keyword">class </span><a class="code" href="a01588.html" title="spline abstract class for interpolating splines">vtkSpline</a>; <a name="l00058"></a>00058 <a name="l00059"></a><a class="code" href="a01589.html">00059</a> <span class="keyword">class </span><a class="code" href="a02170.html#c3c1ffe2fe47b9b70ba90182b7860cce">VTK_GRAPHICS_EXPORT</a> <a class="code" href="a01589.html" title="generate uniformly subdivided polylines from a set of input polyline using a vtkSpline...">vtkSplineFilter</a> : <span class="keyword">public</span> <a class="code" href="a01261.html" title="Superclass for algorithms that produce only polydata as output.">vtkPolyDataAlgorithm</a> <a name="l00060"></a>00060 { <a name="l00061"></a>00061 <span class="keyword">public</span>: <a name="l00062"></a><a class="code" href="a01589.html#78c40970cfec5a39fe671022783bc3a7">00062</a> vtkTypeRevisionMacro(<a class="code" href="a01589.html" title="generate uniformly subdivided polylines from a set of input polyline using a vtkSpline...">vtkSplineFilter</a>,<a class="code" href="a01261.html" title="Superclass for algorithms that produce only polydata as output.">vtkPolyDataAlgorithm</a>); <a name="l00063"></a>00063 <span class="keywordtype">void</span> <a class="code" href="a01261.html#e6d59a63261b0c56f8f473984ae0e1b6">PrintSelf</a>(ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00064"></a>00064 <a name="l00067"></a>00067 <span class="keyword">static</span> <a class="code" href="a01589.html" title="generate uniformly subdivided polylines from a set of input polyline using a vtkSpline...">vtkSplineFilter</a> *<a class="code" href="a01261.html#cf785ac526132296ff652c636f713b5e">New</a>(); <a name="l00068"></a>00068 <a name="l00070"></a>00070 <a name="l00072"></a>00072 vtkSetClampMacro(MaximumNumberOfSubdivisions,<span class="keywordtype">int</span>,1,<a class="code" href="a02149.html#804f55a35836c1770f9176f3a01c4d5e">VTK_LARGE_INTEGER</a>); <a name="l00073"></a>00073 vtkGetMacro(MaximumNumberOfSubdivisions,<span class="keywordtype">int</span>); <a name="l00075"></a>00075 <a name="l00077"></a>00077 <a name="l00078"></a>00078 vtkSetClampMacro(Subdivide,<span class="keywordtype">int</span>,<a class="code" href="a02664.html#ca02175780ffc51cd1b9a5c0d38f5f19">VTK_SUBDIVIDE_SPECIFIED</a>,<a class="code" href="a02664.html#640881202c2080f43cbda61fe67f5991">VTK_SUBDIVIDE_LENGTH</a>); <a name="l00079"></a>00079 vtkGetMacro(Subdivide,<span class="keywordtype">int</span>); <a name="l00080"></a><a class="code" href="a01589.html#cf08d96000e65aeb10ee9e98bc2b9d93">00080</a> <span class="keywordtype">void</span> SetSubdivideToSpecified() <a name="l00081"></a>00081 {this->SetSubdivide(<a class="code" href="a02664.html#ca02175780ffc51cd1b9a5c0d38f5f19">VTK_SUBDIVIDE_SPECIFIED</a>);} <a name="l00082"></a><a class="code" href="a01589.html#73880c7749da9233ede49594afa3b36b">00082</a> <span class="keywordtype">void</span> SetSubdivideToLength() <a name="l00083"></a>00083 {this->SetSubdivide(<a class="code" href="a02664.html#640881202c2080f43cbda61fe67f5991">VTK_SUBDIVIDE_LENGTH</a>);} <a name="l00084"></a>00084 <span class="keyword">const</span> <span class="keywordtype">char</span> *GetSubdivideAsString(); <a name="l00086"></a>00086 <a name="l00088"></a>00088 <a name="l00091"></a>00091 vtkSetClampMacro(NumberOfSubdivisions,<span class="keywordtype">int</span>,1,<a class="code" href="a02149.html#804f55a35836c1770f9176f3a01c4d5e">VTK_LARGE_INTEGER</a>); <a name="l00092"></a>00092 vtkGetMacro(NumberOfSubdivisions,<span class="keywordtype">int</span>); <a name="l00094"></a>00094 <a name="l00096"></a>00096 <a name="l00099"></a>00099 vtkSetClampMacro(Length,<span class="keywordtype">double</span>,0.0000001,<a class="code" href="a02149.html#a933eb1ff8ef089de59cce7b41e21261">VTK_DOUBLE_MAX</a>); <a name="l00100"></a>00100 vtkGetMacro(Length,<span class="keywordtype">double</span>); <a name="l00102"></a>00102 <a name="l00104"></a>00104 <a name="l00105"></a>00105 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetSpline(<a class="code" href="a01588.html" title="spline abstract class for interpolating splines">vtkSpline</a>*); <a name="l00106"></a>00106 vtkGetObjectMacro(Spline,<a class="code" href="a01588.html" title="spline abstract class for interpolating splines">vtkSpline</a>); <a name="l00108"></a>00108 <a name="l00110"></a>00110 <a name="l00115"></a>00115 vtkSetClampMacro(GenerateTCoords,<span class="keywordtype">int</span>,<a class="code" href="a02646.html#a2d403bb4b69f86c108350e33abb596f">VTK_TCOORDS_OFF</a>, <a name="l00116"></a>00116 <a class="code" href="a02646.html#16e19b4e04e9c3d44151779cbe931279">VTK_TCOORDS_FROM_SCALARS</a>); <a name="l00117"></a>00117 vtkGetMacro(GenerateTCoords,<span class="keywordtype">int</span>); <a name="l00118"></a><a class="code" href="a01589.html#0ed9aacb95517aec3881ce1d8a217c33">00118</a> <span class="keywordtype">void</span> SetGenerateTCoordsToOff() <a name="l00119"></a>00119 {this->SetGenerateTCoords(<a class="code" href="a02646.html#a2d403bb4b69f86c108350e33abb596f">VTK_TCOORDS_OFF</a>);} <a name="l00120"></a><a class="code" href="a01589.html#0377c76ce1c7519c311805606903458b">00120</a> <span class="keywordtype">void</span> SetGenerateTCoordsToNormalizedLength() <a name="l00121"></a>00121 {this->SetGenerateTCoords(<a class="code" href="a02646.html#67bc8158ca083ac1ce6d15dadf91e1ea">VTK_TCOORDS_FROM_NORMALIZED_LENGTH</a>);} <a name="l00122"></a><a class="code" href="a01589.html#dc6bef1b324a99018798ff844910b76b">00122</a> <span class="keywordtype">void</span> SetGenerateTCoordsToUseLength() <a name="l00123"></a>00123 {this->SetGenerateTCoords(<a class="code" href="a02646.html#44781be6cf1eff87adf4871b37e4006a">VTK_TCOORDS_FROM_LENGTH</a>);} <a name="l00124"></a><a class="code" href="a01589.html#0fcb8bd19b26fc87a22dbceec7f19066">00124</a> <span class="keywordtype">void</span> SetGenerateTCoordsToUseScalars() <a name="l00125"></a>00125 {this->SetGenerateTCoords(<a class="code" href="a02646.html#16e19b4e04e9c3d44151779cbe931279">VTK_TCOORDS_FROM_SCALARS</a>);} <a name="l00126"></a>00126 <span class="keyword">const</span> <span class="keywordtype">char</span> *GetGenerateTCoordsAsString(); <a name="l00128"></a>00128 <a name="l00130"></a>00130 <a name="l00134"></a>00134 vtkSetClampMacro(TextureLength,<span class="keywordtype">double</span>,0.000001,<a class="code" href="a02149.html#804f55a35836c1770f9176f3a01c4d5e">VTK_LARGE_INTEGER</a>); <a name="l00135"></a>00135 vtkGetMacro(TextureLength,<span class="keywordtype">double</span>); <a name="l00137"></a>00137 <a name="l00138"></a>00138 <span class="keyword">protected</span>: <a name="l00139"></a>00139 <a class="code" href="a01589.html" title="generate uniformly subdivided polylines from a set of input polyline using a vtkSpline...">vtkSplineFilter</a>(); <a name="l00140"></a>00140 ~<a class="code" href="a01589.html" title="generate uniformly subdivided polylines from a set of input polyline using a vtkSpline...">vtkSplineFilter</a>(); <a name="l00141"></a>00141 <a name="l00142"></a>00142 <span class="comment">// Usual data generation method</span> <a name="l00143"></a>00143 <span class="keywordtype">int</span> <a class="code" href="a01261.html#6b5a43ab1f9bbcb368c7dc83e4afe068">RequestData</a>(<a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a> *, <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> **, <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> *); <a name="l00144"></a>00144 <a name="l00145"></a><a class="code" href="a01589.html#1a6860327e96486c30f76500ca86ba8b">00145</a> <span class="keywordtype">int</span> MaximumNumberOfSubdivisions; <a name="l00146"></a><a class="code" href="a01589.html#6770755e912cb3b5e0fbc25107714f38">00146</a> <span class="keywordtype">int</span> Subdivide; <a name="l00147"></a><a class="code" href="a01589.html#0419816492f6847e9046436b8580c782">00147</a> <span class="keywordtype">int</span> NumberOfSubdivisions; <a name="l00148"></a><a class="code" href="a01589.html#225a1f5eac8549a1a7e174698007a305">00148</a> <span class="keywordtype">double</span> Length; <a name="l00149"></a><a class="code" href="a01589.html#6c2c3b05eb51d7471b414904258e3092">00149</a> <a class="code" href="a01588.html" title="spline abstract class for interpolating splines">vtkSpline</a> *Spline; <a name="l00150"></a><a class="code" href="a01589.html#1a140f538ee467c8828d83136e98f33d">00150</a> <a class="code" href="a01588.html" title="spline abstract class for interpolating splines">vtkSpline</a> *XSpline; <a name="l00151"></a><a class="code" href="a01589.html#a96dd805bec60e4beea6fd6f18a9967d">00151</a> <a class="code" href="a01588.html" title="spline abstract class for interpolating splines">vtkSpline</a> *YSpline; <a name="l00152"></a><a class="code" href="a01589.html#6694989957640d6d0178946ff1560184">00152</a> <a class="code" href="a01588.html" title="spline abstract class for interpolating splines">vtkSpline</a> *ZSpline; <a name="l00153"></a><a class="code" href="a01589.html#eab70c16741a067ff0315f8644482df4">00153</a> <span class="keywordtype">int</span> GenerateTCoords; <a name="l00154"></a><a class="code" href="a01589.html#94595affc9945750d3bbd8c5ee9d4485">00154</a> <span class="keywordtype">double</span> TextureLength; <span class="comment">//this length is mapped to [0,1) texture space</span> <a name="l00155"></a>00155 <a name="l00156"></a>00156 <span class="comment">//helper methods</span> <a name="l00157"></a>00157 <span class="keywordtype">int</span> GeneratePoints(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210e69c3ea0b66a4036cbb0c6648abb252d">offset</a>, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> npts, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> *pts, <a name="l00158"></a>00158 <a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a> *inPts, <a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a> *newPts, <a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a> *pd, <a name="l00159"></a>00159 <a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a> *outPD, <span class="keywordtype">int</span> genTCoords, <a name="l00160"></a>00160 <a class="code" href="a00556.html" title="dynamic, self-adjusting array of float">vtkFloatArray</a> *newTCoords); <a name="l00161"></a>00161 <a name="l00162"></a>00162 <span class="keywordtype">void</span> GenerateLine(<a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210e69c3ea0b66a4036cbb0c6648abb252d">offset</a>, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> numGenPts, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> inCellId, <a name="l00163"></a>00163 <a class="code" href="a00245.html" title="represent and manipulate cell attribute data">vtkCellData</a> *cd, <a class="code" href="a00245.html" title="represent and manipulate cell attribute data">vtkCellData</a> *outCD, <a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a> *newLines); <a name="l00164"></a>00164 <a name="l00165"></a>00165 <span class="comment">//helper members</span> <a name="l00166"></a><a class="code" href="a01589.html#c05eae1976fb53240381e854cdcaf816">00166</a> <a class="code" href="a00556.html" title="dynamic, self-adjusting array of float">vtkFloatArray</a> *TCoordMap; <a name="l00167"></a>00167 <a name="l00168"></a>00168 <span class="keyword">private</span>: <a name="l00169"></a>00169 <a class="code" href="a01589.html" title="generate uniformly subdivided polylines from a set of input polyline using a vtkSpline...">vtkSplineFilter</a>(<span class="keyword">const</span> <a class="code" href="a01589.html" title="generate uniformly subdivided polylines from a set of input polyline using a vtkSpline...">vtkSplineFilter</a>&); <span class="comment">// Not implemented.</span> <a name="l00170"></a>00170 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01589.html" title="generate uniformly subdivided polylines from a set of input polyline using a vtkSpline...">vtkSplineFilter</a>&); <span class="comment">// Not implemented.</span> <a name="l00171"></a>00171 }; <a name="l00172"></a>00172 <a name="l00173"></a>00173 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:29 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>