[vtkusers] Intersection of two iso surfaces
Bill Lorensen
bill.lorensen at gmail.com
Fri Dec 2 08:13:56 EST 2011
Since the second function is expensive, you will need to do your own "probing".
Something like:
for each point in the extracted isosurface, evaluate the second
function and store the result in the pointdata of the extracted
isosurface.
Bill
On Fri, Dec 2, 2011 at 1:46 AM, Luke <hazelnusse at gmail.com> wrote:
> Bill,
> I got caught up in some other work and am returning back to this. I
> have a couple of questions about to use vtkProbeFilter as you suggest.
>
>> 1) As you stated, compute the isosurface of the first function.
>
> Ok, so something like this:
>
> vtkContourFilter *contours = vtkContourFilter::New();
> contours->SetInput(sample->GetOutput());
> contours->GenerateValues(1, 0.0, 0.0);
>
> where sample is the sampling of my first function (the computationally
> inexpensive one).
>
>> 2) Probe the second function with the first function polydata using
>> vtkProbeFilter.
>
> I'm a bit confused by the vtkProbeFilter documentation, but I think
> you are suggesting that I connect the output of the vtkContourFilter
> to the input of the vtkProbeFilter, correct? So like this:
>
> vtkProbeFilter *probe = vtkProbeFilter::New();
> probe->SetInputConnection(1, contours->GetOutputPort());
>
> What I'm not sure now is how to set my second function as the Source
> of the vtkProbeFilter. Do I need to use vtkSampleFunction to sample
> the second function in the same way that the first is sampled? If so,
> won't this result in the second function (the computationally
> expensive one) being evaluated over the whole 3d volume that is
> specified by vtkSampleFunction::SetModelBounds()? In
> ProbingWithPlaneWidget.py, the input is the plane and the source comes
> from a data set loaded from file.
>
>> 3) Run contour filter on the output of 2).
>
> Once I get 2), I think I know what to do here, but I'm stuck on how to do 2) :)
>
> Thanks for the help,
> ~Luke
--
Unpaid intern in BillsBasement at noware dot com
More information about the vtkusers
mailing list