[Insight-users] error: invalid use of undefined type 'struct
vtkProperty'! How to use SetColor() ?
Karthik Krishnan
Karthik.Krishnan at kitware.com
Thu Mar 23 10:28:04 EST 2006
You've just done the forward declaration of vtkProperty, not included
its header.
Add the line to AppBase.cxx
#include "vtkProperty.h"
On Thu, 2006-03-23 at 11:35 +0100, charfeddine amir wrote:
> Hi all
> i get the following error while trying to change my actor color to
> RED :
>
> /home/work/AppBase.cxx:4186:error: invalid use of undefined type
> 'struct vtkProperty'
> /usr/local/include/vtk/vtkActor.h:39: error: forward declaration of
> 'struct vtkProperty'
>
> and this is my code :
>
> vtkActor* actor = vtkActor::New();
> renR->AddActor(actor);
>
> vtkDataSetMapper* mapper = vtkDataSetMapper::New();
>
> mapper->SetInput(MeshToUnstructuredGrid( meshSource->GetOutput() ) );
>
> actor->SetMapper(mapper);
> actor->GetProperty()->SetColor( 1, 0, 0 );
>
> could any one help me please, and thankx for your time,
> Regards.
>
>
>
>
> ______________________________________________________________________
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> tarifs exceptionnels pour appeler la France et l'international.
> Téléchargez la version beta.
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list