[vtkusers] vtkpolydata + scalars
    Rasmus Reinhold Paulsen 
    rrp at imm.dtu.dk
       
    Mon May 27 11:18:46 EDT 2002
    
    
  
Hi Gowri,
On Mon, 27 May 2002, Gopalakrishnan, Gowri wrote:
>  I use vtkPolyData -> GetPointData->SetScalars() to set the scalars and
> 
> And when I do the 
> 
> ->GetPointData->GetScalars - the vtkscalars I get is always null. I noticed
> two postings on this before without any answers.
> 
> Does any one have an idea how to extract the scalars?. Where are these
> scalars stored when you do ->GetPointData->SetScalars?
I use the following:
vtkFloatArray* scalars 
= (vtkFloatArray*)PD->GetOutput()->GetPointData()->GetScalars();
, Where PD is a vtkPolyDataReader object.
I am not sure that the cast is "good practice" but it works.
Regards,
Rasmus
    
    
More information about the vtkusers
mailing list