[vtkusers] How to set the scalars of points which come from vtkSource class?
Amy Henderson
amy.henderson at kitware.com
Tue May 18 10:47:59 EDT 2004
You need to call Update() on the cube source before you modify its
output. Add the line
cube->Update();
after you create the cube source object.
- Amy
At 10:41 AM 5/18/2004, OrNot wrote:
>hi,all:
> I have a problem when I programmed with the vtkSource class.
> I wanted to produce a simple cube from vtkCubeSource and
>then insert the scalars to its 8 points. It seems easy like
>this:
>
>
> vtkCubeSource *cube=vtkCubeSource::New();
>
> for (int i=0; i<8; i++) scalarstemp->InsertTuple1(i,i);
> cube->GetOutput()->GetPointData()->SetScalars(scalarstemp);
> scalarstemp->Delete();
>
>
>
>
>
> But the codes always work not well.The method setscalars failed to set
>the scalars.
>
> Need your help.
> Thank you in advance.
>
> OrNotáȬ¶©®+ÚµåS)جrë,åËOæ¬zG¦g¬±¨²í¢
> Ø^¶m§ÿé¹¹brHÁªÞr¿rï¶GÚ¨Z%-+%y-¢Ë±Êâmïî˱Êâmèm¶ÿÃ/¶J+ùYùb²Ø§~ï¶K¬z»
>
More information about the vtkusers
mailing list