<div dir="ltr"><div><div><div>Hi all,<br></div>I have a quick question about coloring vtkPolyMappers. I have the following code:<br><br>for cluster_ind in ...:<br><div style="margin-left:40px">threshold = vtk.vtkImageThreshold()                         <br>threshold.SetInputConnection(importer.GetOutputPort())      <br>threshold.ThresholdBetween(cluster_ind-0.1, cluster_ind+0.1)<br>threshold.ReplaceInOn()                                     <br>threshold.SetInValue(0)  <br>threshold.ReplaceOutOn()                                    <br>threshold.SetOutValue(1)<br>threshold.Update()                                          <br>                                                            <br>dmc = vtk.vtkDiscreteMarchingCubes()                        <br>dmc.SetInputConnection(threshold.GetOutputPort())           <br>dmc.GenerateValues(1, 1, 1)                                 <br>dmc.Update()                                                <br>                                                            <br>mapper = vtk.vtkPolyDataMapper()                            <br>mapper.SetInputConnection(dmc.GetOutputPort())              <br>                                                            <br>lut = vtk.vtkLookupTable()                                  <br>lut.SetNumberOfTableValues(2)                               <br>lut.SetTableValue(0, 0, 0, 255)                             <br>lut.SetTableValue(1, *rgb_cluster_mapping[cluster_ind])     <br>lut.Build()                                                 <br>mapper.SetLookupTable(lut)                                  <br>mapper.SetScalarModeToUseCellData()                         <br></div><br></div>However, when I run it only one of the mappers is colored correctly; the other one is just rendered as black. I can tell that it's rendered black because when I spin around the clusters in my viewer I can see it obstructing the other clusters. The intended colors are (0, 255, 0) and (88, 86, 214) (that's what's in rgb_cluster_mapping for these clusters).<br><br></div>Any ideas?<br></div>