[vtkusers] Display different ImageData Scalar to different Viewport
David Gobbi
david.gobbi at gmail.com
Thu May 31 16:07:13 EDT 2018
Hi Ruben,
Instead of data.SetActiveScalars(), use mapper.SetArrayId(i) or
mapper.SetArrayName(name).
- David
On Thu, May 31, 2018 at 8:57 AM, Ruben Di Battista <
rubendibattista at gmail.com> wrote:
> Hello,
> I'm playing a bit with VTK and its Python bindings. I wrote down a simple
> case where I generate the distance function of a sphere, I extract the
> surface from it using the FlyingEdge3D algorithm, then I calculate the
> curvatures using the vtkCurvatures filter, and then I'd like to show the
> Mean_Curvature and the Gauss_Curvature in two different viewports.
>
> What I tried to do is to use the `SetActiveScalars` method of the
> `PointData` associated to my `ImageData` dataset, but at the end I get two
> Viewports showing the same scalar (the last one activated). I also tried to
> stop the program execution using a debugger and triggering the render
> before the second scalar is made "active", and it correctly shows the first
> scalar field. So It's like that the two mappers rendered are "linked".
>
> Do I need to do a ShallowCopy somewhere?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180531/d183bd9e/attachment.html>
More information about the vtkusers
mailing list