[vtkusers] Cannot access to functions in vtkCurvatures class!!!

Francois Bertel francois.bertel at kitware.com
Thu Oct 2 19:10:50 EDT 2008


Hello,

VTK/Graphics/vtkCurvatures is a filter. As any filter in VTK, you are
supposed to feed its input with some dataset (or some output port of
another filter), update it (to perform an execution) and get the
result in its output.

There is a test in VTK/Graphics/Testing/Cxx/TestCurvatures.tcl that
shows how to use it:

Here the C++ version of it:

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

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

then call Update() on the filter to make sure its output is up-to-date
and look at it:

curve1->Update();
vtkPolyData *result=curve1->GetOutput();

BTW, I didn't know about this class. I just performed a grep about
vtkCurvatures in the VTK source dir. In general, if you wonder how to
use a class just look for the class name in any VTK/<package>/Testing/
directory.
Or just google about it, I found this message also about
TestCurvatures.tcl
http://osdir.com/ml/lib.vtk.user/2002-10/msg00630.html


On Thu, Oct 2, 2008 at 5:29 PM, B. C. <butterfly.1688 at yahoo.fr> wrote:
> Good evening everybody.
> I'm using vtkCurvatures class to extract curvatures from a polydata object.
> I'm refering to 'VTK vtkCurvatures Class Reference.mht'
>
> When i try to extract maximum curvatures using 'GetMaximumCurvature' , i
> have this error message:
> 'GetMaximumCurvature' : is not a member of 'vtkCurvatures'
> And, when i try to extract mean curvatures using 'GetMeanCurvature' , i have
> this error message:
> 'GetMeanCurvature' : cannot access protected member declared in class
> 'vtkCurvatures'
>
> What should i do for each case?? I'm using vtk 4.4
>
> Thank you so much
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



-- 
François Bertel, PhD  | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
                      | Clifton Park NY 12065, USA



More information about the vtkusers mailing list