vtk
Class vtkDataSet

java.lang.Object
  extended byvtk.vtkObjectBase
      extended byvtk.vtkObject
          extended byvtk.vtkDataObject
              extended byvtk.vtkDataSet
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
vtkImageData, vtkPointSet, vtkRectilinearGrid, vtkUniformGrid

public class vtkDataSet
extends vtkDataObject
implements java.io.Serializable

vtkDataSet - abstract class to specify dataset behavior. vtkDataSet is an abstract class that specifies an interface for dataset objects. vtkDataSet also provides methods to provide informations about the data, such as center, bounding box, and representative length. In vtk a dataset consists of a structure (geometry and topology) and attribute data. The structure is defined implicitly or explicitly as a collection of cells. The geometry of the structure is contained in point coordinates plus the cell interpolation functions. The topology of the dataset structure is defined by cell types and how the cells share their defining points. Attribute data in vtk is either point data (data at points) or cell data (data at cells). Typically filters operate on point data, but some may operate on cell data, both cell and point data, either one, or none. JavaBean wrapper for vtkDataSet object.

Author:
vtk2jbean Automatic JavaBean wrapper for VTK.
See Also:
vtkPointSet, vtkStructuredPoints, vtkStructuredGrid, vtkUnstructuredGrid, vtkRectilinearGrid, vtkPolyData, vtkPointData, vtkCellData, vtkDataObject, Serialized Form

Field Summary
protected  java.beans.PropertyChangeSupport changes
           
 
Fields inherited from class vtk.vtkObjectBase
vtkId
 
Constructor Summary
  vtkDataSet()
           
protected vtkDataSet(int dmy)
           
 
Method Summary
 int checkAttributes()
          This method checks to see if the cell and point attributes match the geometry.
 void computeBounds()
          Compute the data bounding box from data points.
 void copyStructure(vtkDataSet id0)
          Copy the geometric and topological structure of an object.
 void deepCopy(vtkDataObject id0)
          Shallow and Deep copy.
 int findPoint(double[] id0)
          Locate the closest point to the global coordinate x.
 int findPoint(double id0, double id1, double id2)
          Locate the closest point to the global coordinate x.
 int getActualMemorySize()
          Return the actual size of the data in kilobytes.
 double[] getBounds()
          Return a pointer to the geometry bounding box in the form (xmin,xmax, ymin,ymax, zmin,zmax).
 void getBounds(double[] id0)
          Return a pointer to the geometry bounding box in the form (xmin,xmax, ymin,ymax, zmin,zmax).
 vtkCell getCell(int id0)
          Get cell with cellId such that: 0 <= cellId < NumberOfCells.
 void getCell(int id0, vtkGenericCell id1)
          Get cell with cellId such that: 0 <= cellId < NumberOfCells.
 void getCellBounds(int id0, double[] id1)
          Get the bounds of the cell with cellId such that: 0 <= cellId < NumberOfCells.
 vtkCellData getCellData()
          return pointer to this dataset's point data THIS METHOD IS THREAD SAFE
 void getCellNeighbors(int id0, vtkIdList id1, vtkIdList id2)
          Topological inquiry to get all cells using list of points exclusive of cell specified (e.g., cellId).
 void getCellPoints(int id0, vtkIdList id1)
          Topological inquiry to get points defining cell.
 int getCellType(int id0)
          Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
 void getCellTypes(vtkCellTypes id0)
          Get a list of types of cells in a dataset.
 double[] getCenter()
          Get the center of the bounding box.
 void getCenter(double[] id0)
          Get the center of the bounding box.
 java.lang.String getClassName()
          Return the class name as a string.
 int getDataObjectType()
          Shallow and Deep copy.
 double getLength()
          Return the length of the diagonal of the bounding box.
 int getMaxCellSize()
          Convenience method returns largest cell size in dataset.
 int getMTime()
          Datasets are composite objects and need to check each part for MTime THIS METHOD IS THREAD SAFE
 int getNumberOfCells()
          Determine the number of cells composing the dataset.
 int getNumberOfPoints()
          Determine the number of points composing the dataset.
 double[] getPoint(int id0)
          Get point coordinates with ptId such that: 0 <= ptId < NumberOfPoints.
 void getPoint(int id0, double[] id1)
          Copy point coordinates into user provided array x[3] for specified point id.
 void getPointCells(int id0, vtkIdList id1)
          Topological inquiry to get cells using point.
 vtkPointData getPointData()
          return pointer to this dataset's point data THIS METHOD IS THREAD SAFE
 double[] getScalarRange()
          Convenience method to get the range of the scalar data (if there is any scalar data).
 void getScalarRange(double[] id0)
          Convenience method to get the range of the scalar data (if there is any scalar data).
 vtkDataSet getThisDataSet()
           
 void initialize()
          Restore data object to initial state, THIS METHOD IS NOT THREAD SAFE.
 int isA(java.lang.String id0)
          Return 1 if this class is the same type of (or a subclass of) the named class.
 void shallowCopy(vtkDataObject id0)
          Shallow and Deep copy.
 void squeeze()
          Reclaim any extra memory used to store data.
