vtk
Class vtkSmoothPolyDataFilter

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

public class vtkSmoothPolyDataFilter
extends vtkPolyDataToPolyDataFilter
implements java.io.Serializable

vtkSmoothPolyDataFilter.h - adjust point positions using Laplacian smoothing. vtkSmoothPolyDataFilter.h is a filter that adjusts point coordinates using Laplacian smoothing. The effect is to "relax" the mesh, making the cells better shaped and the vertices more evenly distributed. Note that this filter operates on the lines, polygons, and triangle strips composing an instance of vtkPolyData. Vertex or poly-vertex cells are never modified. The algorithm proceeds as follows. For each vertex v, a topological and geometric analysis is performed to determine which vertices are connected to v, and which cells are connected to v. Then, a connectivity array is constructed for each vertex. (The connectivity array is a list of lists of vertices that directly attach to each vertex.) Next, an iteration phase begins over all vertices. For each vertex v, the coordinates of v are modified according to an average of the connected vertices. (A relaxation factor is available to control the amount of displacement of v). The process repeats for each vertex. This pass over the list of vertices is a single iteration. Many iterations (generally around 20 or so) are repeated until the desired result is obtained. There are some special instance variables used to control the execution of this filter. (These ivars basically control what vertices can be smoothed, and the creation of the connectivity array.) The BoundarySmoothing ivar enables/disables the smoothing operation on vertices that are on the "boundary" of the mesh. A boundary vertex is one that is surrounded by a semi-cycle of polygons (or used by a single line). Another important ivar is FeatureEdgeSmoothing. If this ivar is enabled, then interior vertices are classified as either "simple", "interior edge", or "fixed", and smoothed differently. (Interior vertices are manifold vertices surrounded by a cycle of polygons; or used by two line cells.) The classification is based on the number of feature edges attached to v. A feature edge occurs when the angle between the two surface normals of a polygon sharing an edge is greater than the FeatureAngle ivar. Then, vertices used by no feature edges are classified "simple", vertices used by exactly two feature edges are classified "interior edge", and all others are "fixed" vertices. Once the classification is known, the vertices are smoothed differently. Corner (i.e., fixed) vertices are not smoothed at all. Simple vertices are smoothed as before (i.e., average of connected vertex coordinates). Interior edge vertices are smoothed only along their two connected edges, and only if the angle between the edges is less than the EdgeAngle ivar. The total smoothing can be controlled by using two ivars. The NumberOfIterations is a cap on the maximum number of smoothing passes. The Convergence ivar is a limit on the maximum point motion. If the maximum motion during an iteration is less than Convergence, then the smoothing process terminates. (Convergence is expressed as a fraction of the diagonal of the bounding box.) There are two instance variables that control the generation of error data. If the ivar GenerateErrorScalars is on, then a scalar value indicating the distance of each vertex from its original position is computed. If the ivar GenerateErrorVectors is on, then a vector representing change in position is computed. Optionally you can further control the smoothing process by defining a second input: the Source. If defined, the input mesh is constrained to lie on the surface defined by the Source ivar. JavaBean wrapper for vtkSmoothPolyDataFilter object.

Author:
vtk2jbean Automatic JavaBean wrapper for VTK.
See Also:
vtkWindowedSincPolyDataFilter, vtkDecimate, Serialized Form

Field Summary
protected  java.beans.PropertyChangeSupport changes
           
 
Fields inherited from class vtk.vtkObjectBase
vtkId
 
Constructor Summary
  vtkSmoothPolyDataFilter()
           
