File: vtkdataarray.mdc

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 (312 lines) | stat: -rw-r--r-- 15,957 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312

 Usage

vtkDataArray is an abstract superclass for data array
objects containing numeric data. It extends the API defined
in vtkAbstractArray. vtkDataArray is an abstract superclass
for data array objects. This class defines an API that all
array objects must support. Note that the concrete
subclasses of this class represent data in native form
(char, int, etc.) and often have specialized more efficient
methods for operating on this data (for example, getting
pointers to data or getting/inserting data in native form).
Subclasses of vtkDataArray are assumed to contain data whose
components are meaningful when cast to and from double.
To create an instance of class vtkDataArray, simply invoke
its constructor as follows

    obj = vtkDataArray



 Methods

The class vtkDataArray 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, obj is an instance of
the vtkDataArray class.

* string = obj.GetClassName ()
* int = obj.IsA (string name)
* vtkDataArray = obj.NewInstance ()
* vtkDataArray = obj.SafeDownCast (vtkObject o)
* int = obj.IsNumeric () - Return the size, in bytes, of the
  lowest-level element of an array. For vtkDataArray and
  subclasses this is the size of the data type.
* int = obj.GetElementComponentSize () - Set the tuple at
  the ith location using the jth tuple in the source array.
  This method assumes that the two arrays have the same type
  and structure. Note that range checking and memory
  allocation is not performed; use in conjunction with
  SetNumberOfTuples() to allocate space.
* obj.SetTuple (vtkIdType i, vtkIdType j, vtkAbstractArray
  source) - Set the tuple at the ith location using the jth
  tuple in the source array. This method assumes that the
  two arrays have the same type and structure. Note that
  range checking and memory allocation is not performed; use
  in conjunction with SetNumberOfTuples() to allocate space.
* obj.InsertTuple (vtkIdType i, vtkIdType j,
  vtkAbstractArray source) - Insert the jth tuple in the
  source array, at ith location in this array. Note that
  memory allocation is performed as necessary to hold the
  data. This pure virtual function is redeclared here to
  avoid declaration hidden warnings.
* vtkIdType = obj.InsertNextTuple (vtkIdType j,
  vtkAbstractArray source) - Insert the jth tuple in the
  source array, at the end in this array. Note that memory
  allocation is performed as necessary to hold the data.
  Returns the location at which the data was inserted. This
  pure virtual function is redeclared here to avoid
  declaration hidden warnings.
* obj.GetTuples (vtkIdList ptIds, vtkAbstractArray output) -
  Given a list of point ids, return an array of tuples. You
  must insure that the output array has been previously
  allocated with enough space to hold the data.
* obj.GetTuples (vtkIdType p1, vtkIdType p2,
  vtkAbstractArray output) - Get the tuples for the range of
  points ids specified (i.e., p1->p2 inclusive). You must
  insure that the output array has been previously allocated
  with enough space to hold the data.
* obj.InterpolateTuple (vtkIdType i, vtkIdList ptIndices,
  vtkAbstractArray source, double weights) - Set the ith
  tuple in this array as the interpolated tuple value, given
  the ptIndices in the source array and associated
  interpolation weights. This method assumes that the two
  arrays are of the same type and strcuture.
* obj.InterpolateTuple (vtkIdType i, vtkIdType id1,
  vtkAbstractArray source1, vtkIdType id2, vtkAbstractArray
  source2, double t)
* obj.GetTuple (vtkIdType i, double tuple) - Get the data
  tuple at ith location by filling in a user-provided array,
  Make sure that your array is large enough to hold the
  NumberOfComponents amount of data being returned.
* double = obj.GetTuple1 (vtkIdType i) - These methods are
  included as convenience for the wrappers. GetTuple() and
  SetTuple() which return/take arrays can not be used from
  wrapped languages. These methods can be used instead.
* double = obj.GetTuple2 (vtkIdType i) - These methods are
  included as convenience for the wrappers. GetTuple() and
  SetTuple() which return/take arrays can not be used from
  wrapped languages. These methods can be used instead.
* double = obj.GetTuple3 (vtkIdType i) - These methods are
  included as convenience for the wrappers. GetTuple() and
  SetTuple() which return/take arrays can not be used from
  wrapped languages. These methods can be used instead.
* double = obj.GetTuple4 (vtkIdType i) - These methods are
  included as convenience for the wrappers. GetTuple() and
  SetTuple() which return/take arrays can not be used from
  wrapped languages. These methods can be used instead.
* double = obj.GetTuple9 (vtkIdType i) - These methods are
  included as convenience for the wrappers. GetTuple() and
  SetTuple() which return/take arrays can not be used from
  wrapped languages. These methods can be used instead.
* obj.SetTuple (vtkIdType i, float tuple) - Set the data
  tuple at ith location. Note that range checking or memory
  allocation is not performed; use this method in
  conjunction with SetNumberOfTuples() to allocate space.
