File: vtkfiltering_vtkgenericdataset.html

package info (click to toggle)
freemat 4.2%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 141,800 kB
  • ctags: 14,082
  • sloc: ansic: 126,788; cpp: 62,046; python: 2,080; perl: 1,255; sh: 1,146; yacc: 1,019; lex: 239; makefile: 100
file content (151 lines) | stat: -rw-r--r-- 11,248 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>FreeMat: vtkGenericDataSet</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">FreeMat
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('vtkfiltering_vtkgenericdataset.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">vtkGenericDataSet </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Section: <a class="el" href="sec_vtkfiltering.html">Visualization Toolkit Filtering Classes</a> </p>
<h1><a class="anchor" id="Usage"></a>
Usage</h1>
<p>In VTK, spatial-temporal data is defined in terms of a dataset. The dataset consists of geometry (e.g., points), topology (e.g., cells), and attributes (e.g., scalars, vectors, etc.) vtkGenericDataSet is an abstract class defining this abstraction.</p>
<p>Since vtkGenericDataSet provides a general interface to manipulate data, algorithms that process it tend to be slower than those specialized for a particular data type. For this reason, there are concrete, non-abstract subclasses that represent and provide access to data more efficiently. Note that filters to process this dataset type are currently found in the VTK/GenericFiltering/ subdirectory.</p>
<p>Unlike the vtkDataSet class, vtkGenericDataSet provides a more flexible interface including support for iterators. vtkGenericDataSet is also designed to interface VTK to external simulation packages without the penalty of copying memory (see VTK/GenericFiltering/README.html) for more information. Thus vtkGenericDataSet plays a central role in the adaptor framework.</p>
<p>Please note that this class introduces the concepts of "boundary cells". This refers to the boundaries of a cell (e.g., face of a tetrahedron) which may in turn be represented as a cell. Boundary cells are derivative topological features of cells, and are therefore never explicitly represented in the dataset. Often in visualization algorithms, looping over boundaries (edges or faces) is employed, while the actual dataset cells may not traversed. Thus there are methods to loop over these boundary cells.</p>
<p>Finally, as a point of clarification, points are not the same as vertices. Vertices refer to points, and points specify a position is space. Vertices are a type of 0-D cell. Also, the concept of a DOFNode, which is where coefficients for higher-order cells are kept, is a new concept introduced by the adaptor framework (see vtkGenericAdaptorCell for more information).</p>
<p>To create an instance of class vtkGenericDataSet, simply invoke its constructor as follows </p>
<pre class="fragment">  obj = vtkGenericDataSet
</pre> <h1><a class="anchor" id="Methods"></a>
Methods</h1>
<p>The class vtkGenericDataSet has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, <code>obj</code> is an instance of the vtkGenericDataSet class. </p>
<ul>
<li>
<code>string = obj.GetClassName ()</code> - Standard VTK type and print macros.  </li>
<li>
<code>int = obj.IsA (string name)</code> - Standard VTK type and print macros.  </li>
<li>
<code>vtkGenericDataSet = obj.NewInstance ()</code> - Standard VTK type and print macros.  </li>
<li>
<code>vtkGenericDataSet = obj.SafeDownCast (vtkObject o)</code> - Standard VTK type and print macros.  </li>
<li>
<code>vtkIdType = obj.GetNumberOfPoints ()</code> - Return the number of points composing the dataset. See NewPointIterator() for more details. <dl class="section post"><dt>Postcondition:</dt><dd>positive_result: result&gt;=0  </dd></dl>
</li>
<li>
<code>vtkIdType = obj.GetNumberOfCells (int dim)</code> - Return the number of cells that explicitly define the dataset. See NewCellIterator() for more details. <dl class="section pre"><dt>Precondition:</dt><dd>valid_dim_range: (dim&gt;=-1) &amp;&amp; (dim&lt;=3) </dd></dl>
<dl class="section post"><dt>Postcondition:</dt><dd>positive_result: result&gt;=0  </dd></dl>
</li>
<li>
<code>int = obj.GetCellDimension ()</code> - Return -1 if the dataset is explicitly defined by cells of varying dimensions or if there are no cells. If the dataset is explicitly defined by cells of a unique dimension, return this dimension. <dl class="section post"><dt>Postcondition:</dt><dd>valid_range: (result&gt;=-1) &amp;&amp; (result&lt;=3)  </dd></dl>
</li>
<li>
<code>obj.GetCellTypes (vtkCellTypes types)</code> - Get a list of types of cells in a dataset. The list consists of an array of types (not necessarily in any order), with a single entry per type. For example a dataset 5 triangles, 3 lines, and 100 hexahedra would result a list of three entries, corresponding to the types VTK_TRIANGLE, VTK_LINE, and VTK_HEXAHEDRON. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED <dl class="section pre"><dt>Precondition:</dt><dd>types_exist: types!=0  </dd></dl>
</li>
<li>
<code>vtkGenericCellIterator = obj.NewCellIterator (int dim)</code> - Return an iterator to traverse cells of dimension `dim' (or all dimensions if -1) that explicitly define the dataset. For instance, it will return only tetrahedra if the mesh is defined by tetrahedra. If the mesh is composed of two parts, one with tetrahedra and another part with triangles, it will return both, but will not return the boundary edges and vertices of these cells. The user is responsible for deleting the iterator. <dl class="section pre"><dt>Precondition:</dt><dd>valid_dim_range: (dim&gt;=-1) &amp;&amp; (dim&lt;=3) </dd></dl>
<dl class="section post"><dt>Postcondition:</dt><dd>result_exists: result!=0  </dd></dl>
</li>
<li>
<code>vtkGenericCellIterator = obj.NewBoundaryIterator (int dim, int exteriorOnly)</code> - Return an iterator to traverse cell boundaries of dimension `dim' (or all dimensions if -1) of the dataset. If `exteriorOnly' is true, only the exterior cell boundaries of the dataset will be returned, otherwise it will return exterior and interior cell boundaries. The user is responsible for deleting the iterator. <dl class="section pre"><dt>Precondition:</dt><dd>valid_dim_range: (dim&gt;=-1) &amp;&amp; (dim&lt;=2) </dd></dl>
<dl class="section post"><dt>Postcondition:</dt><dd>result_exists: result!=0  </dd></dl>
</li>
<li>
<code>vtkGenericPointIterator = obj.NewPointIterator ()</code> - Return an iterator to traverse the points composing the dataset; they can be points that define a cell (corner points) or isolated points. The user is responsible for deleting the iterator. <dl class="section post"><dt>Postcondition:</dt><dd>result_exists: result!=0  </dd></dl>
</li>
<li>
<code>obj.FindPoint (double x[3], vtkGenericPointIterator p)</code> - Locate the closest point `p' to position `x' (global coordinates). <dl class="section pre"><dt>Precondition:</dt><dd>not_empty: GetNumberOfPoints()&gt;0 </dd>
<dd>
p_exists: p!=0  </dd></dl>
</li>
<li>
<code>long = obj.GetMTime ()</code> - Datasets are composite objects and need to check each part for their modified time.  </li>
<li>
<code>obj.ComputeBounds ()</code> - Compute the geometry bounding box.  </li>
<li>
<code>obj.GetBounds (double bounds[6])</code> - Return the geometry bounding box in global coordinates in the form (xmin,xmax, ymin,ymax, zmin,zmax) in the `bounds' array.  </li>
<li>
<code>obj.GetCenter (double center[3])</code> - Get the center of the bounding box in global coordinates.  </li>
<li>
<code>double = obj.GetLength ()</code> - Return the length of the diagonal of the bounding box. <dl class="section post"><dt>Postcondition:</dt><dd>positive_result: result&gt;=0  </dd></dl>
</li>
<li>
<code>vtkGenericAttributeCollection = obj.GetAttributes ()</code> - Get the collection of attributes associated with this dataset.  </li>
<li>
<code>vtkDataSetAttributes = obj.GetAttributes (int type)</code> - Set/Get a cell tessellator if cells must be tessellated during processing. <dl class="section pre"><dt>Precondition:</dt><dd>tessellator_exists: tessellator!=0  </dd></dl>
</li>
<li>
<code>obj.SetTessellator (vtkGenericCellTessellator tessellator)</code> - Set/Get a cell tessellator if cells must be tessellated during processing. <dl class="section pre"><dt>Precondition:</dt><dd>tessellator_exists: tessellator!=0  </dd></dl>
</li>
<li>
<code>vtkGenericCellTessellator = obj.GetTessellator ()</code> - Set/Get a cell tessellator if cells must be tessellated during processing. <dl class="section pre"><dt>Precondition:</dt><dd>tessellator_exists: tessellator!=0  </dd></dl>
</li>
<li>
<code>long = obj.GetActualMemorySize ()</code> - Actual size of the data in kilobytes; only valid after the pipeline has updated. It is guaranteed to be greater than or equal to the memory required to represent the data.  </li>
<li>
<code>int = obj.GetDataObjectType ()</code> - Return the type of data object.  </li>
<li>
<code>vtkIdType = obj.GetEstimatedSize ()</code> - Estimated size needed after tessellation (or special operation)  </li>
</ul>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="index.html">FreeMat Documentation</a></li><li class="navelem"><a class="el" href="sec_vtkfiltering.html">Visualization Toolkit Filtering Classes</a></li>
    <li class="footer">Generated on Thu Jul 25 2013 17:18:30 for FreeMat by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1.1 </li>
  </ul>
</div>
</body>
</html>