vtk
Class vtkQuadricClustering

java.lang.Object
  extended byvtk.vtkObjectBase
      extended byvtk.vtkObject
          extended byvtk.vtkProcessObject
              extended byvtk.vtkSource
                  extended byvtk.vtkPolyDataSource
                      extended byvtk.vtkPolyDataToPolyDataFilter
                          extended byvtk.vtkQuadricClustering
All Implemented Interfaces:
java.io.Serializable

public class vtkQuadricClustering
extends vtkPolyDataToPolyDataFilter
implements java.io.Serializable

vtkQuadricClustering - reduce the number of triangles in a mesh. vtkQuadricClustering is a filter to reduce the number of triangles in a triangle mesh, forming a good approximation to the original geometry. The input to vtkQuadricClustering is a vtkPolyData object, and all types of polygonal data are handled. The algorithm used is the one described by Peter Lindstrom in his Siggraph 2000 paper, "Out-of-Core Simplification of Large Polygonal Models." The general approach of the algorithm is to cluster vertices in a uniform binning of space, accumulating the quadric of each triangle (pushed out to the triangles vertices) within each bin, and then determining an optimal position for a single vertex in a bin by using the accumulated quadric. In more detail, the algorithm first gets the bounds of the input poly data. It then breaks this bounding volume into a user-specified number of spatial bins. It then reads each triangle from the input and hashes its vertices into these bins. (If this is the first time a bin has been visited, initialize its quadric to the 0 matrix.) The algorithm computes the error quadric for this triangle and adds it to the existing quadric of the bin in which each vertex is contained. Then, if 2 or more vertices of the triangle fall in the same bin, the triangle is dicarded. If the triangle is not discarded, it adds the triangle to the list of output triangles as a list of vertex identifiers. (There is one vertex id per bin.) After all the triangles have been read, the representative vertex for each bin is computed (an optimal location is found) using the quadric for that bin. This determines the spatial location of the vertices of each of the triangles in the output. To use this filter, specify the divisions defining the spatial subdivision in the x, y, and z directions. You must also specify an input vtkPolyData. Then choose to either 1) use the original points that minimize the quadric error to produce the output triangles or 2) compute an optimal position in each bin to produce the output triangles (recommended and default behavior). This filter can take multiple inputs. To do this, the user must explicity call StartAppend, Append (once for each input), and EndAppend. StartAppend sets up the data structure to hold the quadric matrices. Append processes each triangle in the input poly data it was called on, hashes its vertices to the appropriate bins, determines whether to keep this triangle, and updates the appropriate quadric matrices. EndAppend determines the spatial location of each of the representative vertices for the visited bins. While this approach does not fit into the visualization architecture and requires manual control, it has the advantage that extremely large data can be processed in pieces and appended to the filter piece-by-piece. JavaBean wrapper for vtkQuadricClustering object.

Author:
vtk2jbean Automatic JavaBean wrapper for VTK.
See Also:
vtkQuadricDecimation, vtkDecimatePro, Serialized Form

Field Summary
protected  java.beans.PropertyChangeSupport changes
           
 
Fields inherited from class vtk.vtkObjectBase
vtkId
 
Constructor Summary
  vtkQuadricClustering()
           
