vtk
Class vtkFieldData

java.lang.Object
  extended byvtk.vtkObjectBase
      extended byvtk.vtkObject
          extended byvtk.vtkFieldData
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
vtkDataSetAttributes

public class vtkFieldData
extends vtkObject
implements java.io.Serializable

vtkFieldData - represent and manipulate fields of data. vtkFieldData represents and manipulates fields of data. The model of a field is a m x n matrix of data values, where m is the number of tuples, and n is the number of components. (A tuple is a row of n components in the matrix.) The field is assumed to be composed of a set of one or more data arrays, where the data in the arrays are of different types (e.g., int, double, char, etc.), and there may be variable numbers of components in each array. Note that each data array is assumed to be "m" in length (i.e., number of tuples), which typically corresponds to the number of points or cells in a dataset. Also, each data array must have a character-string name. (This is used to manipulate data.) There are two ways of manipulating and interfacing to fields. You can do it generically by manipulating components/tuples via a double-type data exchange, or you can do it by grabbing the arrays and manipulating them directly. The former is simpler but performs type conversion, which is bad if your data has non-castable types like (void) pointers, or you lose information as a result of the cast. The, more efficient method means managing each array in the field. Using this method you can create faster, more efficient algorithms that do not lose information. JavaBean wrapper for vtkFieldData object.

Author:
vtk2jbean Automatic JavaBean wrapper for VTK.
See Also:
vtkDataArray, vtkAttribueData, vtkPointData, Serialized Form

Field Summary
protected  java.beans.PropertyChangeSupport changes
           
 
Fields inherited from class vtk.vtkObjectBase
vtkId
 
Constructor Summary
  vtkFieldData()
           
protected vtkFieldData(int dmy)
           
 
Method Summary
 int addArray(vtkDataArray id0)
          Add an array to the array list.
 int allocate(int id0, int id1)
          Allocate data for each array.
 void allocateArrays(int id0)
          AllocateOfArrays actually sets the number of vtkDataArray pointers in the vtkFieldData object, not the number of used pointers (arrays).
 void copyAllOff()
          Turn off copying of all data.
 void copyAllOn()
          Turn on copying of all data.
 void copyFieldOff(java.lang.String id0)
          Turn on copying of all data.
 void copyFieldOn(java.lang.String id0)
          Turn on/off the copying of the field specified by name.
 void copyStructure(vtkFieldData id0)
          Copy data array structure from a given field.
 void deepCopy(vtkFieldData id0)
          Copy a field by creating new data arrays (i.e., duplicate storage).
 int getActualMemorySize()
          Return the memory in kilobytes consumed by this field data.
 vtkDataArray getArray(int id0)
          Return the ith array in the field.
 vtkDataArray getArray(java.lang.String id0)
           
 java.lang.String getArrayName(int id0)
          Pass entire arrays of input data through to output.
 java.lang.String getClassName()
          Return the class name as a string.
 double getComponent(int id0, int id1)
          Get the component value at the ith tuple (or row) and jth component (or column).
 void getField(vtkIdList id0, vtkFieldData id1)
          Get a field from a list of ids.
 int getMTime()
          Check object's components for modified times.
 int getNumberOfArrays()
          Get the number of arrays of data available.
 int getNumberOfComponents()
          Get the number of components in the field.
 int getNumberOfTuples()
          Get the number of tuples in the field.
 vtkFieldData getThisFieldData()
           
 void initialize()
          Release all data but do not delete object.
 void insertComponent(int id0, int id1, double id2)
          Insert the component value at the ith tuple (or row) and jth component (or column).
 int isA(java.lang.String id0)
          Return 1 if this class is the same type of (or a subclass of) the named class.
 void passData(vtkFieldData id0)
          Pass entire arrays of input data through to output.
 void removeArray(java.lang.String id0)
          Return the ith array in the field.
 void reset()
          Resets each data array in the field (Reset() does not release memory but it makes the arrays look like they are empty.)
 void setComponent(int id0, int id1, double id2)
          Set the component value at the ith tuple (or row) and jth component (or column).
 void setNumberOfTuples(int id0)
          Set the number of tuples for each data array in the field.
 void shallowCopy(vtkFieldData id0)
          Copy a field by reference counting the data arrays.
 void squeeze()
          Squeezes each data array in the field (Squeeze() reclaims unused memory.)
