Prev Up Next

Using Clip, Cut and Threshold Filters

Introduction

Clip, Cut and Threshold are three filters that are available on the filter toolbar.
Clip, Cut and Threshold Buttons

These three fitlers have similar functionality and will accept any data set as input. They will be demonstrated on a structured volume generated by the vtkMandelbrotSource available in the VTK-Sources menu.

Creating Mandelbrot

This source combines Mandelbrot set and Julia set functions to produce a three-dimensional subspace sampling of the four dimensional fractal. It is a useful source for testing because the samples are computed internally, and the complexity of the data scales with sample resolution. For these examples we are using a very low resolution sampled volume of dimensions 51x51x21.

Fractal Screen Shot

Cutting

The current implementation of cutting samples the volume on points in a plane. The sample points are derived from the input data. Any cell edge/plane instersection becomes a point in the output. The cut operation is very similar to contouring, but using an implicit plane instead of point scalars. The output of the cut filter is always vtkPolyData.

Cutting Screen Shot

There are three parameters that drive the cutting operation. The cut plane is defined by a point on the plane, and a normal. The point defaults to the center of the bounds of the input data set, and can be modified by the user in the "Center" entry. The input bounds are displayed so that the user can choose meaningful values. The "Set Plane Center to Center of Bounds" button will reset the center to the default value.

The normal of the cut plane can be set by the user in the "Normal" entry. The normal has to be a non zero vector, but does not have to be normalized. However, the magnitude of this vector does effect the interpretation of the "Offset". Four default values can be used to set the normal of the cut plane. The "X Normal", "Y Normal" and "Z Normal" buttons set the normal to produce YZ, XZ and YZ planes respectively. The "Use Camera Normal" uses the view-plane normal to set the cut-plane normal. The view-plane normal points into the screen, and produces a cut plane that is parallel to the view screen.

The "Offset" of the plane allows the user to move the plane away from the center in the direction of the cut plane normal. The same effect can be achieved by moving the cut-plane center point, but changing the offset can be more convienient.

In the future, we may extent the clip options to generate surfaces at multiple offsets, or use other implicit functions like a sphere. We may also extend the interface to interactively manipulate the cut plane.

Clipping

The clip filter is very similar to the cut filter, but all of the data on one side of the plane is extracted. Data in the direction of the normal is kept. Individual cells are divided as necessary to give a clean cut surface. The output of the clip fitlers is always vtkUnstructuredGrid. Unlike the clip filter which changes volumes to surfaces and surfaces to points, the clip filter does not change the dimensionality of its input.

Clipping Screen Shot

The clip filter currently has an identical interface to the cut filters. The center, normal and offset of the plane can all be manipulated. In the future we plan to extend the clip fitlers user interface to clip with scalars contained in the data as well as additional implicit functions other than a plane.

Thresholding

The threshold filter is somewhat similar to the clip filters, but it uses data set values to remove cells instead of an implcit function. Also the threshold fitlers does not divide individual cells. A cell either gets put in the output or is completely removed. This can be confusing when a data set has complex cell types. Triangle strips, line strips, and poly verticies all contain multiple faces in one cell. The threshold filter will not differentiate between these internal sub cells, so more data could be removed than expected.

Thresholding Screen Shot

The threshold filters user interface allows the user to select which field array to use for thresholding. Only single components arrays can be selected. The user can not threshold by a vector array. The "Attribute Mode" selection allows the user to choose between cell centered data arrays and points centered data arrays.

If "Point Data" is used, then the "All Scalars" toggle becomes significant. When this toggle is on, all of a cells verticies must be within the threshold criteria for the cell to be put in the output. When this toggle is off, then only a single cell vertex has to meet the critera for the cell to be kept.

The upper and lower threshold sliders define the threshold critera. The lower threshold defaults to the minimum array value, and the upper threshold defaults to the maximum array value. With the default, no cells would be removed.


Prev Up Next
Last modified: Mon Dec 3 13:21:22 EST 2001