MCPcopy Create free account
hub / github.com/Kitware/VTK / DataSetContour

Method DataSetContour

Filters/General/vtkMarchingContourFilter.cxx:200–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void 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
224void vtkMarchingContourFilter::ImageContour(int dim, vtkDataSet* input, vtkPolyData* output)
225{

Callers 1

RequestDataMethod · 0.95

Calls 12

DeleteMethod · 0.65
NewFunction · 0.50
GetNumberOfContoursMethod · 0.45
GetValuesMethod · 0.45
SetInputDataMethod · 0.45
SetDebugMethod · 0.45
SetNumberOfContoursMethod · 0.45
SetValueMethod · 0.45
UpdateMethod · 0.45
ShallowCopyMethod · 0.45
GetOutputMethod · 0.45
SetOutputMethod · 0.45

Tested by

no test coverage detected