protected vtkQuadricClustering(int dmy)
           
 
Method Summary
 void append(vtkPolyData id0)
          These methods provide an alternative way of executing the filter.
 void autoAdjustNumberOfDivisionsOff()
          Enable automatic adjustment of number of divisions.
 void autoAdjustNumberOfDivisionsOn()
          Enable automatic adjustment of number of divisions.
 void copyCellDataOff()
          This flag makes the filter copy cell data from input to output (the best it can).
 void copyCellDataOn()
          This flag makes the filter copy cell data from input to output (the best it can).
 void endAppend()
          These methods provide an alternative way of executing the filter.
 int getAutoAdjustNumberOfDivisions()
          Enable automatic adjustment of number of divisions.
 java.lang.String getClassName()
          Return the class name as a string.
 int getCopyCellData()
          This flag makes the filter copy cell data from input to output (the best it can).
 double[] getDivisionOrigin()
          This is an alternative way to set up the bins.
 double[] getDivisionSpacing()
          This is an alternative way to set up the bins.
 vtkFeatureEdges getFeatureEdges()
          By default, this flag is off.
 double getFeaturePointsAngle()
          Set/Get the angle to use in determining whether a point on a boundary / feature edge is a feature point.
 double getFeaturePointsAngleMaxValue()
          Set/Get the angle to use in determining whether a point on a boundary / feature edge is a feature point.
 double getFeaturePointsAngleMinValue()
          Set/Get the angle to use in determining whether a point on a boundary / feature edge is a feature point.
 int[] getNumberOfDivisions()
          Set/Get the number of divisions along each axis for the spatial bins.
 void getNumberOfDivisions(int[] id0)
          Set/Get the number of divisions along each axis for the spatial bins.
 int getNumberOfXDivisions()
          Set/Get the number of divisions along each axis for the spatial bins.
 int getNumberOfYDivisions()
          Set/Get the number of divisions along each axis for the spatial bins.
 int getNumberOfZDivisions()
          Set/Get the number of divisions along each axis for the spatial bins.
 vtkQuadricClustering getThisQuadricClustering()
           
 int getUseFeatureEdges()
          By default, this flag is off.
 int getUseFeaturePoints()
          By default, this flag is off.
 int getUseInputPoints()
          Normally the point that minimizes the quadric error function is used as the output of the bin.
 int getUseInternalTriangles()
          When this flag is on (and it is on by default), then triangles that are completely contained in a bin are added to the bin quadrics.
 int isA(java.lang.String id0)
          Return 1 if this class is the same type of (or a subclass of) the named class.
 void setAutoAdjustNumberOfDivisions(int id0)
          Enable automatic adjustment of number of divisions.
 void setCopyCellData(int id0)
          This flag makes the filter copy cell data from input to output (the best it can).
 void setDivisionOrigin(double[] id0)
          This is an alternative way to set up the bins.
 void setDivisionOrigin(double id0, double id1, double id2)
          This is an alternative way to set up the bins.
 void setDivisionSpacing(double[] id0)
          This is an alternative way to set up the bins.
 void setDivisionSpacing(double id0, double id1, double id2)
          This is an alternative way to set up the bins.
 void setFeaturePointsAngle(double id0)
          Set/Get the angle to use in determining whether a point on a boundary / feature edge is a feature point.
 void setNumberOfDivisions(int[] id0)
          Set/Get the number of divisions along each axis for the spatial bins.
 void setNumberOfDivisions(int id0, int id1, int id2)
          Set/Get the number of divisions along each axis for the spatial bins.
 void setNumberOfXDivisions(int id0)
          Set/Get the number of divisions along each axis for the spatial bins.
 void setNumberOfYDivisions(int id0)
          Set/Get the number of divisions along each axis for the spatial bins.
 void setNumberOfZDivisions(int id0)
          Set/Get the number of divisions along each axis for the spatial bins.
 void setUseFeatureEdges(int id0)
          By default, this flag is off.
 void setUseFeaturePoints(int id0)
          By default, this flag is off.
 void setUseInputPoints(int id0)
          Normally the point that minimizes the quadric error function is used as the output of the bin.
 void setUseInternalTriangles(int id0)
          When this flag is on (and it is on by default), then triangles that are completely contained in a bin are added to the bin quadrics.
 void startAppend(double id0, double id1, double id2, double id3, double id4, double id5)
          These methods provide an alternative way of executing the filter.
 void useFeatureEdgesOff()
          By default, this flag is off.
 void useFeatureEdgesOn()
          By default, this flag is off.
 void useFeaturePointsOff()
          By default, this flag is off.
 void useFeaturePointsOn()
          By default, this flag is off.
 void useInputPointsOff()
          Normally the point that minimizes the quadric error function is used as the output of the bin.
 void useInputPointsOn()
          Normally the point that minimizes the quadric error function is used as the output of the bin.
 void useInternalTrianglesOff()
          When this flag is on (and it is on by default), then triangles that are completely contained in a bin are added to the bin quadrics.
 void useInternalTrianglesOn()
          When this flag is on (and it is on by default), then triangles that are completely contained in a bin are added to the bin quadrics.
protected  void VTKCastInit()
           
 void VTKInit()
           
 
Methods inherited from class vtk.vtkPolyDataToPolyDataFilter
getInput, getThisPolyDataToPolyDataFilter, setInput
 
Methods inherited from class vtk.vtkPolyDataSource
getOutput, getOutput, getThisPolyDataSource, setOutput
 
Methods inherited from class vtk.vtkSource
computeInputUpdateExtents, getNumberOfOutputs, getOutputIndex, getReleaseDataFlag, getThisSource, inRegisterLoop, propagateUpdateExtent, releaseDataFlagOff, releaseDataFlagOn, setReleaseDataFlag, triggerAsynchronousUpdate, unRegister, unRegisterAllOutputs, update, updateData, updateInformation, updateWholeExtent
 
