<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div>&gt; Hi,</div><div>&gt; I need to align&nbsp; a set of 3D points and would like to render the points separately as "non-aligned" and "aligned" data.</div><div>I have created an array of mappers and&nbsp;actors one for each set of points.<br>&gt;&nbsp;Also have set opacity for each actor .But I could not establish the<br>&gt; transparency among the different set of points before alignment.I can view<br>&gt; only the last set of&nbsp;3D points.<br>&gt; Here is the code:<br>&gt;<br>&gt; lm3Mapper=[]<br>&gt; lm3Actor=[]<br>&gt;<br>&gt; ren = vtk.vtkRenderer()<br>&gt;<br>&gt; colors=vtk.vtkUnsignedCharArray()<br>&gt;
 colors.SetNumberOfComponents(4)<br>&gt; colors.SetName("Colors")<br>&gt; i=0<br>&gt; for files in lm3List:<br>&gt;&nbsp; &nbsp;  lm3pts=get_3Dlandmark(files) #Get the 3D points in a numpy array<br>&gt;&nbsp; &nbsp;  lm3Point = vtk.vtkPolyData()<br>&gt;&nbsp; &nbsp;  lm3Point.SetPoints(gen_3DVTKPts(lm3pts)) #Create vtkPoints usingdouble<br>&gt; array<br>&gt;&nbsp; &nbsp;  delny = vtk.vtkDelaunay3D()<br>&gt;&nbsp; &nbsp;  delny.SetInput(lm3Point)<br>&gt;&nbsp; &nbsp;  delny.SetTolerance(0.001)<br>&gt;&nbsp; &nbsp;  delny.Update()<br>&gt;<br>&gt;&nbsp; &nbsp;  usg=vtk.vtkUnstructuredGrid()<br>&gt;&nbsp; &nbsp;  usg=delny.GetOutput()<br>&gt;<br>&gt;&nbsp; &nbsp;  lm3Point1=vtk.vtkPolyData()<br>&gt;&nbsp; &nbsp;  lm3Point1.SetPoints(usg.GetPoints())<br>&gt;&nbsp; &nbsp;  lm3Point1.SetVerts(usg.GetCells())<br>&gt;# Also tried setting colour and scalar values for each point<br>&gt;<br>&gt;&nbsp; &nbsp;  scalars = vtk.vtkFloatArray()<br>&gt;&nbsp; &nbsp; 
 scalars.SetNumberOfComponents(1)<br>&gt;&nbsp; &nbsp; 
 scalars.SetName("3DLMK Scalars")<br>&gt;<br>&gt;&nbsp; &nbsp;  for s in range(22):# total no.of 3D points=22<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  scalars.InsertNextValue(vtk.vtkMath.Random(0.0,1.0))<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  colors.InsertNextTupleValue((0,255,0,128))<br>&gt;<br>&gt;&nbsp; &nbsp;  lm3Point1.GetPointData().AddArray(colors)<br>&gt;&nbsp; &nbsp;  lm3Point1.GetPointData().SetScalars(scalars)<br>&gt;<br>&gt;&nbsp; &nbsp;  lm3Mapper+= [vtk.vtkPolyDataMapper()]<br>&gt;&nbsp; &nbsp;  lm3Mapper[i].SetInput(lm3Point1)<br>&gt;&nbsp; &nbsp;  lm3Mapper[i].ScalarVisibilityOn()<br>&gt;&nbsp; &nbsp;  lm3Mapper[i].SetScalarModeToUsePointFieldData()<br>&gt;&nbsp; &nbsp;  lm3Mapper[i].SelectColorArray("Colors")<br>&gt;<br>&gt;&nbsp; &nbsp;  lm3Actor+=[vtk.vtkActor()]<br>&gt;&nbsp; &nbsp;  lm3Actor[i].SetMapper(lm3Mapper[i])<br>&gt;&nbsp; &nbsp;  lm3Actor[i].GetProperty().SetPointSize(6)<br>&gt;&nbsp; &nbsp; 
 #lm3Actor[i].GetProperty().SetColor(200.0,0.0,0.0)<br>&gt;&nbsp; &nbsp;  #lm3Actor[i].GetProperty().SetOpacity(0.5)<br>&gt;<br>&gt;&nbsp; &nbsp;  ren.AddActor(lm3Actor[i])<br>&gt;&nbsp; &nbsp;  ren.SetBackground(0.0, 0.0, 210.0)<br>&gt;&nbsp; &nbsp;  i=i+1<br>&gt;<br>&gt; Please throw light on this.<br>&gt;</div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div class="y_msg_container"><div id="yiv2560522028"><div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; background-color: rgb(255, 255, 255);"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div dir="ltr">&nbsp;</div><div dir="ltr">&gt; -Judith<br><br><br></div> </div> </div>  </div></div></div><br><br><var
 id="yui-ie-cursor"></var></div> </div> </div>  </div></body></html>