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

Peter F Bradshaw pfb at exadios.com
Mon Sep 22 20:46:53 EDT 2008


Hi;

On Mon, 22 Sep 2008, B. C. wrote:

> Hi,
> I'm using VTK 4.4!!!

It looks like vtkCurvatures was intoduced at around that time. There
are a number of changes in this class between VTK 4.4 and VTK 5.*. But
the functions you want are decled protected in both 4.4 and 5.*.

>
> --- En date de : Lun 22.9.08, Peter F Bradshaw <pfb at exadios.com> a écrit :
>
> De: Peter F Bradshaw <pfb at exadios.com>
> Objet: Re: [vtkusers] Cannot access to functions in vtkCurvatures class!!!
> À: vtkusers at vtk.org
> Date: Lundi 22 Septembre 2008, 5h04
>
> Hi;
>
> Which version of the VTK library are you using?
>
> On Fri, 19 Sep 2008, B. C. 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'
>
> Are you aware that, in the VTK 5.* versions of the library, those
> functions are protected members of vtkCurvatures? This means that they
> are not avaliable to outside users of the class. So, for instance, the
> following will not work:
>
> vtkPolyData *myData = vtkPolyData::New();
> vtkCurvatures *aCurvaturesFilter = vtkCurvatures::New;
> ..
> ..
> ..
>   aCurvaturesFilter->GetMeanCurvature(myData);  // Error - function not
>                                                 // declared public.
>
> >
> > What should i do for each case??
>
> Assuming that the problem is that only you have overlooked the protected
> decls of these functions then the simplest fix is that you write a class
> that is derived from vtkCurvatures in which you decl public those
> protected functions you need to access. For those functions you then
> code the access to the protected parent functions.
>
> However, the answer in a wider sense may depend on how you are using
> vtkCurvatures in the context of your program.
>
> >  
> > Thank you so much
> >
>
> Cheers
>

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