[vtkusers] Multiple fields (scalars, vectors)
Gomez, Alberto
alberto.gomez at kcl.ac.uk
Mon Apr 19 13:42:33 EDT 2010
hI,
I do not know a way to assign several scalar values to a grid, but what
you can do is to have one scalar array assigned with ->SetScalars() with
this array having several components
hth,
Alberto
David Doria wrote:
> On Fri, Feb 26, 2010 at 3:56 AM, Sebastian Gatzka <sebastian.gatzka at stud.tu-darmstadt.de<mailto:sebastian.gatzka at stud.tu-darmstadt.de>> wrote:
> Hello World.
>
> How can I assign different field values like scalars and vectors to a (structured) grid?
> Looks to me that only the last data set with ->SetScalar() or ->SetVector() is considered.
>
> I want to use different fields for different cuts, contours etc.
> How do I tell these actors/mappers which one of the fields should be considered?
>
> Sebastian
>
> I've never used this, but I believe you're looking for the SetActiveScalars function:
> output->GetCellData()->SetActiveScalars(INTERFACE_COLORING);
>
> If you figure out the syntax and could write a short example for the wiki, that would be much appreciated!
>
> Thanks,
>
> David
>
>
--
Alberto Gómez
/Division of Imaging Sciences
The Rayne Institute
4th Floor, Lambeth Wing
St Thomas' Hospital
London SE1 7EH /
phone: +44 (0) 20 718 88364
email: alberto.gomez at kcl.ac.uk <mailto:alberto.gomez at kcl.ac.uk>
More information about the vtkusers
mailing list