Methods inherited from class vtk.vtkProcessObject
abortExecuteOff, abortExecuteOn, getAbortExecute, getErrorCode, getNumberOfInputs, getProgress, getProgressMaxValue, getProgressMinValue, getProgressText, getThisProcessObject, removeAllInputs, setAbortExecute, setProgress, setProgressText, squeezeInputArray, updateProgress
 
Methods inherited from class vtk.vtkObject
AddObserver, breakOnError, debugOff, debugOn, getDebug, getGlobalWarningDisplay, getMTime, 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

vtkQuadricClustering

public vtkQuadricClustering()

vtkQuadricClustering

protected vtkQuadricClustering(int dmy)
Method Detail

getThisQuadricClustering

public vtkQuadricClustering getThisQuadricClustering()

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 vtkPolyDataToPolyDataFilter

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 vtkPolyDataToPolyDataFilter

setNumberOfXDivisions

public void setNumberOfXDivisions(int id0)
Set/Get the number of divisions along each axis for the spatial bins. The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions* NumberOfZDivisions. The filter may choose to ignore large numbers of divisions if the input has few points and AutoAdjustNumberOfDivisions is enabled.


setNumberOfYDivisions

public void setNumberOfYDivisions(int id0)
Set/Get the number of divisions along each axis for the spatial bins. The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions* NumberOfZDivisions. The filter may choose to ignore large numbers of divisions if the input has few points and AutoAdjustNumberOfDivisions is enabled.


setNumberOfZDivisions

public void setNumberOfZDivisions(int id0)
Set/Get the number of divisions along each axis for the spatial bins. The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions* NumberOfZDivisions. The filter may choose to ignore large numbers of divisions if the input has few points and AutoAdjustNumberOfDivisions is enabled.


getNumberOfXDivisions

public int getNumberOfXDivisions()
Set/Get the number of divisions along each axis for the spatial bins. The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions* NumberOfZDivisions. The filter may choose to ignore large numbers of divisions if the input has few points and AutoAdjustNumberOfDivisions is enabled.


getNumberOfYDivisions

public int getNumberOfYDivisions()
Set/Get the number of divisions along each axis for the spatial bins. The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions* NumberOfZDivisions. The filter may choose to ignore large numbers of divisions if the input has few points and AutoAdjustNumberOfDivisions is enabled.


getNumberOfZDivisions

public int getNumberOfZDivisions()
Set/Get the number of divisions along each axis for the spatial bins. The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions* NumberOfZDivisions. The filter may choose to ignore large numbers of divisions if the input has few points and AutoAdjustNumberOfDivisions is enabled.


setNumberOfDivisions

public void setNumberOfDivisions(int[] id0)
Set/Get the number of divisions along each axis for the spatial bins. The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions* NumberOfZDivisions. The filter may choose to ignore large numbers of divisions if the input has few points and AutoAdjustNumberOfDivisions is enabled.


setNumberOfDivisions

public void setNumberOfDivisions(int id0,
                                 int id1,
                                 int id2)
Set/Get the number of divisions along each axis for the spatial bins. The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions* NumberOfZDivisions. The filter may choose to ignore large numbers of divisions if the input has few points and AutoAdjustNumberOfDivisions is enabled.


getNumberOfDivisions

public int[] getNumberOfDivisions()
Set/Get the number of divisions along each axis for the spatial bins. The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions* NumberOfZDivisions. The filter may choose to ignore large numbers of divisions if the input has few points and AutoAdjustNumberOfDivisions is enabled.


getNumberOfDivisions

public void getNumberOfDivisions(int[] id0)
Set/Get the number of divisions along each axis for the spatial bins. The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions* NumberOfZDivisions. The filter may choose to ignore large numbers of divisions if the input has few points and AutoAdjustNumberOfDivisions is enabled.


setAutoAdjustNumberOfDivisions

public void setAutoAdjustNumberOfDivisions(int id0)
Enable automatic adjustment of number of divisions. If off, the number of divisions specified by the user is always used (as long as it is valid).


getAutoAdjustNumberOfDivisions

public int getAutoAdjustNumberOfDivisions()
Enable automatic adjustment of number of divisions. If off, the number of divisions specified by the user is always used (as long as it is valid).


autoAdjustNumberOfDivisionsOn

public void autoAdjustNumberOfDivisionsOn()
Enable automatic adjustment of number of divisions. If off, the number of divisions specified by the user is always used (as long as it is valid).


autoAdjustNumberOfDivisionsOff

public void autoAdjustNumberOfDivisionsOff()
Enable automatic adjustment of number of divisions. If off, the number of divisions specified by the user is always used (as long as it is valid).


setDivisionOrigin