protected vtkSmoothPolyDataFilter(int dmy)
           
 
Method Summary
 void boundarySmoothingOff()
          Turn on/off the smoothing of vertices on the boundary of the mesh.
 void boundarySmoothingOn()
          Turn on/off the smoothing of vertices on the boundary of the mesh.
 void featureEdgeSmoothingOff()
          Turn on/off smoothing along sharp interior edges.
 void featureEdgeSmoothingOn()
          Turn on/off smoothing along sharp interior edges.
 void generateErrorScalarsOff()
          Turn on/off the generation of scalar distance values.
 void generateErrorScalarsOn()
          Turn on/off the generation of scalar distance values.
 void generateErrorVectorsOff()
          Turn on/off the generation of error vectors.
 void generateErrorVectorsOn()
          Turn on/off the generation of error vectors.
 int getBoundarySmoothing()
          Turn on/off the smoothing of vertices on the boundary of the mesh.
 java.lang.String getClassName()
          Return the class name as a string.
 double getConvergence()
          Specify a convergence criterion for the iteration process.
 double getConvergenceMaxValue()
          Specify a convergence criterion for the iteration process.
 double getConvergenceMinValue()
          Specify a convergence criterion for the iteration process.
 double getEdgeAngle()
          Specify the edge angle to control smoothing along edges (either interior or boundary).
 double getEdgeAngleMaxValue()
          Specify the edge angle to control smoothing along edges (either interior or boundary).
 double getEdgeAngleMinValue()
          Specify the edge angle to control smoothing along edges (either interior or boundary).
 double getFeatureAngle()
          Specify the feature angle for sharp edge identification.
 double getFeatureAngleMaxValue()
          Specify the feature angle for sharp edge identification.
 double getFeatureAngleMinValue()
          Specify the feature angle for sharp edge identification.
 int getFeatureEdgeSmoothing()
          Turn on/off smoothing along sharp interior edges.
 int getGenerateErrorScalars()
          Turn on/off the generation of scalar distance values.
 int getGenerateErrorVectors()
          Turn on/off the generation of error vectors.
 int getNumberOfIterations()
          Specify the number of iterations for Laplacian smoothing,
 int getNumberOfIterationsMaxValue()
          Specify the number of iterations for Laplacian smoothing,
 int getNumberOfIterationsMinValue()
          Specify the number of iterations for Laplacian smoothing,
 double getRelaxationFactor()
          Specify the relaxation factor for Laplacian smoothing.
 vtkPolyData getSource()
          Specify the source object which is used to constrain smoothing.
 vtkSmoothPolyDataFilter getThisSmoothPolyDataFilter()
           
 int isA(java.lang.String id0)
          Return 1 if this class is the same type of (or a subclass of) the named class.
 void setBoundarySmoothing(int id0)
          Turn on/off the smoothing of vertices on the boundary of the mesh.
 void setConvergence(double id0)
          Specify a convergence criterion for the iteration process.
 void setEdgeAngle(double id0)
          Specify the edge angle to control smoothing along edges (either interior or boundary).
 void setFeatureAngle(double id0)
          Specify the feature angle for sharp edge identification.
 void setFeatureEdgeSmoothing(int id0)
          Turn on/off smoothing along sharp interior edges.
 void setGenerateErrorScalars(int id0)
          Turn on/off the generation of scalar distance values.
 void setGenerateErrorVectors(int id0)
          Turn on/off the generation of error vectors.
 void setNumberOfIterations(int id0)
          Specify the number of iterations for Laplacian smoothing,
 void setRelaxationFactor(double id0)
          Specify the relaxation factor for Laplacian smoothing.
 void setSource(vtkPolyData id0)
          Specify the source object which is used to constrain smoothing.
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

vtkSmoothPolyDataFilter

public vtkSmoothPolyDataFilter()

vtkSmoothPolyDataFilter

protected vtkSmoothPolyDataFilter(int dmy)
Method Detail

getThisSmoothPolyDataFilter

public vtkSmoothPolyDataFilter getThisSmoothPolyDataFilter()

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

setConvergence

public void setConvergence(double id0)
Specify a convergence criterion for the iteration process. Smaller numbers result in more smoothing iterations.


getConvergenceMinValue

public double getConvergenceMinValue()
Specify a convergence criterion for the iteration process. Smaller numbers result in more smoothing iterations.


getConvergenceMaxValue

public double getConvergenceMaxValue()
Specify a convergence criterion for the iteration process. Smaller numbers result in more smoothing iterations.


getConvergence

public double getConvergence()
Specify a convergence criterion for the iteration process. Smaller numbers result in more smoothing iterations.


setNumberOfIterations

public void setNumberOfIterations(int id0)
Specify the number of iterations for Laplacian smoothing,


getNumberOfIterationsMinValue

public int getNumberOfIterationsMinValue()
Specify the number of iterations for Laplacian smoothing,