protected  void VTKCastInit()
           
 
Methods inherited from class vtk.vtkDataObject
addConsumer, copyInformation, copyTypeSpecificInformation, dataHasBeenGenerated, getConsumer, getDataReleased, getEstimatedMemorySize, getExtentTranslator, getExtentType, getFieldData, getGlobalReleaseDataFlag, getLocality, getMaximumNumberOfPieces, getNetReferenceCount, getNumberOfConsumers, getPipelineMTime, getReleaseDataFlag, getRequestExactExtent, getSource, getThisDataObject, getUpdateExtent, getUpdateGhostLevel, getUpdateNumberOfPieces, getUpdatePiece, getUpdateTime, getWholeExtent, globalReleaseDataFlagOff, globalReleaseDataFlagOn, isConsumer, prepareForNewData, propagateUpdateExtent, releaseData, releaseDataFlagOff, releaseDataFlagOn, removeConsumer, requestExactExtentOff, requestExactExtentOn, setExtentTranslator, setFieldData, setGlobalReleaseDataFlag, setLocality, setMaximumNumberOfPieces, setPipelineMTime, setReleaseDataFlag, setRequestExactExtent, setSource, setUpdateExtent, setUpdateExtent, setUpdateExtent, setUpdateExtent, setUpdateExtentToWholeExtent, setUpdateGhostLevel, setUpdateNumberOfPieces, setUpdatePiece, setWholeExtent, setWholeExtent, shouldIReleaseData, triggerAsynchronousUpdate, unRegister, update, updateData, updateInformation, 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
 
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

vtkDataSet

public vtkDataSet()

vtkDataSet

protected vtkDataSet(int dmy)
Method Detail

getThisDataSet

public vtkDataSet getThisDataSet()

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 vtkDataObject

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 vtkDataObject

copyStructure

public void copyStructure(vtkDataSet id0)
Copy the geometric and topological structure of an object. Note that the invoking object and the object pointed to by the parameter ds must be of the same type. THIS METHOD IS NOT THREAD SAFE.


getNumberOfPoints

public int getNumberOfPoints()
Determine the number of points composing the dataset. THIS METHOD IS THREAD SAFE


getNumberOfCells

public int getNumberOfCells()
Determine the number of cells composing the dataset. THIS METHOD IS THREAD SAFE


getPoint

public double[] getPoint(int id0)
Get point coordinates with ptId such that: 0 <= ptId < NumberOfPoints. THIS METHOD IS NOT THREAD SAFE.


getPoint

public void getPoint(int id0,
                     double[] id1)
Copy point coordinates into user provided array x[3] for specified point id. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED


getCell

public vtkCell getCell(int id0)
Get cell with cellId such that: 0 <= cellId < NumberOfCells. THIS METHOD IS NOT THREAD SAFE.


getCell

public void getCell(int id0,
                    vtkGenericCell id1)
Get cell with cellId such that: 0 <= cellId < NumberOfCells. This is a thread-safe alternative to the previous GetCell() method. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED


getCellBounds

public void getCellBounds(int id0,
                          double[] id1)
Get the bounds of the cell with cellId such that: 0 <= cellId < NumberOfCells. A subclass may be able to determine the bounds of cell without using an expensive GetCell() method. A default implementation is provided that actually uses a GetCell() call. This is to ensure the method is available to all datasets. Subclasses should override this method to provide an efficient implementation. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED


getCellType

public int getCellType(int id0)
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED


getCellTypes

public void getCellTypes(vtkCellTypes id0)
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


getCellPoints