* obj.SetTuple (vtkIdType i, double tuple) - Set the data
  tuple at ith location. Note that range checking or memory
  allocation is not performed; use this method in
  conjunction with SetNumberOfTuples() to allocate space.
* obj.SetTuple1 (vtkIdType i, double value) - These methods
  are included as convenience for the wrappers. GetTuple()
  and SetTuple() which return/take arrays can not be used
  from wrapped languages. These methods can be used instead.
* obj.SetTuple2 (vtkIdType i, double val0, double val1) -
  These methods are included as convenience for the
  wrappers. GetTuple() and SetTuple() which return/take
  arrays can not be used from wrapped languages. These
  methods can be used instead.
* obj.SetTuple3 (vtkIdType i, double val0, double val1,
  double val2) - These methods are included as convenience
  for the wrappers. GetTuple() and SetTuple() which return/
  take arrays can not be used from wrapped languages. These
  methods can be used instead.
* obj.SetTuple4 (vtkIdType i, double val0, double val1,
  double val2, double val3) - These methods are included as
  convenience for the wrappers. GetTuple() and SetTuple()
  which return/take arrays can not be used from wrapped
  languages. These methods can be used instead.
* obj.SetTuple9 (vtkIdType i, double val0, double val1,
  double val2, double val3, double val4, double val5, double
  val6, double val7, double val8) - These methods are
  included as convenience for the wrappers. GetTuple() and
  SetTuple() which return/take arrays can not be used from
  wrapped languages. These methods can be used instead.
* obj.InsertTuple (vtkIdType i, float tuple) - Insert the
  data tuple at ith location. Note that memory allocation is
  performed as necessary to hold the data.
* obj.InsertTuple (vtkIdType i, double tuple) - Insert the
  data tuple at ith location. Note that memory allocation is
  performed as necessary to hold the data.
* obj.InsertTuple1 (vtkIdType i, double value) - These
  methods are included as convenience for the wrappers.
  InsertTuple() which takes arrays can not be used from
  wrapped languages. These methods can be used instead.
* obj.InsertTuple2 (vtkIdType i, double val0, double val1) -
  These methods are included as convenience for the
  wrappers. InsertTuple() which takes arrays can not be used
  from wrapped languages. These methods can be used instead.
* obj.InsertTuple3 (vtkIdType i, double val0, double val1,
  double val2) - These methods are included as convenience
  for the wrappers. InsertTuple() which takes arrays can not
  be used from wrapped languages. These methods can be used
  instead.
* obj.InsertTuple4 (vtkIdType i, double val0, double val1,
  double val2, double val3) - These methods are included as
  convenience for the wrappers. InsertTuple() which takes
  arrays can not be used from wrapped languages. These
  methods can be used instead.
* obj.InsertTuple9 (vtkIdType i, double val0, double val1,
  double val2, double val3, double val4, double val5, double
  val6, double val7, double val8) - These methods are
  included as convenience for the wrappers. InsertTuple()
  which takes arrays can not be used from wrapped languages.
  These methods can be used instead.
* vtkIdType = obj.InsertNextTuple (float tuple) - Insert the
  data tuple at the end of the array and return the location
  at which the data was inserted. Memory is allocated as
  necessary to hold the data.
* vtkIdType = obj.InsertNextTuple (double tuple) - Insert
  the data tuple at the end of the array and return the
  location at which the data was inserted. Memory is
  allocated as necessary to hold the data.
* obj.InsertNextTuple1 (double value) - These methods are
  included as convenience for the wrappers. InsertTuple()
  which takes arrays can not be used from wrapped languages.
  These methods can be used instead.
* obj.InsertNextTuple2 (double val0, double val1) - These
  methods are included as convenience for the wrappers.
  InsertTuple() which takes arrays can not be used from
  wrapped languages. These methods can be used instead.
* obj.InsertNextTuple3 (double val0, double val1, double
  val2) - These methods are included as convenience for the
  wrappers. InsertTuple() which takes arrays can not be used
  from wrapped languages. These methods can be used instead.
* obj.InsertNextTuple4 (double val0, double val1, double
  val2, double val3) - These methods are included as
  convenience for the wrappers. InsertTuple() which takes
  arrays can not be used from wrapped languages. These
  methods can be used instead.
* obj.InsertNextTuple9 (double val0, double val1, double
  val2, double val3, double val4, double val5, double val6,
  double val7, double val8) - These methods are included as
  convenience for the wrappers. InsertTuple() which takes
  arrays can not be used from wrapped languages. These
  methods can be used instead.
* obj.RemoveTuple (vtkIdType id) - These methods remove
  tuples from the data array. They shift data and resize
  array, so the data array is still valid after this
  operation. Note, this operation is fairly slow.
