[Paraview] Replacement for colorByArray
Reuter, Michael A.
reuterma at ornl.gov
Fri Sep 5 11:03:48 EDT 2014
Hi Yumin,
Thanks for the pointer as now the array is set. My next problem is that the transfer function range is (0, 1) and not the range of my array. I tried using vtkSMPVRepresentationProxy::RescaleTransferFunctionToDataRange, but ParaView gives a Could not determine array range warning. I wedged a UpdateVTKObjects() between the two calls but that didn’t help. What’s the right way to do this?
As a larger issue, I’m seeing that my old (PV 3.98.1 based) application is not liking how PV 4.2 is handling things. Is there any documentation or good examples of how things should be done for 4.2? My focus is on how to programmatically do things like: source and filter creation, pipeline construction and manipulation, manage different views, color map/transfer function manipulation, camera resetting. Now is the perfect time for a bit of a rewrite, but I’d definitely like to align things to how 4.2 wants things done.
Thanks,
M
On Sep 5, 2014, at 9:40 AM, Yumin Yuan <yumin.yuan at kitware.com<mailto:yumin.yuan at kitware.com>> wrote:
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<mailto: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<tel:1-865-241-7216>
Fax: 1-865-574-6080<tel:1-865-574-6080>
Email: reuterma at ornl.gov<mailto:reuterma at ornl.gov><mailto:reuterma at ornl.gov<mailto:reuterma at ornl.gov>>
_______________________________________________
Powered by www.kitware.com<http://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
More information about the ParaView
mailing list