Skip to article

 

Contour

Generate isolines or isosurfaces using point scalars.

The Contour filter computes isolines or isosurfaces using a selected point-centered scalar array. The Contour filter operates on any type of data set, but the input is required to have at least one point-centered scalar (single-component) array. The output of this filter is polygonal.

Property Description Default(s) Restrictions
Input This property specifies the input dataset to be used by the contour filter.  

Accepts input of following types:

  • vtkDataSet
  • vtkHyperTreeGrid

The dataset must contain a field array (point) with 1 component(s).

Contour By This property specifies the name of the scalar array from which the contour filter will compute isolines and/or isosurfaces.  

An array of scalars is required.

ComputeNormals If this property is set to 1, a scalar array containing a normal value at each point in the isosurface or isoline will be created by the contour filter; otherwise an array of normals will not be computed. This operation is fairly expensive both in terms of computation time and memory required, so if the output dataset produced by the contour filter will be processed by filters that modify the dataset's topology or geometry, it may be wise to set the value of this property to 0. Select whether to compute normals. 1

Accepts boolean values (0 or 1).

ComputeGradients If this property is set to 1, a scalar array containing a gradient value at each point in the isosurface or isoline will be created by this filter; otherwise an array of gradients will not be computed. This operation is fairly expensive both in terms of computation time and memory required, so if the output dataset produced by the contour filter will be processed by filters that modify the dataset's topology or geometry, it may be wise to set the value of this property to 0. Not that if ComputeNormals is set to 1, then gradients will have to be calculated, but they will only be stored in the output dataset if ComputeGradients is also set to 1. 0

Accepts boolean values (0 or 1).

ComputeScalars If this property is set to 1, an array of scalars (containing the contour value) will be added to the output dataset. If set to 0, the output will not contain this array. 1

Accepts boolean values (0 or 1).

OutputPointsPrecision Select the output precision of the coordinates. Single sets the output to single-precision floating-point (i.e., float), Double sets it to double-precision floating-point (i.e., double), and Default sets it to the same precision as the precision of the points in the input. Defaults to Single. 2

The value(s) is an enumeration of the following:

  • Single (0)
  • Double (1)
  • Same as input (2)
GenerateTriangles This parameter controls whether to produce triangles in the output. Warning: Many filters do not properly handle non-triangular polygons. 1

Accepts boolean values (0 or 1).

Isosurfaces This property specifies the values at which to compute isosurfaces/isolines and also the number of such values.  

The value must lie within the range of the selected data array.

Point Merge Method This property specifies an incremental point locator for merging duplicate / coincident points.  

The value can be one of the following:

  • MergePoints (incremental_point_locators)
  • IncrementalOctreeMergePoints (incremental_point_locators)
  • NonMergingPointLocator (incremental_point_locators)