I get a vtkImplicitFunction
object and want to sample it over a structured point set. I know the approximate shape of the implicit. So I want to sample vtkImplicitFunction
in different bounds(they could be overlap) and finally put them together
// this is the implicit function
vtkSmartPointer<vtkImplicitFunction> implicit = xxx;
// sample it in different bounds(overlap)
for(int i = 0; i < n; i++){
auto sample = vtkSmartPointer<vtkSampleFunction>::New();
sample->SetImplicitFunction(implicit);
// bound_i
sample->SetModelBounds(bound_i);
sample->update();
}
// put each sample in a image data, how ?
vtkSmartPointer<vtkImageData> data = sum(samples)
auto surface = vtkSmartPointer<vtkContourFilter>::New();
surface->SetInputConnection(data);
surface->ComputeNormalsOff();
surface->SetValue(0, 0.0);
surface->Update();
How can I do that?