[vtkusers] Access to scalars

e.mambrini at llg.it e.mambrini at llg.it
Mon Jun 21 03:29:55 EDT 2004


The problem was that I was trying to access scalars but there weren't 
scalars associated to my dataset! I set scalars and now it works!
Thanks!!!
Eleonora


Scrive "Shoaib A. Ghias" <shoaib at wayne.edu>:

> In C++, you'd have to write polyData->GetPointData()->GetScalars()
> which
> will return a pointer to the scarlar array based on your scalar data
> type.
> If I have double data type for scalars, for example, you'd do:
> 
> vtkDoubleArray * scalarArray = polyData->GetPointData()->GetScalars();
> double value = scalarArray->GetValue(0);
> 
> 
> 
> 
> ----- Original Message ----- 
> From: <e.mambrini at llg.it>
> To: <vtkusers at vtk.org>
> Sent: Thursday, June 17, 2004 3:59 AM
> Subject: [vtkusers] Access to scalars
> 
> 
> > Hi!
> >
> > I have a PolyData object, created by STLReader. I wanna give
> different
> > colors to the object points, depending on their coordinates. How can
> I
> > access to the scalars of these points?
> > I tried  with GetPointData->GetScalars but it gives me problems at
> run
> time.
> >
> > Thanks!
> >
> > eleonora
> >
> > --
> > Registrati su www.webmail.it - Accesso gratuito fino a 128k
> > Mailbox da 20Mbyte con antivirus, antispam, accesso pop3 ed imap
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 


--
Registrati su www.webmail.it - Accesso gratuito fino a 128k
Mailbox da 20Mbyte con antivirus, antispam, accesso pop3 ed imap




More information about the vtkusers mailing list