[vtkusers] I need help, i'm in a trouble but no one answers me!!!

Peter F Bradshaw pfb at exadios.com
Thu Sep 11 09:11:53 EDT 2008


On Wed, 10 Sep 2008, B. C. wrote:

> Hi David.
> Thank you one more time.
> Can this help me if i'm coding in c++?

There really is no sematic difference between VTK in Tcl and C++. It is
just a matter of learning to translate one to the other. To give you the
idea from the example:

vtkCurvatures curve1
    curve1 SetInputConnection [cleaner GetOutputPort]
    curve1 SetCurvatureTypeToGaussian

vtkCurvatures curve2
    curve2 SetInputConnection [cleaner GetOutputPort]
    curve2 SetCurvatureTypeToMean

whould be written is C++ as:

vtkCurvatures *curve1 = vtkCurvatures::New();
curve1->SetInputConnection(cleaner->GetOutputPort());
curve1->SetCurvatureTypeToGaussian();

vtkCurvatures *curve2 = vtkCurvatures::New();
curve2->SetInputConnection(cleaner->GetOutputPort());
curve2->SetCurvatureTypeToMean();

The only other thing to remember in the C++ code is to call *->Delete()
when finished with the object. Alternatively you can use Smart Pointers
to manage deletion.

>
> --- En date de : Mer 10.9.08, David Cole <david.cole at kitware.com> a écrit :
>
> De: David Cole <david.cole at kitware.com>
> Objet: Re: [vtkusers] I need help, i'm in a trouble but no one answers me!!!
> À: butterfly.1688 at yahoo.fr
> Cc: vtkusers at vtk.org
> Date: Mercredi 10 Septembre 2008, 13h20
>
>
>
> The page I pointed you to earlier has a link to test that uses vtkCurvatures:
> http://www.vtk.org/doc/nightly/html/c2_vtk_t_2.html#c2_vtk_t_vtkCurvatures
>
>
> The tcl code for the test is here:
> http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Graphics/Testing/Tcl/TestCurvatures.tcl?root=VTK&content-type=text/plain
>
>
>
> Model your own code after that code and you should be on your way...
>
>
>
>
>
> On Sat, Sep 6, 2008 at 8:42 AM, David Cole <david.cole at kitware.com> wrote:
>
>
> Did you read the documentation for vtkCurvatures?
>
>
> http://www.vtk.org/doc/nightly/html/classvtkCurvatures.html
>
>
>
>
>
>
> On Sat, Sep 6, 2008 at 5:05 AM, B. C. <butterfly.1688 at yahoo.fr> wrote:
>
>
>
>
>
>
>
>
>
> Hi everyone. I don't know why no one helps me to resolve my problem?!!! Pleaaase, i need your help.
> I want to extract curvatures from a 3D object (a VRML object).
> I know it should be done using vtkCurvatures class and i found some code lines but something is missing.
> Can someone help me?
>  
> vtkCurvatures *curves = vtkCurvatures::New();
> curves->SetCurvatureTypeToMean();
> curves->Update();
>

Cheers

-- 
Peter F Bradshaw: http://www.exadios.com (public keys avaliable there).
Personal site: http://personal.exadios.com
"I love truth, and the way the government still uses it occasionally to
 keep us guessing." - Sam Kekovich.



More information about the vtkusers mailing list