[Paraview] Replacement for colorByArray

Yumin Yuan yumin.yuan at kitware.com
Fri Sep 5 09:40:34 EDT 2014


Hi Michael,

Checkout out "vtkSMPVRepresentationProxy::SetScalarColoring(...)".
I think that's what you are looking for.

Yumin


On Fri, Sep 5, 2014 at 9:24 AM, Reuter, Michael A. <reuterma at ornl.gov>
wrote:

> Hi,
>
> I have an application that I’m trying to conform back to git-master in
> preparation for the version 4.2 release. In the application, I used the
> pqPipelineRepresentation::colorByArray function to preset the colormap
> array before the data is rendered. I see that this function has been
> removed. I did a bit of digging and tried to use the following as a
> replacement (signal is our default array name):
>
> pqDataRepresentation *drep = objectBuilder->createDataRepresentation(…);
> vtkSMPropertyHelper(drep->getProxy(), “Representation”).Set(“Surface”);
> vtkSMPropertyHelper(drep->getProxy(), “ColorArrayName”).Set(“signal”);
> drep->getProxy()->UpdateVTKObjects();
>
> However, this doesn’t seem to set the correct array as the view shows
> Solid Color for the array when it renders. I’m either invoking things
> incorrectly or at the wrong time, but I don’t know what. What am I missing
> or is there a more appropriate alternative to this method?
>
> Thanks,
> M
>
> Dr. Michael Reuter
> Scientific Data Analysis Group
> Neutron Data Analysis and Visualization Division
> Oak Ridge National Laboratory
>
> Office: 1-865-241-7216
> Fax: 1-865-574-6080
> Email: reuterma at ornl.gov<mailto:reuterma at ornl.gov>
>
>
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140905/e4a00873/attachment-0001.html>


More information about the ParaView mailing list