| 198 | } |
| 199 | |
| 200 | void vtkMarchingContourFilter::DataSetContour(vtkDataSet* input, vtkPolyData* output) |
| 201 | { |
| 202 | vtkIdType numContours = this->ContourValues->GetNumberOfContours(); |
| 203 | double* values = this->ContourValues->GetValues(); |
| 204 | |
| 205 | vtkContourFilter* contour = vtkContourFilter::New(); |
| 206 | contour->SetInputData((vtkImageData*)input); |
| 207 | contour->SetComputeNormals(this->ComputeNormals); |
| 208 | contour->SetComputeGradients(this->ComputeGradients); |
| 209 | contour->SetComputeScalars(this->ComputeScalars); |
| 210 | contour->SetDebug(this->Debug); |
| 211 | contour->SetNumberOfContours(numContours); |
| 212 | for (int i = 0; i < numContours; i++) |
| 213 | { |
| 214 | contour->SetValue(i, values[i]); |
| 215 | } |
| 216 | |
| 217 | contour->SetContainerAlgorithm(this); |
| 218 | contour->Update(); |
| 219 | output->ShallowCopy(contour->GetOutput()); |
| 220 | this->SetOutput(output); |
| 221 | contour->Delete(); |
| 222 | } |
| 223 | |
| 224 | void vtkMarchingContourFilter::ImageContour(int dim, vtkDataSet* input, vtkPolyData* output) |
| 225 | { |
no test coverage detected