getNumberOfIterationsMaxValue

public int getNumberOfIterationsMaxValue()
Specify the number of iterations for Laplacian smoothing,


getNumberOfIterations

public int getNumberOfIterations()
Specify the number of iterations for Laplacian smoothing,


setRelaxationFactor

public void setRelaxationFactor(double id0)
Specify the relaxation factor for Laplacian smoothing. As in all iterative methods, the stability of the process is sensitive to this parameter. In general, small relaxation factors and large numbers of iterations are more stable than larger relaxation factors and smaller numbers of iterations.


getRelaxationFactor

public double getRelaxationFactor()
Specify the relaxation factor for Laplacian smoothing. As in all iterative methods, the stability of the process is sensitive to this parameter. In general, small relaxation factors and large numbers of iterations are more stable than larger relaxation factors and smaller numbers of iterations.


setFeatureEdgeSmoothing

public void setFeatureEdgeSmoothing(int id0)
Turn on/off smoothing along sharp interior edges.


getFeatureEdgeSmoothing

public int getFeatureEdgeSmoothing()
Turn on/off smoothing along sharp interior edges.


featureEdgeSmoothingOn

public void featureEdgeSmoothingOn()
Turn on/off smoothing along sharp interior edges.


featureEdgeSmoothingOff

public void featureEdgeSmoothingOff()
Turn on/off smoothing along sharp interior edges.


setFeatureAngle

public void setFeatureAngle(double id0)
Specify the feature angle for sharp edge identification.


getFeatureAngleMinValue

public double getFeatureAngleMinValue()
Specify the feature angle for sharp edge identification.


getFeatureAngleMaxValue

public double getFeatureAngleMaxValue()
Specify the feature angle for sharp edge identification.


getFeatureAngle

public double getFeatureAngle()
Specify the feature angle for sharp edge identification.


setEdgeAngle

public void setEdgeAngle(double id0)
Specify the edge angle to control smoothing along edges (either interior or boundary).


getEdgeAngleMinValue

public double getEdgeAngleMinValue()
Specify the edge angle to control smoothing along edges (either interior or boundary).


getEdgeAngleMaxValue

public double getEdgeAngleMaxValue()
Specify the edge angle to control smoothing along edges (either interior or boundary).


getEdgeAngle

public double getEdgeAngle()
Specify the edge angle to control smoothing along edges (either interior or boundary).


setBoundarySmoothing

public void setBoundarySmoothing(int id0)
Turn on/off the smoothing of vertices on the boundary of the mesh.


getBoundarySmoothing

public int getBoundarySmoothing()
Turn on/off the smoothing of vertices on the boundary of the mesh.


boundarySmoothingOn

public void boundarySmoothingOn()
Turn on/off the smoothing of vertices on the boundary of the mesh.


boundarySmoothingOff

public void boundarySmoothingOff()
Turn on/off the smoothing of vertices on the boundary of the mesh.


setGenerateErrorScalars

public void setGenerateErrorScalars(int id0)
Turn on/off the generation of scalar distance values.


getGenerateErrorScalars

public int getGenerateErrorScalars()
Turn on/off the generation of scalar distance values.


generateErrorScalarsOn

public void generateErrorScalarsOn()
Turn on/off the generation of scalar distance values.


generateErrorScalarsOff

public void generateErrorScalarsOff()
Turn on/off the generation of scalar distance values.


setGenerateErrorVectors

public void setGenerateErrorVectors(int id0)
Turn on/off the generation of error vectors.


getGenerateErrorVectors

public int getGenerateErrorVectors()
Turn on/off the generation of error vectors.


generateErrorVectorsOn

public void generateErrorVectorsOn()
Turn on/off the generation of error vectors.


generateErrorVectorsOff

public void generateErrorVectorsOff()
Turn on/off the generation of error vectors.


setSource

public void setSource(vtkPolyData id0)
Specify the source object which is used to constrain smoothing. The source defines a surface that the input (as it is smoothed) is constrained to lie upon.


getSource

public vtkPolyData getSource()
Specify the source object which is used to constrain smoothing. The source defines a surface that the input (as it is smoothed) is constrained to lie upon.


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.