-
Cory Quammen authored
The ComputeScalars option adds the array from which the contour was computed to the output. vtkContourFilter used to contour by the active scalar array in the point data, but now contours by the point data array set with vtkAlgorithm::SetInputArrayToProcess(). However, some aspects of copying the data are still controlled by which array is designated as active. The result is that when the active scalar array is not the same as the one named with SetInputArrayToProcess(), the active point data array will not be added to the output if the ComputeScalars option is off, and the contouring array will be added incorrectly. This problem manifested only when the input data set type was vtkUnstructuredGrid or vtkPolyData. Other data types are handled by helper classes where arrays are handled correctly. This patch fixes the problem by setting the active scalar array in the input data to match the input array to process. An existing test for unstructured grid input was modified to test the expected behavior and a new test for vtkPolyData was added.
99541b93