public void setDivisionOrigin(double id0,
                              double id1,
                              double id2)
This is an alternative way to set up the bins. If you are trying to match boundaries between pieces, then you should use these methods rather than SetNumberOfDivisions. To use these methods, specify the origin and spacing of the spatial binning.


setDivisionOrigin

public void setDivisionOrigin(double[] id0)
This is an alternative way to set up the bins. If you are trying to match boundaries between pieces, then you should use these methods rather than SetNumberOfDivisions. To use these methods, specify the origin and spacing of the spatial binning.


getDivisionOrigin

public double[] getDivisionOrigin()
This is an alternative way to set up the bins. If you are trying to match boundaries between pieces, then you should use these methods rather than SetNumberOfDivisions. To use these methods, specify the origin and spacing of the spatial binning.


setDivisionSpacing

public void setDivisionSpacing(double id0,
                               double id1,
                               double id2)
This is an alternative way to set up the bins. If you are trying to match boundaries between pieces, then you should use these methods rather than SetNumberOfDivisions. To use these methods, specify the origin and spacing of the spatial binning.


setDivisionSpacing

public void setDivisionSpacing(double[] id0)
This is an alternative way to set up the bins. If you are trying to match boundaries between pieces, then you should use these methods rather than SetNumberOfDivisions. To use these methods, specify the origin and spacing of the spatial binning.


getDivisionSpacing

public double[] getDivisionSpacing()
This is an alternative way to set up the bins. If you are trying to match boundaries between pieces, then you should use these methods rather than SetNumberOfDivisions. To use these methods, specify the origin and spacing of the spatial binning.


setUseInputPoints

public void setUseInputPoints(int id0)
Normally the point that minimizes the quadric error function is used as the output of the bin. When this flag is on, the bin point is forced to be one of the points from the input (the one with the smallest error). This option does not work (i.e., input points cannot be used) when the append methods (StartAppend(), Append(), EndAppend()) are being called directly.


getUseInputPoints

public int getUseInputPoints()
Normally the point that minimizes the quadric error function is used as the output of the bin. When this flag is on, the bin point is forced to be one of the points from the input (the one with the smallest error). This option does not work (i.e., input points cannot be used) when the append methods (StartAppend(), Append(), EndAppend()) are being called directly.


useInputPointsOn

public void useInputPointsOn()
Normally the point that minimizes the quadric error function is used as the output of the bin. When this flag is on, the bin point is forced to be one of the points from the input (the one with the smallest error). This option does not work (i.e., input points cannot be used) when the append methods (StartAppend(), Append(), EndAppend()) are being called directly.


useInputPointsOff

public void useInputPointsOff()
Normally the point that minimizes the quadric error function is used as the output of the bin. When this flag is on, the bin point is forced to be one of the points from the input (the one with the smallest error). This option does not work (i.e., input points cannot be used) when the append methods (StartAppend(), Append(), EndAppend()) are being called directly.


setUseFeatureEdges

public void setUseFeatureEdges(int id0)
By default, this flag is off. When "UseFeatureEdges" is on, then quadrics are computed for boundary edges/feature edges. They influence the quadrics (position of points), but not the mesh. Which features to use can be controlled by the filter "FeatureEdges".


getUseFeatureEdges

public int getUseFeatureEdges()
By default, this flag is off. When "UseFeatureEdges" is on, then quadrics are computed for boundary edges/feature edges. They influence the quadrics (position of points), but not the mesh. Which features to use can be controlled by the filter "FeatureEdges".


useFeatureEdgesOn

public void useFeatureEdgesOn()
By default, this flag is off. When "UseFeatureEdges" is on, then quadrics are computed for boundary edges/feature edges. They influence the quadrics (position of points), but not the mesh. Which features to use can be controlled by the filter "FeatureEdges".


useFeatureEdgesOff

public void useFeatureEdgesOff()
By default, this flag is off. When "UseFeatureEdges" is on, then quadrics are computed for boundary edges/feature edges. They influence the quadrics (position of points), but not the mesh. Which features to use can be controlled by the filter "FeatureEdges".


getFeatureEdges

public vtkFeatureEdges getFeatureEdges()
By default, this flag is off. It only has an effect when "UseFeatureEdges" is also on. When "UseFeaturePoints" is on, then quadrics are computed for boundary / feature points used in the boundary / feature edges. They influence the quadrics (position of points), but not the mesh.


setUseFeaturePoints

public void setUseFeaturePoints(int id0)
By default, this flag is off. It only has an effect when "UseFeatureEdges" is also on. When "UseFeaturePoints" is on, then quadrics are computed for boundary / feature points used in the boundary / feature edges. They influence the quadrics (position of points), but not the mesh.