* obj.RemoveFirstTuple () - These methods remove tuples from
  the data array. They shift data and resize array, so the
  data array is still valid after this operation. Note, this
  operation is fairly slow.
* obj.RemoveLastTuple () - These methods remove tuples from
  the data array. They shift data and resize array, so the
  data array is still valid after this operation. Note, this
  operation is fairly slow.
* double = obj.GetComponent (vtkIdType i, int j) - Return
  the data component at the ith tuple and jth component
  location. Note that i is less than NumberOfTuples and j is
  less than NumberOfComponents.
* obj.SetComponent (vtkIdType i, int j, double c) - Set the
  data component at the ith tuple and jth component
  location. Note that i is less than NumberOfTuples and j is
  less than NumberOfComponents. Make sure enough memory has
  been allocated (use SetNumberOfTuples() and
  SetNumberOfComponents()).
* obj.InsertComponent (vtkIdType i, int j, double c) -
  Insert the data component at ith tuple and jth component
  location. Note that memory allocation is performed as
  necessary to hold the data.
* obj.GetData (vtkIdType tupleMin, vtkIdType tupleMax, int
  compMin, int compMax, vtkDoubleArray data) - Get the data
  as a double array in the range (tupleMin,tupleMax) and
  (compMin, compMax). The resulting double array consists of
  all data in the tuple range specified and only the
  component range specified. This process typically requires
  casting the data from native form into doubleing point
  values. This method is provided as a convenience for data
  exchange, and is not very fast.
* obj.DeepCopy (vtkAbstractArray aa) - Deep copy of data.
  Copies data from different data arrays even if they are
  different types (using doubleing-point exchange).
* obj.DeepCopy (vtkDataArray da) - Deep copy of data. Copies
  data from different data arrays even if they are different
  types (using doubleing-point exchange).
* obj.FillComponent (int j, double c) - Fill a component of
  a data array with a specified value. This method sets the
  specified component to specified value for all tuples in
  the data array. This methods can be used to initialize or
  reinitialize a single component of a multi-component
  array.
* obj.CopyComponent (int j, vtkDataArray from, int
  fromComponent) - Copy a component from one data array into
  a component on this data array. This method copies the
  specified component ("fromComponent") from the specified
  data array ("from") to the specified component ("j") over
  all the tuples in this data array. This method can be used
  to extract a component (column) from one data array and
  paste that data into a component on this data array.
* long = obj.GetActualMemorySize () - Return the memory in
  kilobytes consumed by this data array. Used to support
  streaming and reading/writing data. The value returned is
  guaranteed to be greater than or equal to the memory
  required to actually represent the data represented by
  this object. The information returned is valid only after
  the pipeline has been updated.
* obj.CreateDefaultLookupTable () - Create default lookup
  table. Generally used to create one when none is
  available.
* obj.SetLookupTable (vtkLookupTable lut) - Set/get the
  lookup table associated with this scalar data, if any.
* vtkLookupTable = obj.GetLookupTable () - Set/get the
  lookup table associated with this scalar data, if any.
* obj.GetRange (double range[2], int comp) - Return the
  range of the array values for the given component. Range
  is copied into the array provided. If comp is equal to -1,
  it returns the range of the magnitude (if the number of
  components is equal to 1 it still returns the range of
  component 0).
* double = obj.GetRange (int comp) - Return the range of the
  array values for the 0th component. Range is copied into
  the array provided.
* double = obj.GetRange () - Return the range of the array
  values for the 0th component. Range is copied into the
  array provided.
* obj.GetRange (double range[2]) - These methods return the
  Min and Max possible range of the native data type. For
  example if a vtkScalars consists of unsigned char data
  these will return (0,255).
* obj.GetDataTypeRange (double range[2]) - These methods
  return the Min and Max possible range of the native data
  type. For example if a vtkScalars consists of unsigned
  char data these will return (0,255).
* double = obj.GetDataTypeMin () - These methods return the
  Min and Max possible range of the native data type. For
  example if a vtkScalars consists of unsigned char data
  these will return (0,255).
* double = obj.GetDataTypeMax () - These methods return the
  Min and Max possible range of the native data type. For
  example if a vtkScalars consists of unsigned char data
  these will return (0,255).
* double = obj.GetMaxNorm () - Return the maximum norm for
  the tuples. Note that the max. is computed everytime
  GetMaxNorm is called.
* int = obj.CopyInformation (vtkInformation infoFrom, int
  deep) - Copy information instance. Arrays use information
  objects in a variety of ways. It is important to have
  flexibility in this regard because certain keys should not
  be coppied, while others must be. NOTE: Up to the
  implmeneter to make sure that keys not inteneded to be
  coppied are excluded here.


* FreeMat_Documentation
* Visualization_Toolkit_Common_Classes
* Generated on Thu Jul 25 2013 17:18:30 for FreeMat by
  doxygen_ 1.8.1.1