public void getCellPoints(int id0,
                          vtkIdList id1)
Topological inquiry to get points defining cell. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED


getPointCells

public void getPointCells(int id0,
                          vtkIdList id1)
Topological inquiry to get cells using point. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED


getCellNeighbors

public void getCellNeighbors(int id0,
                             vtkIdList id1,
                             vtkIdList id2)
Topological inquiry to get all cells using list of points exclusive of cell specified (e.g., cellId). Note that the list consists of only cells that use ALL the points provided. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED


findPoint

public int findPoint(double id0,
                     double id1,
                     double id2)
Locate the closest point to the global coordinate x. Return the point id. If point id < 0; then no point found. (This may arise when point is outside of dataset.) THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED


findPoint

public int findPoint(double[] id0)
Locate the closest point to the global coordinate x. Return the point id. If point id < 0; then no point found. (This may arise when point is outside of dataset.) THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED


getMTime

public int getMTime()
Datasets are composite objects and need to check each part for MTime THIS METHOD IS THREAD SAFE

Overrides:
getMTime in class vtkDataObject

getCellData

public vtkCellData getCellData()
return pointer to this dataset's point data THIS METHOD IS THREAD SAFE


getPointData

public vtkPointData getPointData()
return pointer to this dataset's point data THIS METHOD IS THREAD SAFE


squeeze

public void squeeze()
Reclaim any extra memory used to store data. THIS METHOD IS NOT THREAD SAFE.


computeBounds

public void computeBounds()
Compute the data bounding box from data points. THIS METHOD IS NOT THREAD SAFE.


getBounds

public double[] getBounds()
Return a pointer to the geometry bounding box in the form (xmin,xmax, ymin,ymax, zmin,zmax). THIS METHOD IS NOT THREAD SAFE.


getBounds

public void getBounds(double[] id0)
Return a pointer to the geometry bounding box in the form (xmin,xmax, ymin,ymax, zmin,zmax). THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED


getCenter

public double[] getCenter()
Get the center of the bounding box. THIS METHOD IS NOT THREAD SAFE.


getCenter

public void getCenter(double[] id0)
Get the center of the bounding box. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED


getLength

public double getLength()
Return the length of the diagonal of the bounding box. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED


initialize

public void initialize()
Restore data object to initial state, THIS METHOD IS NOT THREAD SAFE.

Overrides:
initialize in class vtkDataObject

getScalarRange

public void getScalarRange(double[] id0)
Convenience method to get the range of the scalar data (if there is any scalar data). Returns the (min/max) range of combined point and cell data. If there are no point or cell scalars the method will return (0,1). Note: Update needs to be called to create the scalars. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED


getScalarRange

public double[] getScalarRange()
Convenience method to get the range of the scalar data (if there is any scalar data). THIS METHOD IS NOT THREAD SAFE.


getMaxCellSize

public int getMaxCellSize()
Convenience method returns largest cell size in dataset. This is generally used to allocate memory for supporting data structures. THIS METHOD IS THREAD SAFE


getActualMemorySize

public int getActualMemorySize()
Return the actual size of the data in kilobytes. This number is valid only after the pipeline has updated. The memory size returned is guaranteed to be greater than or equal to the memory required to represent the data (e.g., extra space in arrays, etc. are not included in the return value). THIS METHOD IS THREAD SAFE.

Overrides:
getActualMemorySize in class vtkDataObject

getDataObjectType

public int getDataObjectType()
Shallow and Deep copy.

Overrides:
getDataObjectType in class vtkDataObject

shallowCopy

public void shallowCopy(vtkDataObject id0)
Shallow and Deep copy.

Overrides:
shallowCopy in class vtkDataObject

deepCopy

public void deepCopy(vtkDataObject id0)
Shallow and Deep copy.

Overrides:
deepCopy in class vtkDataObject

checkAttributes

public int checkAttributes()
This method checks to see if the cell and point attributes match the geometry. Many filters will crash if the number of tupples in an array is less than the number of points/cells. This method returns 1 if there is a mismatch, and 0 if everything is ok. It prints an error if an array is too short, and a warning if an array is too long.


VTKCastInit

protected void VTKCastInit()
Overrides:
VTKCastInit in class vtkDataObject


Copyright © 2004 Sydney ViSLAB. All Rights Reserved.