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

B. C. butterfly.1688 at yahoo.fr
Mon Sep 22 10:02:27 EDT 2008


Hi,
I'm using VTK 4.4!!! 

--- 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

-- 
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.
_______________________________________________
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



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080922/9ae4a00a/attachment.htm>


More information about the vtkusers mailing list