<div dir="ltr">Hello, <div>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. <br><br>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". <br><br>Do I need to do a ShallowCopy somewhere? <br><br>Here below the `Sphere.show` method. The full code is attached. `self.surface` is an `ImageData` dataset. </div><div><br></div><div><div>   <font face="monospace, monospace"> def show(self):</font></div><div><font face="monospace, monospace">        # Render Window</font></div><div><font face="monospace, monospace">        rw = vtk.vtkRenderWindow()</font></div><div><font face="monospace, monospace">        rw.SetSize(800, 800)</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">        # Defining Bounds of Viewports</font></div><div><font face="monospace, monospace">        xmins = [0, 0.5]</font></div><div><font face="monospace, monospace">        xmaxs = [0.5, 1]</font></div><div><font face="monospace, monospace">        ymins = [0, 0]</font></div><div><font face="monospace, monospace">        ymaxs = [1, 1]</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">        # Curvature Types</font></div><div><font face="monospace, monospace">        curv_types = ['Mean_Curvature', 'Gauss_Curvature']</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">        for i in six.moves.range(2):</font></div><div><font face="monospace, monospace">            render = vtk.vtkRenderer()</font></div><div><font face="monospace, monospace">            rw.AddRenderer(render)</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">            # Mean Curvature View</font></div><div><font face="monospace, monospace">            render.SetViewport(xmins[i], ymins[i], xmaxs[i], ymaxs[i])</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">            # Create mapper</font></div><div><font face="monospace, monospace">            mapper = vtk.vtkPolyDataMapper()</font></div><div><font face="monospace, monospace">            self.surface.GetPointData().SetActiveScalars(curv_types[i])</font></div><div><font face="monospace, monospace">            mapper.SetInputData(self.surface)</font></div><div><font face="monospace, monospace">            mapper.SetScalarRange(-1, 1)</font></div><div><font face="monospace, monospace">            mapper.Update()</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">            # ColorBar</font></div><div><font face="monospace, monospace">            color_bar = vtk.vtkScalarBarActor()</font></div><div><font face="monospace, monospace">            color_bar.SetLookupTable(mapper.GetLookupTable())</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">            # Surface Actor</font></div><div><font face="monospace, monospace">            actor = vtk.vtkActor()</font></div><div><font face="monospace, monospace">            actor.SetMapper(mapper)</font></div><div><font face="monospace, monospace">            actor.GetProperty().EdgeVisibilityOn()</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">            render.AddActor(actor)</font></div><div><font face="monospace, monospace">            render.AddActor2D(color_bar)</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">        # Render Window Interactor</font></div><div><font face="monospace, monospace">        rwi = vtk.vtkRenderWindowInteractor()</font></div><div><font face="monospace, monospace">        rwi.SetRenderWindow(rw)</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">        rwi.Initialize()</font></div><div><font face="monospace, monospace">        rwi.Start()</font></div><div><br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><font face="monospace, monospace">          _  </font></div><div><font face="monospace, monospace">-.     .´  |∞∞∞∞</font></div><div><font face="monospace, monospace">  ',  ;    |∞∞∞∞∞∞</font></div><div><font face="monospace, monospace">    ˜˜     |∞∞∞∞∞∞∞∞∞ RdB </font></div><div><font face="monospace, monospace">    ,.,    |∞∞∞∞∞∞</font></div><div><font face="monospace, monospace">  .'   '.  |∞∞∞∞</font></div><div><font face="monospace, monospace">-'       `'</font></div><div><font face="monospace, monospace"><a href="http://rdb.is" target="_blank">http://rdb.is</a></font></div><div><br></div></div></div></div></div>