Section: Visualization Toolkit Graphics Classes
To use this filter, you must decide if you will be clipping with an implicit function, or whether you will be using the input scalar data. If you want to clip with an implicit function, you must first define and then set the implicit function with the SetClipFunction() method. Otherwise, you must make sure input scalar data is available. You can also specify a scalar value, which is used to decide what is inside and outside of the implicit function. You can also reverse the sense of what inside/outside is by setting the InsideOut instance variable. (The cutting algorithm proceeds by computing an implicit function value or using the input scalar data for each point in the dataset. This is compared to the scalar value to determine inside/outside.)
This filter can be configured to compute a second output. The second output is the portion of the volume that is clipped away. Set the GenerateClippedData boolean on if you wish to access this output data.
The filter will produce an unstructured grid of entirely tetrahedra or a mixed grid of tetrahedra and other 3D cell types (e.g., wedges). Control this behavior by setting the Mixed3DCellGeneration. By default the Mixed3DCellGeneration is on and a combination of cell types will be produced. Note that producing mixed cell types is a faster than producing only tetrahedra.
To create an instance of class vtkClipVolume, simply invoke its constructor as follows
obj = vtkClipVolume
obj
is an instance of the vtkClipVolume class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkClipVolume = obj.NewInstance ()
vtkClipVolume = obj.SafeDownCast (vtkObject o)
obj.SetValue (double )
- Set the clipping value of the implicit function (if clipping with
implicit function) or scalar value (if clipping with scalars). The
default value is 0.0.
double = obj.GetValue ()
- Set the clipping value of the implicit function (if clipping with
implicit function) or scalar value (if clipping with scalars). The
default value is 0.0.
obj.SetInsideOut (int )
- Set/Get the InsideOut flag. When off, a vertex is considered inside the
implicit function if its value is greater than the Value ivar. When
InsideOutside is turned on, a vertex is considered inside the implicit
function if its implicit function value is less than or equal to the
Value ivar. InsideOut is off by default.
int = obj.GetInsideOut ()
- Set/Get the InsideOut flag. When off, a vertex is considered inside the
implicit function if its value is greater than the Value ivar. When
InsideOutside is turned on, a vertex is considered inside the implicit
function if its implicit function value is less than or equal to the
Value ivar. InsideOut is off by default.
obj.InsideOutOn ()
- Set/Get the InsideOut flag. When off, a vertex is considered inside the
implicit function if its value is greater than the Value ivar. When
InsideOutside is turned on, a vertex is considered inside the implicit
function if its implicit function value is less than or equal to the
Value ivar. InsideOut is off by default.
obj.InsideOutOff ()
- Set/Get the InsideOut flag. When off, a vertex is considered inside the
implicit function if its value is greater than the Value ivar. When
InsideOutside is turned on, a vertex is considered inside the implicit
function if its implicit function value is less than or equal to the
Value ivar. InsideOut is off by default.
obj.SetClipFunction (vtkImplicitFunction )
vtkImplicitFunction = obj.GetClipFunction ()
obj.SetGenerateClipScalars (int )
- If this flag is enabled, then the output scalar values will be
interpolated from the implicit function values, and not the
input scalar data. If you enable this flag but do not provide an
implicit function an error will be reported.
int = obj.GetGenerateClipScalars ()
- If this flag is enabled, then the output scalar values will be
interpolated from the implicit function values, and not the
input scalar data. If you enable this flag but do not provide an
implicit function an error will be reported.
obj.GenerateClipScalarsOn ()
- If this flag is enabled, then the output scalar values will be
interpolated from the implicit function values, and not the
input scalar data. If you enable this flag but do not provide an
implicit function an error will be reported.
obj.GenerateClipScalarsOff ()
- If this flag is enabled, then the output scalar values will be
interpolated from the implicit function values, and not the
input scalar data. If you enable this flag but do not provide an
implicit function an error will be reported.
obj.SetGenerateClippedOutput (int )
- Control whether a second output is generated. The second output
contains the unstructured grid that's been clipped away.
int = obj.GetGenerateClippedOutput ()
- Control whether a second output is generated. The second output
contains the unstructured grid that's been clipped away.
obj.GenerateClippedOutputOn ()
- Control whether a second output is generated. The second output
contains the unstructured grid that's been clipped away.
obj.GenerateClippedOutputOff ()
- Control whether a second output is generated. The second output
contains the unstructured grid that's been clipped away.
vtkUnstructuredGrid = obj.GetClippedOutput ()
- Return the clipped output.
obj.SetMixed3DCellGeneration (int )
- Control whether the filter produces a mix of 3D cell types on output, or
whether the output cells are all tetrahedra. By default, a mixed set of
cells (e.g., tetrahedra and wedges) is produced. (Note: mixed type
generation is faster and less overall data is generated.)
int = obj.GetMixed3DCellGeneration ()
- Control whether the filter produces a mix of 3D cell types on output, or
whether the output cells are all tetrahedra. By default, a mixed set of
cells (e.g., tetrahedra and wedges) is produced. (Note: mixed type
generation is faster and less overall data is generated.)
obj.Mixed3DCellGenerationOn ()
- Control whether the filter produces a mix of 3D cell types on output, or
whether the output cells are all tetrahedra. By default, a mixed set of
cells (e.g., tetrahedra and wedges) is produced. (Note: mixed type
generation is faster and less overall data is generated.)
obj.Mixed3DCellGenerationOff ()
- Control whether the filter produces a mix of 3D cell types on output, or
whether the output cells are all tetrahedra. By default, a mixed set of
cells (e.g., tetrahedra and wedges) is produced. (Note: mixed type
generation is faster and less overall data is generated.)
obj.SetMergeTolerance (double )
- Set the tolerance for merging clip intersection points that are near
the corners of voxels. This tolerance is used to prevent the generation
of degenerate tetrahedra.
double = obj.GetMergeToleranceMinValue ()
- Set the tolerance for merging clip intersection points that are near
the corners of voxels. This tolerance is used to prevent the generation
of degenerate tetrahedra.
double = obj.GetMergeToleranceMaxValue ()
- Set the tolerance for merging clip intersection points that are near
the corners of voxels. This tolerance is used to prevent the generation
of degenerate tetrahedra.
double = obj.GetMergeTolerance ()
- Set the tolerance for merging clip intersection points that are near
the corners of voxels. This tolerance is used to prevent the generation
of degenerate tetrahedra.
obj.SetLocator (vtkIncrementalPointLocator locator)
- Set / Get a spatial locator for merging points. By default,
an instance of vtkMergePoints is used.
vtkIncrementalPointLocator = obj.GetLocator ()
- Set / Get a spatial locator for merging points. By default,
an instance of vtkMergePoints is used.
obj.CreateDefaultLocator ()
- Create default locator. Used to create one when none is specified. The
locator is used to merge coincident points.
long = obj.GetMTime ()
- Return the mtime also considering the locator and clip function.