And it worked well, the sphere is cut from the iso surface.
But I don’t want it to be hollow. Can I add the interaction part’s surface.
I used vtlProbeFilter, but it did not work right.
The isosurface of a scalar field in a 3D mesh is expected to be a surface, and not necessarily a watershed one. If you want to extract region with a scalar value above a given threshold, you may use the threshold filter. This way, you will have a dense result.
Can you also show how you use the probe filter ?
In the given example there are these lines to create the sphere with the right geometry, probe the values and cut it to match the whole.
// Define a model for the "lens". Its geometry matches the implicit
// sphere used to clip the isosurface
vtkNew<vtkSphereSource> lensModel;
lensModel->SetRadius(50);
lensModel->SetCenter(73, 52, 15);
lensModel->SetPhiResolution(201);
lensModel->SetThetaResolution(101);
// Sample the input volume with the lens model geometry
vtkNew<vtkProbeFilter> lensProbe;
lensProbe->SetInputConnection(lensModel->GetOutputPort());
lensProbe->SetSourceConnection(reader->GetOutputPort());
// Clip the lens data with the isosurface value
vtkNew<vtkClipDataSet> lensClip;
lensClip->SetInputConnection(lensProbe->GetOutputPort());
lensClip->SetValue(500);
lensClip->GenerateClipScalarsOff();
lensClip->Update();