protected  void VTKCastInit()
           
 void VTKInit()
           
 
Methods inherited from class vtk.vtkObject
AddObserver, breakOnError, debugOff, debugOn, getDebug, getGlobalWarningDisplay, getThisObject, globalWarningDisplayOff, globalWarningDisplayOn, hasObserver, hasObserver, invokeEvent, invokeEvent, modified, Print, PrintRevisions, register, removeObserver, removeObservers, removeObservers, setDebug, setGlobalWarningDisplay, unRegister
 
Methods inherited from class vtk.vtkObjectBase
addPropertyChangeListener, finalize, getReferenceCount, getThisObjectBase, isTypeOf, removePropertyChangeListener, setReferenceCount, VTKDelete
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

changes

protected java.beans.PropertyChangeSupport changes
Constructor Detail

vtkFieldData

public vtkFieldData()

vtkFieldData

protected vtkFieldData(int dmy)
Method Detail

getThisFieldData

public vtkFieldData getThisFieldData()

getClassName

public java.lang.String getClassName()
Description copied from class: vtkObjectBase
Return the class name as a string. This method is defined in all subclasses of vtkObjectBase with the vtkTypeRevisionMacro found in vtkSetGet.h.

Overrides:
getClassName in class vtkObject

isA

public int isA(java.lang.String id0)
Description copied from class: vtkObjectBase
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Overrides:
isA in class vtkObject

initialize

public void initialize()
Release all data but do not delete object. Also, clear the copy flags.


allocate

public int allocate(int id0,
                    int id1)
Allocate data for each array. Note that ext is no longer used.


copyStructure

public void copyStructure(vtkFieldData id0)
Copy data array structure from a given field. The same arrays will exist with the same types, but will contain nothing in the copy.


allocateArrays

public void allocateArrays(int id0)
AllocateOfArrays actually sets the number of vtkDataArray pointers in the vtkFieldData object, not the number of used pointers (arrays). Adding more arrays will cause the object to dynamically adjust the number of pointers if it needs to extend. Although AllocateArrays can be used if the number of arrays which will be added is known, it can be omitted with a small computation cost.


getNumberOfArrays

public int getNumberOfArrays()
Get the number of arrays of data available. This does not include NULL array pointers therefore after fd->AllocateArray(n); nArrays = GetNumberOfArrays() nArrays is not necessarily equal to n.


addArray

public int addArray(vtkDataArray id0)
Add an array to the array list. If an array with the same name already exists - then the added array will replace it.


removeArray

public void removeArray(java.lang.String id0)
Return the ith array in the field. A NULL is returned if the index i is out of range.


getArray

public vtkDataArray getArray(int id0)
Return the ith array in the field. A NULL is returned if the index i is out of range.


getArray

public vtkDataArray getArray(java.lang.String id0)

getArrayName

public java.lang.String getArrayName(int id0)
Pass entire arrays of input data through to output. Obey the "copy" flags.


passData

public void passData(vtkFieldData id0)
Pass entire arrays of input data through to output. Obey the "copy" flags.


copyFieldOn

public void copyFieldOn(java.lang.String id0)
Turn on/off the copying of the field specified by name. During the copying/passing, the following rules are followed for each array: 1. If the copy flag for an array is set (on or off), it is applied This overrides rule 2. 2. If CopyAllOn is set, copy the array. If CopyAllOff is set, do not copy the array


copyFieldOff

public void copyFieldOff(java.lang.String id0)
Turn on copying of all data. During the copying/passing, the following rules are followed for each array: 1. If the copy flag for an array is set (on or off), it is applied This overrides rule 2. 2. If CopyAllOn is set, copy the array. If CopyAllOff is set, do not copy the array


copyAllOn

