[vtkusers] trying to clip a polyData with an other
Laurent Mundeleer
lmundele at ulb.ac.be
Wed Mar 10 08:51:38 EST 2004
Hi David,
Maybe could I ty with vtkImplicitDataset?
But I'll either try to use the vtkSuperquadric, the point is just I
don't really know yet how I'll perform an ovoide with it...
I'll gonna look in that way.
thanks for the complement of information.
Laurent
David.Pont at ForestResearch.co.nz wrote:
>Hi Laurent,
> There is no way in vtk to clip one polydata with another.
>vtkClipPolyData evaluates an implicit function at each point position in
>the polydata and then clips each cell according to the implicit function
>value at its points. So you can only clip with implicit surfaces. (Actually
>you can also clip using scalar values associated with the polydata.) So
>clipping and cutting in vtk is only done with implicit surfaces. Check the
>class doc for vtkImplicitFunction and see its descendants for the list of
>possible 'shapes' you can clip with.
>GetOutput and SetThetaResolution belong to vtkSuperquadricSource which
>produces a polygonal surface, good to look at, but no use for clipping.
>vtkSuperquadric is an implicit surface, difficult to look at, but just
>right for clipping.
>
> hope that clarifies...
> Dave P
>
>
>
>
> Laurent Mundeleer
> <lmundele at ulb.ac. To: David.Pont at ForestResearch.co.nz
> be> cc: vtk <vtkusers at vtk.org>
> Sent by: Subject: Re: [vtkusers] trying to clip a polyData with an
> vtkusers-admin at vt other
> k.org
>
>
> 09/03/2004 22:11
>
>
>
>
>
>
>Hi David,
>
>thanks for your answer, the problem with vtkSuperquadric is that there's
>no GetOutput(), SetThetaResolution(),...
>
>Is there another way to do that?
>
>Thanks
>
>Laurent
>
>David.Pont at ForestResearch.co.nz wrote:
>
>
>
>>Laurent,
>> vtkImplicitDataSet uses the data set scalars to perform clipping, I am
>>not sure what scalars (if any) are produced by vtkSuperqadricSource. But I
>>see there is vtkSuperquadric which can be passed directly to
>>vtkClipPolydata->SetClipFunction.
>>
>> Dave P
>>
>>
>>
>>
>>
>>
>
>
>
>> Laurent Mundeleer
>>
>>
>
>
>
>> <lmundele at ulb.ac. To: vtk
>>
>>
><vtkusers at vtk.org>
>
>
>> be> cc:
>>
>>
>
>
>
>> Sent by: Subject: [vtkusers] trying
>>
>>
>to clip a polyData with an other
>
>
>> vtkusers-admin at vt
>>
>>
>
>
>
>> k.org
>>
>>
>
>
>
>
>
>
>
>
>
>> 08/03/2004 22:56
>>
>>
>
>
>
>
>
>
>
>
>
>>
>>
>>Hi All,
>>
>>I'dl like to clip a vtkPolyData with another one.
>>Here's my code, based on the examples:
>>
>>---------------------
>>
>>vtkImplicitDataSet *v = vtkImplicitDataSet::New();
>>v->SetDataSet(ovoideSample->GetInput()); // ovoideSample has on input a
>>vtkSuperquadricSource
>>
>>vtkClipPolyData *clipper = vtkClipPolyData::New();
>>clipper->SetInput(tumorSample->GetInput()); // tumorSample has on input
>>a vtkSphereSource
>>
>>clipper->SetClipFunction(v);
>>clipper->GenerateClipScalarsOn();
>>clipper->Update();
>>
>>tumorSample->SetInput(clipper->GetOutput());
>>aff->ChargerModel3D(tumorSample);
>>
>>---------------------
>>
>>but after that my tumorSample is empty.
>>What do i wrong?
>>
>>Thanks in advance,
>>Regards
>>
>>Laurent
>>
>>
>>_______________________________________________
>>This is the private VTK discussion list.
>>Please keep messages on-topic. Check the FAQ at: <
>>http://public.kitware.com/cgi-bin/vtkfaq>
>>Follow this link to subscribe/unsubscribe:
>>http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>_
>>
>>
>>
>>
>>
>>
>>
>
>--
>********************************************
>Laurent Mundeleer
>Université Libre de Bruxelles (ULB)
>Service des Systèmes Logiques et Numériques (SLN) CP165/57
>50, Av. F.Roosevelt
>1050 Bruxelles
>Belgium
>tel : ++32.2.650.22.97
>fax : ++32.2.650.22.98
>e-mail : lmundele at ulb.ac.be
>********************************************
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: <
>http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>_
>
>
>
>
>
>
>
--
********************************************
Laurent Mundeleer
Université Libre de Bruxelles (ULB)
Service des Systèmes Logiques et Numériques (SLN) CP165/57
50, Av. F.Roosevelt
1050 Bruxelles
Belgium
tel : ++32.2.650.22.97
fax : ++32.2.650.22.98
e-mail : lmundele at ulb.ac.be
********************************************
More information about the vtkusers
mailing list