getUseFeaturePoints

public int getUseFeaturePoints()
By default, this flag is off. It only has an effect when "UseFeatureEdges" is also on. When "UseFeaturePoints" is on, then quadrics are computed for boundary / feature points used in the boundary / feature edges. They influence the quadrics (position of points), but not the mesh.


useFeaturePointsOn

public void useFeaturePointsOn()
By default, this flag is off. It only has an effect when "UseFeatureEdges" is also on. When "UseFeaturePoints" is on, then quadrics are computed for boundary / feature points used in the boundary / feature edges. They influence the quadrics (position of points), but not the mesh.


useFeaturePointsOff

public void useFeaturePointsOff()
By default, this flag is off. It only has an effect when "UseFeatureEdges" is also on. When "UseFeaturePoints" is on, then quadrics are computed for boundary / feature points used in the boundary / feature edges. They influence the quadrics (position of points), but not the mesh.


setFeaturePointsAngle

public void setFeaturePointsAngle(double id0)
Set/Get the angle to use in determining whether a point on a boundary / feature edge is a feature point.


getFeaturePointsAngleMinValue

public double getFeaturePointsAngleMinValue()
Set/Get the angle to use in determining whether a point on a boundary / feature edge is a feature point.


getFeaturePointsAngleMaxValue

public double getFeaturePointsAngleMaxValue()
Set/Get the angle to use in determining whether a point on a boundary / feature edge is a feature point.


getFeaturePointsAngle

public double getFeaturePointsAngle()
Set/Get the angle to use in determining whether a point on a boundary / feature edge is a feature point.


setUseInternalTriangles

public void setUseInternalTriangles(int id0)
When this flag is on (and it is on by default), then triangles that are completely contained in a bin are added to the bin quadrics. When the the flag is off the filter operates faster, but the surface may not be as well behaved.


getUseInternalTriangles

public int getUseInternalTriangles()
When this flag is on (and it is on by default), then triangles that are completely contained in a bin are added to the bin quadrics. When the the flag is off the filter operates faster, but the surface may not be as well behaved.


useInternalTrianglesOn

public void useInternalTrianglesOn()
When this flag is on (and it is on by default), then triangles that are completely contained in a bin are added to the bin quadrics. When the the flag is off the filter operates faster, but the surface may not be as well behaved.


useInternalTrianglesOff

public void useInternalTrianglesOff()
When this flag is on (and it is on by default), then triangles that are completely contained in a bin are added to the bin quadrics. When the the flag is off the filter operates faster, but the surface may not be as well behaved.


startAppend

public void startAppend(double id0,
                        double id1,
                        double id2,
                        double id3,
                        double id4,
                        double id5)
These methods provide an alternative way of executing the filter. PolyData can be added to the result in pieces (append). In this mode, the user must specify the bounds of the entire model as an argument to the "StartAppend" method.


append

public void append(vtkPolyData id0)
These methods provide an alternative way of executing the filter. PolyData can be added to the result in pieces (append). In this mode, the user must specify the bounds of the entire model as an argument to the "StartAppend" method.


endAppend

public void endAppend()
These methods provide an alternative way of executing the filter. PolyData can be added to the result in pieces (append). In this mode, the user must specify the bounds of the entire model as an argument to the "StartAppend" method.


setCopyCellData

public void setCopyCellData(int id0)
This flag makes the filter copy cell data from input to output (the best it can). It uses input cells that trigger the addition of output cells (no averaging). This is off by default, and does not work when append is being called explicitely (non-pipeline usage).


getCopyCellData

public int getCopyCellData()
This flag makes the filter copy cell data from input to output (the best it can). It uses input cells that trigger the addition of output cells (no averaging). This is off by default, and does not work when append is being called explicitely (non-pipeline usage).


copyCellDataOn

public void copyCellDataOn()
This flag makes the filter copy cell data from input to output (the best it can). It uses input cells that trigger the addition of output cells (no averaging). This is off by default, and does not work when append is being called explicitely (non-pipeline usage).


copyCellDataOff

public void copyCellDataOff()
This flag makes the filter copy cell data from input to output (the best it can). It uses input cells that trigger the addition of output cells (no averaging). This is off by default, and does not work when append is being called explicitely (non-pipeline usage).


VTKInit

public void VTKInit()
Overrides:
VTKInit in class vtkObject

VTKCastInit

protected void VTKCastInit()
Overrides:
VTKCastInit in class vtkPolyDataToPolyDataFilter


Copyright © 2004 Sydney ViSLAB. All Rights Reserved.