public void copyAllOn()
Turn on copying of all data. During the copying/passing, the following rules are followed for each array: 1. If the copy flag for an array is set (on or off), it is applied This overrides rule 2. 2. If CopyAllOn is set, copy the array. If CopyAllOff is set, do not copy the array


copyAllOff

public void copyAllOff()
Turn off copying of all data. During the copying/passing, the following rules are followed for each array: 1. If the copy flag for an array is set (on or off), it is applied This overrides rule 2. 2. If CopyAllOn is set, copy the array. If CopyAllOff is set, do not copy the array


deepCopy

public void deepCopy(vtkFieldData id0)
Copy a field by creating new data arrays (i.e., duplicate storage).


shallowCopy

public void shallowCopy(vtkFieldData id0)
Copy a field by reference counting the data arrays.


squeeze

public void squeeze()
Squeezes each data array in the field (Squeeze() reclaims unused memory.)


reset

public void reset()
Resets each data array in the field (Reset() does not release memory but it makes the arrays look like they are empty.)


getActualMemorySize

public int getActualMemorySize()
Return the memory in kilobytes consumed by this field data. 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.


getMTime

public int getMTime()
Check object's components for modified times.

Overrides:
getMTime in class vtkObject

getField

public void getField(vtkIdList id0,
                     vtkFieldData id1)
Get a field from a list of ids. Supplied field f should have same types and number of data arrays as this one (i.e., like CopyStructure() creates). This method should not be used if the instance is from a subclass of vtkFieldData (vtkPointData or vtkCellData). This is because in those cases, the attribute data is stored with the other fields and will cause the method to behave in an unexpected way.


getNumberOfComponents

public int getNumberOfComponents()
Get the number of components in the field. This is determined by adding up the components in each non-NULL array. This method should not be used if the instance is from a subclass of vtkFieldData (vtkPointData or vtkCellData). This is because in those cases, the attribute data is stored with the other fields and will cause the method to behave in an unexpected way.


getNumberOfTuples

public int getNumberOfTuples()
Get the number of tuples in the field. Note: some fields have arrays with different numbers of tuples; this method returns the number of tuples in the first array. Mixed-length arrays may have to be treated specially. This method should not be used if the instance is from a subclass of vtkFieldData (vtkPointData or vtkCellData). This is because in those cases, the attribute data is stored with the other fields and will cause the method to behave in an unexpected way.


setNumberOfTuples

public void setNumberOfTuples(int id0)
Set the number of tuples for each data array in the field. This method should not be used if the instance is from a subclass of vtkFieldData (vtkPointData or vtkCellData). This is because in those cases, the attribute data is stored with the other fields and will cause the method to behave in an unexpected way.


getComponent

public double getComponent(int id0,
                           int id1)
Get the component value at the ith tuple (or row) and jth component (or column). This method should not be used if the instance is from a subclass of vtkFieldData (vtkPointData or vtkCellData). This is because in those cases, the attribute data is stored with the other fields and will cause the method to behave in an unexpected way.


setComponent

public void setComponent(int id0,
                         int id1,
                         double id2)
Set the component value at the ith tuple (or row) and jth component (or column). Range checking is not performed, so set the object up properly before invoking. This method should not be used if the instance is from a subclass of vtkFieldData (vtkPointData or vtkCellData). This is because in those cases, the attribute data is stored with the other fields and will cause the method to behave in an unexpected way.


insertComponent

public void insertComponent(int id0,
                            int id1,
                            double id2)
Insert the component value at the ith tuple (or row) and jth component (or column). Range checking is performed and memory allocated as necessary o hold data. This method should not be used if the instance is from a subclass of vtkFieldData (vtkPointData or vtkCellData). This is because in those cases, the attribute data is stored with the other fields and will cause the method to behave in an unexpected way.


VTKInit

public void VTKInit()
Overrides:
VTKInit in class vtkObject

VTKCastInit

protected void VTKCastInit()
Overrides:
VTKCastInit in class vtkObject


Copyright © 2004 Sydney ViSLAB. All Rights Reserved.