<!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/IO/vtkParticleReader.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/IO/vtkParticleReader.h</h1><a href="a03169.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: vtkParticleReader.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 __vtkParticleReader_h</span> <a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define __vtkParticleReader_h</span> <a name="l00038"></a>00038 <span class="preprocessor"></span> <a name="l00039"></a>00039 <span class="preprocessor">#include "<a class="code" href="a02331.html">vtkPolyDataAlgorithm.h</a>"</span> <a name="l00040"></a>00040 <a name="l00041"></a><a class="code" href="a03169.html#99280a3ed395250e6a9198ac32bb5d49">00041</a> <span class="preprocessor">#define VTK_FILE_BYTE_ORDER_BIG_ENDIAN 0</span> <a name="l00042"></a><a class="code" href="a03169.html#5d017e76bc7beb1d7df49b9d4e6e9a90">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN 1</span> <a name="l00043"></a>00043 <span class="preprocessor"></span> <a name="l00044"></a>00044 <a name="l00045"></a><a class="code" href="a01177.html">00045</a> <span class="keyword">class </span><a class="code" href="a02170.html#aab695c81fb47ab75c91e111e17cbe2c">VTK_IO_EXPORT</a> <a class="code" href="a01177.html" title="Read ASCII or binary particle data and (optionally) one scalar value associated with...">vtkParticleReader</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="l00046"></a>00046 { <a name="l00047"></a>00047 <span class="keyword">public</span>: <a name="l00048"></a>00048 <span class="keyword">static</span> <a class="code" href="a01177.html" title="Read ASCII or binary particle data and (optionally) one scalar value associated with...">vtkParticleReader</a> *<a class="code" href="a01261.html#cf785ac526132296ff652c636f713b5e">New</a>(); <a name="l00049"></a><a class="code" href="a01177.html#0a5942fbeaf4b9dfcf48aefa4acc6e09">00049</a> vtkTypeRevisionMacro(<a class="code" href="a01177.html" title="Read ASCII or binary particle data and (optionally) one scalar value associated with...">vtkParticleReader</a>,<a class="code" href="a01261.html" title="Superclass for algorithms that produce only polydata as output.">vtkPolyDataAlgorithm</a>); <a name="l00050"></a>00050 <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="l00051"></a>00051 <a name="l00053"></a>00053 <a name="l00054"></a>00054 vtkSetStringMacro(FileName); <a name="l00055"></a>00055 vtkGetStringMacro(FileName); <a name="l00057"></a>00057 <a name="l00059"></a>00059 <a name="l00070"></a>00070 <span class="keywordtype">void</span> SetDataByteOrderToBigEndian(); <a name="l00071"></a>00071 <span class="keywordtype">void</span> SetDataByteOrderToLittleEndian(); <a name="l00072"></a>00072 <span class="keywordtype">int</span> GetDataByteOrder(); <a name="l00073"></a>00073 <span class="keywordtype">void</span> SetDataByteOrder(<span class="keywordtype">int</span>); <a name="l00074"></a>00074 <span class="keyword">const</span> <span class="keywordtype">char</span> *GetDataByteOrderAsString(); <a name="l00076"></a>00076 <a name="l00078"></a>00078 <a name="l00080"></a>00080 vtkSetMacro(SwapBytes,<span class="keywordtype">int</span>); <a name="l00081"></a><a class="code" href="a01177.html#f60dae867b76687d71b04cc5a9ef7bf7">00081</a> <span class="keywordtype">int</span> GetSwapBytes() {<span class="keywordflow">return</span> this->SwapBytes;} <a name="l00082"></a>00082 vtkBooleanMacro(SwapBytes,<span class="keywordtype">int</span>); <a name="l00084"></a>00084 <a name="l00086"></a>00086 <a name="l00087"></a>00087 vtkSetMacro(HasScalar,<span class="keywordtype">int</span>); <a name="l00088"></a>00088 vtkGetMacro(HasScalar,<span class="keywordtype">int</span>); <a name="l00089"></a>00089 vtkBooleanMacro(HasScalar,<span class="keywordtype">int</span>); <a name="l00091"></a>00091 <a name="l00093"></a>00093 <a name="l00097"></a>00097 vtkSetClampMacro(FileType, <span class="keywordtype">int</span>, FILE_TYPE_IS_UNKNOWN, FILE_TYPE_IS_BINARY); <a name="l00098"></a>00098 vtkGetMacro(FileType, <span class="keywordtype">int</span>); <a name="l00099"></a><a class="code" href="a01177.html#f01b5377b9f2c7a5c20920cbdacbd7cb">00099</a> <span class="keywordtype">void</span> SetFileTypeToUnknown() {this->SetFileType(FILE_TYPE_IS_UNKNOWN);} <a name="l00100"></a><a class="code" href="a01177.html#7f4ad98135f28ee2a3bd281f4c8b0049">00100</a> <span class="keywordtype">void</span> SetFileTypeToText() {this->SetFileType(FILE_TYPE_IS_TEXT);} <a name="l00101"></a><a class="code" href="a01177.html#c35340dde337d29c6cf57f069ede779f">00101</a> <span class="keywordtype">void</span> SetFileTypeToBinary() {this->SetFileType(FILE_TYPE_IS_BINARY);} <a name="l00103"></a>00103 <a name="l00105"></a>00105 <a name="l00108"></a>00108 vtkSetClampMacro(DataType, <span class="keywordtype">int</span>, <a class="code" href="a02149.html#aa048913d336249efc600e3c5a144c42">VTK_FLOAT</a>, <a class="code" href="a02149.html#65081589ba940a5cf4aeb95b6be1f613">VTK_DOUBLE</a>); <a name="l00109"></a>00109 vtkGetMacro(DataType, <span class="keywordtype">int</span>); <a name="l00110"></a><a class="code" href="a01177.html#cacd6548d64eed067ff246875584e8fd">00110</a> <span class="keywordtype">void</span> SetDataTypeToFloat() {this->SetDataType(<a class="code" href="a02149.html#aa048913d336249efc600e3c5a144c42">VTK_FLOAT</a>);} <a name="l00111"></a><a class="code" href="a01177.html#c349b2d8bf0b533902bf490ebc8f51a4">00111</a> <span class="keywordtype">void</span> SetDataTypeToDouble() {this->SetDataType(<a class="code" href="a02149.html#65081589ba940a5cf4aeb95b6be1f613">VTK_DOUBLE</a>);} <a name="l00113"></a>00113 <a name="l00114"></a>00114 <a name="l00115"></a>00115 <span class="keyword">protected</span>: <a name="l00116"></a>00116 <a class="code" href="a01177.html" title="Read ASCII or binary particle data and (optionally) one scalar value associated with...">vtkParticleReader</a>(); <a name="l00117"></a>00117 ~<a class="code" href="a01177.html" title="Read ASCII or binary particle data and (optionally) one scalar value associated with...">vtkParticleReader</a>(); <a name="l00118"></a>00118 <a name="l00119"></a>00119 <span class="keywordtype">void</span> OpenFile(); <a name="l00120"></a>00120 <a name="l00121"></a><a class="code" href="a01177.html#477a00b8049a2359edd9fa91896e6133">00121</a> <span class="keywordtype">char</span> *FileName; <a name="l00122"></a><a class="code" href="a01177.html#1458a878f3d30390111974e7c1503075">00122</a> ifstream *File; <a name="l00123"></a>00123 <a name="l00124"></a>00124 <span class="keywordtype">int</span> <a class="code" href="a01261.html#cfed421fc23ff5262acc1c49053c75e1">RequestInformation</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="l00125"></a>00125 <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="l00126"></a>00126 <a name="l00128"></a>00128 <a name="l00136"></a>00136 <span class="keywordtype">int</span> ProduceOutputFromTextFileDouble(<a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> *outputVector); <a name="l00137"></a>00137 <span class="keywordtype">int</span> ProduceOutputFromTextFileFloat(<a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> *outputVector); <a name="l00139"></a>00139 <a name="l00141"></a>00141 <a name="l00143"></a>00143 <span class="keywordtype">int</span> ProduceOutputFromBinaryFileDouble(<a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> *outputVector); <a name="l00144"></a>00144 <span class="keywordtype">int</span> ProduceOutputFromBinaryFileFloat(<a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> *outputVector); <a name="l00146"></a>00146 <a name="l00156"></a>00156 <span class="keywordtype">int</span> DetermineFileType(); <a name="l00157"></a>00157 <a name="l00159"></a>00159 <span class="keywordtype">void</span> DoProgressUpdate( <span class="keywordtype">size_t</span> & bytesRead, <span class="keywordtype">size_t</span> & fileLength ); <a name="l00160"></a>00160 <a name="l00161"></a>00161 <span class="comment">//BTX</span> <a name="l00163"></a>00163 <span class="comment"></span> <a name="l00167"></a><a class="code" href="a01177.html#9ee52cff2be876691b431f0e595335c6b592d9c13c34b51188c70aca4d7df34b">00167</a> <span class="keyword">enum</span> <a class="code" href="a01177.html#9ee52cff2be876691b431f0e595335c6">FILE_TYPE</a> { FILE_TYPE_IS_UNKNOWN = 0, <a name="l00168"></a><a class="code" href="a01177.html#9ee52cff2be876691b431f0e595335c65d70f5d8d706ea593806af238eac51d9">00168</a> FILE_TYPE_IS_TEXT, FILE_TYPE_IS_BINARY }; <a name="l00169"></a>00169 <span class="comment">//ETX</span> <a name="l00171"></a>00171 <span class="comment"></span> <a name="l00172"></a><a class="code" href="a01177.html#a1099821029add062c9d383d929e0eab">00172</a> <span class="keywordtype">int</span> HasScalar; <a name="l00174"></a>00174 <a name="l00175"></a><a class="code" href="a01177.html#8b71d3dfff80fc37e698876eb65fe8f0">00175</a> <span class="keywordtype">int</span> FileType; <a name="l00176"></a>00176 <span class="comment">// Description:</span> <a name="l00177"></a>00177 <span class="comment">// Used to specify the data type.</span> <a name="l00178"></a><a class="code" href="a01177.html#dd457e5522afd8a662d4c616a059da11">00178</a> <span class="keywordtype">int</span> DataType; <a name="l00180"></a>00180 <a name="l00182"></a>00182 <a name="l00183"></a><a class="code" href="a01177.html#11e60756dc0387faed4be58ea401a2f3">00183</a> <span class="keywordtype">size_t</span> Alliquot; <a name="l00184"></a>00184 <span class="comment">// Description:</span> <a name="l00185"></a>00185 <span class="comment">// Count of the number of alliquots processed.</span> <a name="l00186"></a><a class="code" href="a01177.html#0d97229e3274ed861060cb9682b0af62">00186</a> <span class="keywordtype">size_t</span> Count; <a name="l00188"></a>00188 <a name="l00189"></a><a class="code" href="a01177.html#3a5f2aa6beaf7bc5470e9736a0fcae38">00189</a> <span class="keywordtype">int</span> SwapBytes; <a name="l00190"></a><a class="code" href="a01177.html#72085ed7e5d4e9e944000ade8621333b">00190</a> <span class="keywordtype">size_t</span> NumberOfPoints; <a name="l00191"></a>00191 <a name="l00192"></a>00192 <span class="keyword">private</span>: <a name="l00193"></a>00193 <a class="code" href="a01177.html" title="Read ASCII or binary particle data and (optionally) one scalar value associated with...">vtkParticleReader</a>(<span class="keyword">const</span> <a class="code" href="a01177.html" title="Read ASCII or binary particle data and (optionally) one scalar value associated with...">vtkParticleReader</a>&); <span class="comment">// Not implemented.</span> <a name="l00194"></a>00194 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01177.html" title="Read ASCII or binary particle data and (optionally) one scalar value associated with...">vtkParticleReader</a>&); <span class="comment">// Not implemented.</span> <a name="l00195"></a>00195 }; <a name="l00196"></a>00196 <a name="l00197"></a>00197 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:40 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>